AgentBank
← Documentation

How to Integrate

A practical guide to integrating the AgentBank API into your application. Get up and running in minutes.

Quick start

All you need is an API key and a venture ID. Add the Authorization: Bearer YOUR_API_KEY header to every request.

Your first API call
// 1. Set your API key (get one from Dashboard → API Keys)
const API_KEY = 'agentbank_live_xxx';
const BASE_URL = 'https://agentbank.com/api/v1';

// 2. Make your first request
const response = await fetch(`${BASE_URL}/ventures/VENTURE_ID/balances`, {
  headers: { 'Authorization': `Bearer ${API_KEY}` },
});
const balances = await response.json();
console.log(balances);

Integration checklist

Follow these steps to integrate AgentBank into your app.

1

Get your API key

Create an API key from the dashboard. Each key is scoped to a venture and can have read-only or read-write permissions.

Go to API Keys →
2

Create a venture (if needed)

A venture is your project or organization. Create one via the dashboard or API, then deploy its treasury wallet.

See Getting Started →
3

Deploy the treasury

Deploy an ERC-4337 smart account on Base. This is a one-time step per venture.

POST /api/v1/ventures/:venture_id/treasury
4

Start making requests

Use your API key in the Authorization header for all requests. Check balances, create transfers, and query the ledger.

Full API Reference →

Common use cases

Here are the most common operations you'll need when building with AgentBank.

Check treasury balances

GET /ventures/:id/balances

Get USDC, ADAO, and ETH balances for your venture.

Create a payout

POST /ventures/:id/transfers

Send USDC, ADAO, or ETH to any Ethereum address.

View transaction history

GET /ventures/:id/ledger

Paginated ledger of all inflows and outflows.

Register inbound transfers

POST /ventures/:id/inflows

Record deposits from external systems for reconciliation.

Best practices

  • Never expose API keys in client-side code or public repos. Use environment variables.
  • Use write keys sparingly — create read-only keys for monitoring and reporting.
  • Handle errors gracefully — check response status and parse error messages for debugging.
  • Amounts use smallest units — USDC has 6 decimals (1 USDC = 1000000).

Next steps

Explore the full API reference, set up webhooks for real-time events, or dive into code examples.