Manual
CLI
API
Log in Get started free

Create an API key

Creates an API key. The full key is in the response and is not shown again.

Creates an API key. The full key is in the response and is not shown again.

HTTP
POST /account/api-keys

Access: Session token only. API keys get 403 with insufficient_scope.

Request body #

JSON.

FieldTypeRequiredDescription
namestringyesA name to recognise the key by. At most 80 characters.
scopeslist of stringnoAny of translations:read, translations:write, keys:write and projects:read. Without scopes, a key can reach no route.
expiresInDaysintegernoDays until the key expires, 1 to 3650. Without it the key does not expire, unless the organisation limits the lifetime of API keys: then it is required and at most that limit.
JSON
{ "name": "CI", "scopes": ["projects:read", "translations:read"], "expiresInDays": 90 }

Response 201 #

The key is created.

JSON
{
  "token": "ct_live_3f9a...7f3a",
  "keys": [ ... ]
}

Response fields #

FieldTypeDescription
tokenstringThe full key. Store it now.
keyslist of objectAll your keys, as in List your API keys.

Errors #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
422invalid_requestname is empty, scopes holds an unknown scope, or expiresInDays is not between 1 and 3650 or is exceeds_policy (the organisation limits the lifetime of API keys, see settings.security.apiKeyMaxDays).
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.

Notes #

See Authentication for what the scopes allow.