Skip to content

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/chains

Keep 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.

PlanDaily LimitBurst (per min)Price
Free10010$0
Developer10,00060$39/mo
Growth100,000300$149/mo
EnterpriseUnlimitedUnlimitedCustom

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

HTTPCodeDescription
400BAD_REQUESTInvalid request parameters or body
401MISSING_AUTHNo Authorization header provided
401INVALID_API_KEYAPI key is invalid, expired, or revoked
403FORBIDDENInsufficient plan permissions
404NOT_FOUNDResource does not exist
429RATE_LIMIT_EXCEEDEDDaily rate limit exceeded
429BURST_RATE_LIMIT_EXCEEDEDPer-minute burst limit exceeded
500INTERNAL_ERRORUnexpected server error

Ready to integrate?

Get your API key from the Account dashboard and start building.

Allowance Guard