API keys

Create an API key

Create a key. The secret is returned only once.

POST/v1/api-keys

You can also do this on the API keys page of your dashboard.

Authentication

A signed-in session: the cookie from Log in. Changes also need the X-CSRF-Token header.

Body

labelstringoptional

A name for the key, up to 100 characters. It appears in your credit log.

scopesarrayrequired

conversions:read, conversions:write or usage:read.

passwordstringrequired

Your current password, because a key gives lasting access.

Response

201 Created

api_keyobject

id, prefix, label, scopes, created_at, last_used_at, expires_at and revoked_at.

secretstring

The key itself. Store it now.

noticestring

A reminder that the secret won't be shown again.

Errors

StatusCodeWhat to do
400invalid_requestA scope or the label isn't valid. See field.
401reauthentication_requiredYour password is wrong.
409too_many_api_keysRevoke a key first. A workspace can have 25 active keys.
401unauthenticatedLog in first, or log in again.
403csrf_failedSend the csrf_token as X-CSRF-Token.