Skip to Content

Scopes

API key scopes control which operations a key can perform. Scopes are assigned when creating an API key and determine whether the key can read, write, or delete checks, and whether it can see or change alert channels.

Available Scopes

ScopeDescription
checks:readList checks, get check details, history, and stats
checks:writeCreate, update, and toggle checks
checks:deleteDelete checks
alerts:readSee which email addresses and webhooks receive alerts
alerts:writeChange email alert settings, add or delete webhooks, and send test alerts

The alert scopes are separate from the check scopes: a checks:write key can’t add a webhook. Keys created before the alert scopes existed have neither.

Default Scope

API keys created without specifying scopes default to checks:read only. This means existing keys are read-only and cannot modify your checks.

Scope Requirements by Endpoint

EndpointMethodRequired Scope
/v1/public/checksGETchecks:read
/v1/public/checks/statusGETchecks:read
/v1/public/checks/{id}GETchecks:read
/v1/public/checks/{id}/historyGETchecks:read
/v1/public/checks/{id}/statsGETchecks:read
/v1/public/checksPOSTchecks:write
/v1/public/checks/{id}PATCHchecks:write
/v1/public/checks/{id}/togglePOSTchecks:write
/v1/public/checks/{id}DELETEchecks:delete
/v1/public/accountGETchecks:read
/v1/public/alerts/emailGETalerts:read
/v1/public/alerts/emailPATCHalerts:write
/v1/public/alerts/email/testPOSTalerts:write
/v1/public/alerts/webhooksGETalerts:read
/v1/public/alerts/webhooksPOSTalerts:write
/v1/public/alerts/webhooks/{id}/testPOSTalerts:write
/v1/public/alerts/webhooks/{id}DELETEalerts:write

Error Response

If your API key does not have the required scope, the API returns a 403 Forbidden:

{ "error": "Credential does not have the required scope: checks:write" }

Restricting a Key to Checks or Folders

Scopes control what a key may do. To also limit which checks it may do it to, restrict the key to specific checks and/or folders when you create it. A folder includes its subfolders. Checks outside the grant return 404, and a restricted key can only create checks inside an allowed folder. See Authentication for the full rules.

Creating a Scoped Key

When creating an API key in Settings > API, select the scopes you need. You can assign multiple scopes to a single key.

For full access to checks, enable checks:read, checks:write, and checks:delete. Add alerts:read and alerts:write to manage alert channels too.

Last updated on