Skip to content

Create and Revoke API Keys

Goal: give a script, a CI job or another service its own key to your DownBad account, and take it away again when you’re done with it.

An API key is a long secret string a program sends instead of signing in. Each key belongs to your account and to the person who made it, and has a name you choose, so you can tell which program uses which key.

Every key has a scope, which is what the key is allowed to do:

  • Read keys can look at your monitors, incidents and settings, but can’t change anything. Use one for a dashboard, a report or anything that only shows data.
  • Read and write keys can also make changes, such as pausing a monitor or adding one. Use one only for a program that has to change things, such as a deploy job that pauses checks while it runs.

Give each program the smallest scope that does its job. A read key that leaks can’t change your account.

People on your account with the Viewer role can make only read keys. Owners and Editors can make both.

  1. Open Account. Choose Account at the foot of the menu on the left (on a phone, tap your avatar, then Account), and choose API keys in the list of sections.

    The Account page at its API keys section, with API keys chosen in the list of sections beside it and the New API key button.
  2. Choose New API key. A dialog opens.

    The New API key dialog, asking for a name and offering Read or Read and write.
  3. Name the key after the program that will use it, such as Deploy pipeline, so you know what breaks if you revoke it later.

  4. Choose what it can do: Read, or Read and write.

    The New API key dialog with the name Deploy pipeline and Read and write chosen, ready to Create key.
  5. Choose Create key. The dialog shows the whole key, which starts with dbk_.

  6. Copy the key now with the copy button beside it, and put it where your program reads its secrets, such as your CI service’s secret settings. Then choose I’ve copied it.

    The Your new API key dialog showing the whole key, starting dbk_, with the warning that it is shown only once, a copy button beside the key and I've copied it.

Expected result: the key appears in the list under API keys with its name, its scope, its first characters (such as dbk_1a2b3c4d…), when it was created and Never used. Once a program uses it, Last used shows when, updated at most once a minute. Times are shown in the time zone set in your profile.

The API keys section listing Deploy pipeline as Read and write, with its first characters, when it was created and Never used.

Revoke a key when the program that used it is gone, or when the key may have leaked.

  1. Open Account › API keys and find the key by its name and first characters.

  2. Choose Revoke, then Revoke again in the dialog that asks you to confirm.

    The Revoke this key? dialog, warning that anything using the key is refused from its next request, with Revoke to confirm.

Expected result: the key shows Revoked and the time it was revoked. Anything still using it is refused from its very next request. A revoked key can’t be turned back on: make a new key instead.

The API keys section showing Deploy pipeline marked Revoked, with the time it was revoked.

Owners and Editors can revoke any key in the account. A Viewer can revoke only the read keys they made.

Send the key as a bearer token to the DownBad API. Every endpoint, with an example for each, is in Use the DownBad API.

An account can hold 25 keys that aren’t revoked. Revoked keys don’t count.

Each refusal has its own section in API key refused: