Create API key

View as Markdown

Issues a new API key for the organization. Body: { name: string (1-255 chars, required), permissions?: string[] (default []), canImpersonate?: boolean (default false) }. The plaintext key value is returned ONCE in this 201 response and is never retrievable again. Authorization: organization administrators only. Returns 400 on an invalid body.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
namestringRequired1-255 characters
permissionslist of stringsOptional

Defaults to [].

canImpersonatebooleanOptional
Defaults to false.

Response

The created API key, including its one-time plaintext value.

idstring
namestring
permissionslist of strings
canImpersonateboolean
lastUsedAtdatetime or null
createdAtdatetime
valuestring
The plaintext key. Returned ONCE, at creation, and never retrievable again.