API Keys
Create an API key
Create a new API key for the authenticated user.
- Choose key_type: "USER" for a personal key that authenticates as you, or key_type: "SERVICE" for an automated service account key. The field is required.
- For service keys, supply at least one space via the organizations array. The service account is granted membership in each specified space. Multiple organizations and multiple spaces per organization are supported.
- For USER keys, the key inherits the authenticated user's own permissions.
- You may only assign roles at or below your own privilege level. Attempting to assign a role higher than your own returns 422 Unprocessable Entity.
- All roles default to minimum privilege when omitted: space roles default to MEMBER, organization roles default to READ_ONLY, and account_role defaults to MEMBER.
Authorization:
- User keys: The authenticated user may create personal keys for themselves.
- Service keys: Requires the SERVICE_KEY_CREATE permission in the target space (space member or above).
The full API key value (key) is only returned once in the creation response. Store it securely — it cannot be retrieved again. Use the redacted_key field on subsequent reads.
<Note>This endpoint is in beta, read more here.</Note>
post/v2/api-keys
Request body
Example request
{
"name": "My dev key",
"description": "Used for local development.",
"expires_at": "2026-01-01T00:00:00Z"
}Response
API key successfully created or refreshed. The raw key is only returned once.