API keys
Create an API key
Create a key. The secret is returned only once.
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
labelstringoptionalA name for the key, up to 100 characters. It appears in your credit log.
scopesarrayrequiredconversions:read, conversions:write or usage:read.
passwordstringrequiredYour current password, because a key gives lasting access.
Response
201 Created
api_keyobjectid, prefix, label, scopes, created_at, last_used_at, expires_at and revoked_at.
secretstringThe key itself. Store it now.
noticestringA reminder that the secret won't be shown again.
Errors
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | A scope or the label isn't valid. See field. |
| 401 | reauthentication_required | Your password is wrong. |
| 409 | too_many_api_keys | Revoke a key first. A workspace can have 25 active keys. |
| 401 | unauthenticated | Log in first, or log in again. |
| 403 | csrf_failed | Send the csrf_token as X-CSRF-Token. |