Skip to main content

Create, rotate and revoke API keys

A team API key authenticates API requests as your team. Only team administrators see Audit Log → API Keys; anyone else asks an administrator. What a key can do is covered in Authentication.

Create a key​

  1. Open Audit Log → API Keys and select New API Key.
  2. Name: up to 50 characters.
  3. Scope: one of the three in the next section.
  4. Expires in days: 1 to 3650, or one of 30 days, 90 days, 1 year, Never. Empty means the key does not expire.
  5. Trails: empty to allow every trail including ones created later, otherwise the key works for the listed trails only.
  6. Select Create.

The dialog "API key created" shows the key once — "Copy this key now. It won't be shown again." Copy it, tick I've stored this key somewhere safe, select Done. Afterwards the list shows the key masked.

Choose a scope​

On screenScopeUse it for
Read eventsreadReading, searching and exporting events
Emit and read eventswriteServices that emit events
Read events, manage streams and the event catalogmanageCreating trails, log streams and event definitions over the API

Details in Authentication.

Rotate a key​

Select Rotate, then Rotate key in "Rotate this key?". A replacement with the same name, scope and trails is shown once; the old key keeps working for 24 hours and its row reads "Rotated: stops working on …". Deploy the new key inside that window.

Revoke a key​

Select Revoke, then Revoke key in "Revoke this key?". It takes effect at once, requests with the key get 403, and it cannot be undone.

If a key leaks​

Revoke it rather than rotating it: rotation leaves the old key valid for 24 hours. Then create a new key.