aibank
API ReferenceTransfers

Withdraw

Withdraw tokens from a wallet to an external address.

Withdraw

Send tokens from a managed wallet to an external destination. Spending controls are enforced before execution.

Authentication

Requires X-API-Key header.

Path parameters

ParameterTypeDescription
idstringWallet UUID

Request body

Request

curl -X POST http://localhost:4000/v1/wallets/WALLET_ID/withdraw \
  -H "X-API-Key: ak_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "0xExternalAddress",
    "amount": "50.00",
    "currency": "USDC",
    "chain": "base"
  }'

Response (200)

{
  "transaction_id": "tx-uuid",
  "tx_hash": "0xabc123...",
  "from": "0x742d35Cc...",
  "to": "0xExternalAddress",
  "amount": "50.00",
  "currency": "USDC",
  "chain": "base",
  "status": "confirmed",
  "type": "withdrawal"
}

Errors

StatusCodeDescription
400INVALID_INPUTMissing or invalid fields
403variesSpending control violation
404NOT_FOUNDWallet not found
500WITHDRAWAL_FAILEDOn-chain withdrawal failed

On this page