Recent Transactions
Cards
Spending Policies
Agents
API Keys
Account
Identity Verification
pendingComplete identity verification to enable card issuance.
Funding
Add funds to your account to enable card spending.
API Reference
Use your API key with Authorization: Bearer <key> on all requests. Create keys in the Agents tab.
Authentication
All API requests require a Bearer token. Create an API key from the Agents tab, then include it in every request.
$ export AGENTSPEND_KEY="your-api-key-here"
Agents
Create and list agents. Each agent can have its own API keys, cards, and spend attribution.
/v1/agents
agents:write
$ curl -X POST https://your-host/v1/agents \ -H "Authorization: Bearer $AGENTSPEND_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Research Agent"}'
/v1/agents
agents:read
$ curl https://your-host/v1/agents \ -H "Authorization: Bearer $AGENTSPEND_KEY"
/v1/agents/{agent_id}
agents:write
$ curl -X DELETE https://your-host/v1/agents/agent_abc123 \ -H "Authorization: Bearer $AGENTSPEND_KEY"
Cards
Issue virtual cards, set spending limits, and reveal card details for use.
/v1/cards
cards:write
$ curl -X POST https://your-host/v1/cards \ -H "Authorization: Bearer $AGENTSPEND_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "agent_abc123", "type": "single_use", "spending_limit_cents": 5000, "label": "SaaS subscription" }'
/v1/cards/{card_id}/reveal
cards:reveal
$ curl -X POST https://your-host/v1/cards/card_xyz/reveal \ -H "Authorization: Bearer $AGENTSPEND_KEY"
/v1/cards
cards:read
$ curl "https://your-host/v1/cards?agent_id=agent_abc123" \ -H "Authorization: Bearer $AGENTSPEND_KEY"
/v1/cards/{card_id}
cards:write
$ curl -X DELETE https://your-host/v1/cards/card_xyz \ -H "Authorization: Bearer $AGENTSPEND_KEY"
Transactions
Query transaction history with optional filters.
/v1/transactions
transactions:read
$ curl "https://your-host/v1/transactions?limit=20" \ -H "Authorization: Bearer $AGENTSPEND_KEY"
Policies
Create spending policies to control per-transaction limits, monthly budgets, and MCC restrictions.
/v1/policies
policies:write
$ curl -X POST https://your-host/v1/policies \ -H "Authorization: Bearer $AGENTSPEND_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "SaaS Only", "per_transaction_limit_cents": 10000, "monthly_budget_cents": 50000, "allowed_mccs": ["5734", "5735"] }'
Balance
Check your account balance and available funds.
/v1/balance
ledger:read
$ curl https://your-host/v1/balance \ -H "Authorization: Bearer $AGENTSPEND_KEY"
Webhooks
Subscribe to events like authorization requests and transaction settlements.
/v1/webhooks
webhooks:write
$ curl -X POST https://your-host/v1/webhooks \ -H "Authorization: Bearer $AGENTSPEND_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.com/webhooks", "event_types": ["transaction.authorized", "card.create"] }'
Quickstart: End-to-End
Create an agent, issue a card, and reveal the card details in three commands.
# 1. Create an agent $ curl -s -X POST https://your-host/v1/agents \ -H "Authorization: Bearer $AGENTSPEND_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Shopping Agent"}' | jq .id # → "agent_abc123" # 2. Issue a card for the agent $ curl -s -X POST https://your-host/v1/cards \ -H "Authorization: Bearer $AGENTSPEND_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "agent_abc123", "type": "single_use", "spending_limit_cents": 2500 }' | jq .id # → "card_xyz789" # 3. Reveal card details $ curl -s -X POST https://your-host/v1/cards/card_xyz789/reveal \ -H "Authorization: Bearer $AGENTSPEND_KEY" | jq # → { "card_number": "4242...", "cvv": "123", ... }
Notes
limit and offset query params. Responses include next_offset (null when done).
Idempotency-Key header on POST/PATCH/DELETE requests for safe retries.
* for full access or restrict to cards:read, cards:write, etc.
/docs and schema at /openapi.json.