Every request to the Brume API is authenticated with a project API key, sent as a bearer token:
There is no JWT layer and no token exchange. One key, one header, one project.
Every key carries explicit scopes. A key with no scopes has no access, and key creation rejects an empty scope list. The scopes are:
| Scope | Grants |
|---|---|
rate_limit | The evaluation hot path: POST /v1/ratelimit/limit and /check |
manage_project | Rule CRUD, overrides, quotas, blocklists, project settings |
read_stats | Per-identifier analytics and status reads |
manage_keys | Create and revoke API keys |
publish | Reserved; no live endpoints require it today |
Practical guidance: your application's hot path should use a key with only rate_limit. Keep a separate manage_project key in your deploy tooling, and never ship a manage_keys key to a runtime.
The gateway verifies the key, resolves its project and tier, and loads its scopes before any handler runs. Scope enforcement happens inside the handlers: evaluation requires rate_limit, admin CRUD requires manage_project, analytics requires read_stats.
A failed lookup or a missing scope returns 401 with a JSON error body — see Error Handling.