Skip to main content
All requests require an API key in the x-key header.

Get your API key

  1. Sign up at app.revenuebase.ai.
  2. Go to Developers located in the sidebar and copy the Production API Key.

Send the key with every request

curl https://api.revenuebase.ai/v2/account/balance \
  -H "x-key: {YOUR_API_KEY}"
The key goes in the x-key header — not in Authorization, not as a query parameter.

Handle authentication errors

A missing or invalid key returns 401 Unauthorized:
{
  "detail": "Invalid or missing API key"
}
A valid key that lacks permission for the endpoint returns 403 Forbidden:
{
  "detail": "Access denied for this resource"
}
If you get a 401, check:
  • The header name is x-key (not Authorization or x-api-key)
  • You copied the full key with no leading or trailing spaces
  • The key hasn’t been revoked in the dashboard

Keep keys secure

  • Never commit keys to version control — use environment variables or a secrets manager
  • Server-side only — don’t expose keys in client-side code, mobile apps, or browser requests
  • Rotate if compromised — create a new key in the dashboard and revoke the old one immediately

Use multiple keys

Create one key per environment (development, staging, production) or per service. Each key tracks its own usage independently. Revoke keys you no longer need from the dashboard.

Next steps