API Reference
AllowanceGuard REST API v1 — Monitor, assess, and manage token approvals programmatically across multiple chains.
Base URL: /api/v1JSON responsesBearer token auth
Authentication
All API endpoints (except /health) require an API key sent via the Authorization header.
curl -H "Authorization: Bearer ag_live_your_key_here" \
https://www.allowanceguard.com/api/v1/chainsKeep your API key secret. Do not expose it in client-side code. All calls should be made from your server.
Rate Limits
Rate limits are applied per API key based on your plan. Every response includes rate limit headers.
| Plan | Daily Limit | Burst (per min) | Price |
|---|---|---|---|
| Free | 100 | 10 | $0 |
| Developer | 10,000 | 60 | $39/mo |
| Growth | 100,000 | 300 | $149/mo |
| Enterprise | Unlimited | Unlimited | Custom |
Headers: X-RateLimit-Limit, X-RateLimit-Remaining
Response Format
All endpoints return a consistent JSON envelope with data, error, and meta fields.
{
"data": { ... },
"error": null,
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-03-30T12:00:00.000Z",
"rateLimit": {
"limit": 10000,
"remaining": 9999,
"resetsAt": "2026-03-31T12:00:00.000Z"
}
}
}Endpoints
Health & Info
Wallet Scanning
Allowances
Risk Assessment
Simulation
Quick Start
Scan a wallet and retrieve its risk profile in three API calls:
const API_KEY = 'ag_live_your_key_here';
const BASE = 'https://www.allowanceguard.com/api/v1';
const headers = { 'Authorization': `Bearer ${API_KEY}` };
// 1. Trigger a scan
const scan = await fetch(`${BASE}/scan`, {
method: 'POST',
headers: { ...headers, 'Content-Type': 'application/json' },
body: JSON.stringify({ wallet: '0x1234...abcd' }),
}).then(r => r.json());
const scanId = scan.data.scanId;
// 2. Poll until complete
let status = 'pending';
while (status === 'pending' || status === 'running') {
await new Promise(r => setTimeout(r, 2000));
const job = await fetch(`${BASE}/scan/${scanId}`, { headers }).then(r => r.json());
status = job.data.status;
}
// 3. Get the risk score
const risk = await fetch(
`${BASE}/risk-score?wallet=0x1234...abcd`,
{ headers }
).then(r => r.json());
console.log(`Risk: ${risk.data.riskScore}/100 (${risk.data.riskLevel})`);Error Codes
| HTTP | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid request parameters or body |
| 401 | MISSING_AUTH | No Authorization header provided |
| 401 | INVALID_API_KEY | API key is invalid, expired, or revoked |
| 403 | FORBIDDEN | Insufficient plan permissions |
| 404 | NOT_FOUND | Resource does not exist |
| 429 | RATE_LIMIT_EXCEEDED | Daily rate limit exceeded |
| 429 | BURST_RATE_LIMIT_EXCEEDED | Per-minute burst limit exceeded |
| 500 | INTERNAL_ERROR | Unexpected server error |
Ready to integrate?
Get your API key from the Account dashboard and start building.
