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

Get your API key

Go to Settings → API Keys in the RevenueBase dashboard and create a key. Copy it — you won’t see it again after closing the dialog.
You need a RevenueBase account before creating a key. Sign up at app.revenuebase.ai.

Send the key with every request

curl https://api.revenuebase.ai/v1/credits \
  -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

Rate limits and errors

Limits per key, backoff strategy, and all error codes.

Verify email addresses

Make your first API call.