> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gizatech.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Top Up

> Add funds to an active agent

<Note>
  **SDK Alternative**: Use `agent.topUp(txHash)` for a simpler TypeScript interface. [See SDK docs](/sdk-reference/agent/lifecycle)
</Note>

## Description

Adds additional funds to an already active agent. The agent will include the new funds in its optimization strategy.

## Path Parameters

<ParamField path="chain_id" type="integer" required>
  The blockchain chain ID
</ParamField>

<ParamField path="wallet" type="string" required>
  The wallet address
</ParamField>

## Query Parameters

<ParamField query="tx_hash" type="string" required>
  Transaction hash of the deposit
</ParamField>

## Response

Returns `201 Created` on success.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:top-up?tx_hash=0xabc123..." \
    -H "X-Partner-API-Key: your-api-key" \
    -H "X-Partner-Name: your-partner-name"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x...:top-up?tx_hash=0xabc123...',
    {
      method: 'POST',
      headers: {
        'X-Partner-API-Key': 'your-api-key',
        'X-Partner-Name': 'your-partner-name',
      },
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "message": "Top-up process started"
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "detail": "Wallet is not active"
  }
  ```
</ResponseExample>
