Your apps and servers prove who they are with an API key. Each key belongs to one environment.

Create a key

  1. Settings → API keys → New API key.
  2. Choose a Name (what it’s for, such as Web app or Nightly job) and the Key type.
  3. Under Permissions, choose what it may do. Start from a preset, then adjust. Areas that manage the environment need a secret key.
  4. Optionally set Limits:
  1. Create. The key is shown once. Copy it now and store it as a secret in your host.

Rotate a key without downtime

Rotate when someone who knew a key leaves, or on a schedule.
  1. Open the key and choose Rotate key.
  2. Choose Keep the old key working for how long, so your apps have time to switch.
  3. Copy the replacement (it has the same permissions and limits).
  4. Deploy it, and the old key expires when you said.

Revoke a key

Revoke key stops anything using it at once. This cannot be undone. Make a new one if you need it.

See what a key does

Each key shows when it was last used and how many times. Every request carries the key’s name in Activity, so you can find which key did what.

Good practice

  • One key per app or job, so you can revoke one without breaking the rest.
  • Give each the least it needs. A job that reads one table shouldn’t hold a key that can manage the environment.
  • Use Allowed IP ranges for servers with fixed addresses.
  • Keep secret keys in your host’s secret store, never in code.
  • Use machine identities for services that call your API as themselves.