Skip to main content
POST
https://partners-backend-1038109371738.europe-west1.run.app
/
api
/
v1
/
{chain_id}
/
wallets
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
  -H "Content-Type: application/json" \
  -H "X-Partner-API-Key: your-api-key" \
  -H "X-Partner-Name: your-partner-name" \
  -d '{
    "wallet": "0x1234567890abcdef1234567890abcdef12345678",
    "eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "selected_protocols": ["aave", "compound", "moonwell"]
  }'
{
  "message": "Agent activated successfully",
  "wallet": "0x1234567890abcdef1234567890abcdef12345678"
}
SDK Alternative: Use giza.agent.activate() for a simpler TypeScript interface. See SDK docs

Description

Activates a new wallet for an agent. This endpoint must be called after the user has deposited funds to their smart account.

Request Body

wallet
string
required
The smart account wallet address
eoa
string
required
The user’s externally owned account (origin wallet)
initial_token
string
required
The token address that was deposited (e.g., USDC)
selected_protocols
string[]
required
List of protocol names to use for optimization
tx_hash
string
Transaction hash of the initial deposit (recommended)
constraints
array
Optional constraints for the agentConstraint types:
  • min_protocols - Minimum number of protocols to use
  • max_allocation_amount_per_protocol - Maximum amount per protocol
  • exclude_protocol - Protocols to exclude

Example Request

curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
  -H "Content-Type: application/json" \
  -H "X-Partner-API-Key: your-api-key" \
  -H "X-Partner-Name: your-partner-name" \
  -d '{
    "wallet": "0x1234567890abcdef1234567890abcdef12345678",
    "eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "selected_protocols": ["aave", "compound", "moonwell"],
    "tx_hash": "0x...",
    "constraints": [
      {
        "kind": "min_protocols",
        "params": { "min_protocols": 2 }
      }
    ]
  }'

Response

message
string
Confirmation message
wallet
string
The wallet address that was activated
Response Example
{
  "message": "Agent activated successfully",
  "wallet": "0x1234567890abcdef1234567890abcdef12345678"
}

Error Responses

StatusDescription
400Invalid input data
403Access denied or deposit too large
422Validation error
500Internal server error
curl -X POST "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets" \
  -H "Content-Type: application/json" \
  -H "X-Partner-API-Key: your-api-key" \
  -H "X-Partner-Name: your-partner-name" \
  -d '{
    "wallet": "0x1234567890abcdef1234567890abcdef12345678",
    "eoa": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "initial_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "selected_protocols": ["aave", "compound", "moonwell"]
  }'
{
  "message": "Agent activated successfully",
  "wallet": "0x1234567890abcdef1234567890abcdef12345678"
}