Skip to main content
POST
Mint an API key for the session user.

Authorizations

Authorization
string
header
required

Session token from POST /auth/login.

Body

application/json
label
string
required

The label of the api key.

scopes
string[]
required

The scopes of the api key.

expires_in_secs
integer<uint64> | null

Seconds until the api key expires, from 1 second up to 365 days (31,536,000). Any value in that range is accepted; omit for a key that never expires.

Required range: x >= 0

Response

The only response that ever carries the raw secret.

The only response that ever carries the raw secret.

api_key_id
string
required

The id of the api key.

label
string
required

The label of the api key.

scopes
string[]
required

The scopes of the api key.

secret
string
required

The secret of the api key.

expires_at
string<date-time> | null

The expiration time of the api key.