Create API key

http
POST /api-keys

Create an API key and return its secret once.

Request body

FieldTypeRequiredDescription
project_referencestringProject ID or slug. Creating a project-scoped key requires project.api_keys.manage. Omit for a user-level key; a project-scoped API-key caller retains its enforced project when this field is omitted.
namestringYes
scopesarrayRequested permissions. Schema examples list all currently supported values. Omitted or empty scopes default to read-only (read). Project keys remain restricted by their project and creation permission.
expires_atstring

Responses

StatusDescription
201API key created successfully
400Bad request
401Unauthorized
403Forbidden
404Not found
500Server error
503internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.