aibank
API ReferenceSpending Controls

Update Spending Controls

Create or update spending controls for a wallet.

Update Spending Controls

Set or update the spending limits and allowlists for a wallet. Uses upsert semantics -- creates controls if none exist, updates otherwise.

Authentication

Requires X-API-Key header.

Path parameters

ParameterTypeDescription
idstringWallet UUID

Request body

Request

curl -X PUT http://localhost:4000/v1/wallets/WALLET_ID/controls \
  -H "X-API-Key: ak_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "daily_limit_usd": 200,
    "per_tx_limit_usd": 50,
    "allowed_addresses": ["0xTrustedAddr1", "0xTrustedAddr2"]
  }'

Response (200)

{
  "wallet_id": "wallet-uuid",
  "controls": {
    "daily_limit_usd": 200,
    "weekly_limit_usd": 0,
    "monthly_limit_usd": 0,
    "per_tx_limit_usd": 50,
    "allowed_addresses": ["0xTrustedAddr1", "0xTrustedAddr2"],
    "allowed_domains": []
  },
  "updated": true
}

On this page