Getting startedAuthentication

Authentication

API keys, scopes, and how to authenticate requests against the public API.

Every request to /api/v1 carries an API key in the Authorization header.

Headers

Authorization: Bearer <api-key>
Content-Type: application/json   (on POST / PUT / PATCH)

Key format

Public API keys begin with obs_pub_ followed by a base64url opaque string. Keys are issued per organisation in the console under API keys. Each key is shown once at creation; the cloud stores its hash and cannot recover the plaintext.

Scopes

Each key carries a fixed set of scopes that gate which endpoints the key may call. The scopes available today:

ScopeGrants
read:metricsRead metric definitions, current values, and aggregated history.
write:metricsSet the status of manually-managed metrics.
read:slosRead SLOs and their current burn state. (read-only)
read:servicesRead service entities. (read-only)
read:incidentsRead incident updates published on status pages.
write:incidentsCreate and update incidents.
read:maintenancesRead scheduled maintenance windows.
write:maintenancesSchedule, transition, and cancel maintenance windows.
read:configExport the organisation's config-as-code document.
write:configApply a config-as-code document.
read:change_eventsRead ingested deploy / release change events.
write:change_eventsIngest deploy / commit / release change events.

SLOs and services are read-only over the API: there is no write:slos or write:services scope.

Scopes are additive. Requests against an endpoint whose required scope is not on the key return 403.

Errors

The API returns RFC 7807 problem-detail responses. An auth failure looks like this:

{
  "type": "https://observer.example/problems/unauthenticated",
  "title": "unauthenticated",
  "status": 401,
  "detail": "missing bearer token"
}

A missing bearer token and an invalid or revoked key both return 401 with title: unauthenticated; detail distinguishes them. A valid key without the required scope returns 403 with title: forbidden, and detail names the scope that was missing.

Branch on title, never on detail. See Errors and status codes for the full list of status codes, their title tokens, and the rate-limit headers.

Per-endpoint scope requirements appear on each operation page in the sidebar.

Rotation

Keys can be rotated through the console. Existing keys remain valid until you revoke them; revoke when an incident or personnel change requires it.