aibank
API ReferenceSpending Controls

Get Spending Controls

Get spending controls and usage stats for a wallet.

Get Spending Controls

Returns the current spending control configuration and usage statistics for a wallet.

Authentication

Requires X-API-Key header.

Path parameters

ParameterTypeDescription
idstringWallet UUID

Request

curl http://localhost:4000/v1/wallets/WALLET_ID/controls \
  -H "X-API-Key: ak_your_key"

Response (200) -- Controls configured

{
  "wallet_id": "wallet-uuid",
  "controls": {
    "daily_limit_usd": 100,
    "weekly_limit_usd": 500,
    "monthly_limit_usd": 1000,
    "per_tx_limit_usd": 50,
    "allowed_addresses": ["0xTrustedAddress"],
    "allowed_domains": [],
    "updated_at": "2026-03-26T12:00:00.000Z"
  },
  "usage_today": {
    "spent_usd": 25.50,
    "remaining_usd": 74.50
  },
  "usage_week": {
    "spent_usd": 120.00,
    "remaining_usd": 380.00
  },
  "usage_month": {
    "spent_usd": 350.00,
    "remaining_usd": 650.00
  }
}

Response (200) -- No controls

{
  "wallet_id": "wallet-uuid",
  "controls": null,
  "message": "No spending controls configured. Use PUT to set them."
}

Response fields

FieldTypeDescription
wallet_idstringWallet UUID
controlsobject or nullSpending limits configuration
controls.daily_limit_usdnumberMax USD per day (0 = unlimited)
controls.weekly_limit_usdnumberMax USD per week
controls.monthly_limit_usdnumberMax USD per month
controls.per_tx_limit_usdnumberMax USD per transaction
controls.allowed_addressesstring[]Allowlisted recipient addresses
controls.allowed_domainsstring[]Allowlisted domains
usage_todayobjectToday's spending stats
usage_weekobjectThis week's spending stats
usage_monthobjectThis month's spending stats

On this page