Skip to content
Menu
All API groups

API keys

Public and secret keys, scopes, rotation.

5 endpoints.

GET/v1/keys

Keys List

Needs a key or a dashboard session

Responses

POST/v1/keys

Create a key (the full key is returned once)

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstring | nullnoUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

Request body application/json ApiKeyCreate

NameTypeRequiredDescription
namestringyesmax length 100
kind"public" | "secret"yes
scopesstring[] | nullnoDefault: search, events (public) or all non-admin scopes (secret).
allowed_originsstring[]noPublic keys: browser origins allowed.
expires_atstring (date-time) | nullno

Responses

PATCH/v1/keys/{key_id}

Keys Update

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
key_idpathstringyes

Request body application/json ApiKeyUpdate

NameTypeRequiredDescription
namestring | nullnomax length 100
scopesstring[] | nullno
allowed_originsstring[] | nullno

Responses

DELETE/v1/keys/{key_id}

Revoke a key now

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
key_idpathstringyes

Responses

POST/v1/keys/{key_id}/rotate

New key now; the old one works for grace_hours more

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
key_idpathstringyes

Request body application/json ApiKeyRotate

NameTypeRequiredDescription
grace_hoursintegernoThe old key keeps working this long.default 24 · min 0 · max 720

Responses

Data shapes on this page

ApiKeyOut

NameTypeRequiredDescription
idstringyes
namestringyes
kind"public" | "secret"yes
prefixstringyes
last4stringyes
scopesstring[]yes
allowed_originsstring[]yes
created_atstring (date-time)yes
last_used_atstring (date-time) | nullno
expires_atstring (date-time) | nullno
revoked_atstring (date-time) | nullno

ApiKeyCreate

NameTypeRequiredDescription
namestringyesmax length 100
kind"public" | "secret"yes
scopesstring[] | nullnoDefault: search, events (public) or all non-admin scopes (secret).
allowed_originsstring[]noPublic keys: browser origins allowed.
expires_atstring (date-time) | nullno

ApiKeyCreated

NameTypeRequiredDescription
idstringyes
namestringyes
kind"public" | "secret"yes
prefixstringyes
last4stringyes
scopesstring[]yes
allowed_originsstring[]yes
created_atstring (date-time)yes
last_used_atstring (date-time) | nullno
expires_atstring (date-time) | nullno
revoked_atstring (date-time) | nullno
keystringyesThe full key. Shown ONCE; only a hash is stored.

ApiKeyUpdate

NameTypeRequiredDescription
namestring | nullnomax length 100
scopesstring[] | nullno
allowed_originsstring[] | nullno

Deleted

NameTypeRequiredDescription
deletedbooleannodefault true
idstringyes

ApiKeyRotate

NameTypeRequiredDescription
grace_hoursintegernoThe old key keeps working this long.default 24 · min 0 · max 720