Skip to main content
POST

Authentication

Requires an API key in the Authorization header.

Request

string
required
A display name for the key (e.g. Production, Development). Trimmed, non-blank, and at most 100 bytes.
A workspace can create 50 keys per day. Past that, the request returns 429.

Example request

Response

string
Unique key identifier. Use this id - never key_prefix - with rename, toggle, set limit, and revoke.
string
Display name for the key.
string
The full API key.
string
The key’s non-secret prefix (safe to store or display).
boolean
Whether the new key is active. Newly created keys are active.
Treat the key as a secret from the moment it is created. A non-readonly member of the workspace can read a revealable key again with GET /api/account/keys/reveal?id={id}.

Errors

Errors return the shared envelope with success, result.code, message, and request_id. A legacy error key is included alongside it.