Skip to main content
UptimeIO API requests are authenticated with an API key sent in the X-API-Key header. API keys are the recommended way to call the API from scripts, CI/CD pipelines and backend services. Two credential types are accepted by the endpoints in this reference: If a request carries both headers, the Authorization: Bearer token is used.
Some endpoints only accept a session token (JWT) and reject API keys. These include API key management, project management (create, rename, delete a project), billing, organization and team management, and the dashboard overview endpoints. Every page in this reference states when an endpoint is JWT-only.

Create an API key

1

Open the API Keys settings

Sign in at app.uptimeio.com and go to Settings > API Keys.
2

Create the key

Click Create API Key, give it a descriptive name (for example CI/CD pipeline) and choose a scope (see below).
3

Copy and store the key

Copy the key immediately. The full key is shown once; afterwards only a preview such as uio_1a2b...9f3c is visible.
Only organization owners and admins can create, rotate or delete API keys. See API keys for managing keys in the dashboard. If you lose a key, rotate it or create a new one and delete the old one.

Use an API key

Add the key to the X-API-Key header of every request:
Keys have the form uio_ followed by 64 hexadecimal characters.

Scopes

Each key has one scope, chosen when it is created. The default is read. A read key that sends POST, PUT, PATCH or DELETE receives 403 with code READ_ONLY_API_KEY:
Use read keys for dashboards and reporting, and read_write keys only where you need to change things.

Organization and project

An API key is issued for one organization and always acts on that organization. The key cannot be redirected to another organization with a header. Monitors, groups and incidents belong to a project. By default requests act on your organization’s default project. To target another project, send its ID in the X-Project-ID header:
  • A project that does not exist returns 404 with code PROJECT_NOT_FOUND.
  • A project that belongs to a different organization returns 403 (for example PROJECT_ORGANIZATION_MISMATCH, or API_KEY_ORGANIZATION_MISMATCH on project-scoped status page routes).
Status page endpoints take the project in the URL instead: /api/projects/{projectId}/status-pages.

Manage API keys

These endpoints require a session token (JWT) and owner or admin role. They are what the Settings > API Keys screen uses. A created or rotated key looks like this:

Security best practices

Store keys in environment variables or a secrets manager:
Rotate from Settings > API Keys (or POST /api/auth/api-keys/{id}/rotate). The old key stops working immediately, so update your applications straight after rotating.
Give CI/CD, background jobs and each integration their own key. If one leaks you can revoke it without affecting the others. The key list shows each key’s scope and when it was last used.

Code examples

Authentication errors

See Error Handling for the full list.

Troubleshooting

  • The environment variable is not set in the runtime (echo $UPTIMEIO_API_KEY).
  • The key has a trailing space or newline - trim it.
  • The header name must be exactly X-API-Key.
The key has read scope. Create a read_write key in Settings > API Keys.
The key was issued for a different organization than the project you are addressing. Use a key created in the owning organization.