Documentation menu

API

Call On-Call Optimizer from a script or another system with an API key.

The On-Call Optimizer API lets a script or another system read and change your on-call data without a browser login. Each request is authenticated with an API key.

API keys

An API key is a secret a script sends with each request in place of logging in. A personal API key acts as you: it can do what you can, limited by its access.

To create one:

  1. Click your avatar, then Profile.
  2. In the API keys section, click Create API key.
  3. Give the key a name, choose its access and how long it lasts, then click Create API key.
  4. Copy the key. It is shown once, and On-Call Optimizer can’t show it again.

Org API keys

An org API key belongs to your organization rather than to you, so it keeps working when the admin who created it leaves. It can do what an org admin can, limited by its access. Click the organization name in the top navigation bar and open the Authentication tab to see them. Org admins create and revoke them there in the same way, and any org admin can revoke any of them.

Access

  • Read-only keys can only read.
  • Read and write keys can also make changes.

Expiry and revocation

A key stops working on the date you chose when you created it: 7 to 365 days later, 90 by default. A key’s lifetime can’t be extended. To keep a script working, create a new key and revoke the old one.

Revoke a key from the API keys section as soon as a script no longer needs it. It stops working straight away.

Creating and revoking a key is recorded in your organisation’s audit log, and so is every request made with one.

Authenticating a request

Send the key in the Authorization header of each request:

Authorization: Bearer <your API key>

A request without a valid key is refused with 401 Unauthorized. A request the key’s access doesn’t cover is refused with 403 Forbidden.

Last updated November 30, 2026