Skip to content

API keys

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

The API keys page with two keys, their scopes, last use and expiry.

Click Create API key.

The Create API key dialog with name, website, scope checkboxes and expiry.

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

Send it as a bearer token:

Terminal window
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.