API keys
API keys let servers and CI talk to Beacon. Every user manages their own under API keys in the sidebar.

Creating a key
Section titled “Creating a key”Click Create API key.

- Name: where the key is used, such as “Production server”.
- Website: one website, or all the websites you can access.
- Scopes: what the key can do.
- Expires: after 30 days, 90 days, a year, or never.
| Scope | Allows |
|---|---|
read:stats |
GET /api/v1/stats. See HTTP API. |
write:events |
Server-side events and the first-party proxy. |
write:annotations |
POST /api/v1/annotations, for deploy markers from CI. |
The full key is shown once, right after you create it, along with a ready-made
BEACON_API_KEY= line. Store it as a secret. Afterwards Beacon only shows its first characters.
Keys are for servers and CI. Never put one in browser code.
Using a key
Section titled “Using a key”Send it as a bearer token:
curl "https://beacon.example.com/api/v1/stats?websiteId=your-website-uuid" \ -H "Authorization: Bearer bcn_…"Revoke stops a key working immediately. Last used shows when each key was last accepted.