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.
// 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.
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 →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 →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/treasuryStart 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/balancesGet USDC, ADAO, and ETH balances for your venture.
Create a payout
POST /ventures/:id/transfersSend USDC, ADAO, or ETH to any Ethereum address.
View transaction history
GET /ventures/:id/ledgerPaginated ledger of all inflows and outflows.
Register inbound transfers
POST /ventures/:id/inflowsRecord 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.