Skip to main content
POST
Create an API key
Dashboard session only. API keys cannot call this operation.

Authorizations

Authorization
string
header
required

ID token of a signed-in dashboard user. Operations that API keys cannot call use it.

Headers

Idempotency-Key
string

Optional on every POST: 1-255 printable ASCII characters without spaces (a UUID is recommended). The same key with the same request replays the stored response for 24 hours. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]{1,255}$

Body

application/json

Create an API key.

name
string
required

1-80 characters.

Maximum string length: 80
scopes
string[]
required

1-100 scopes.

Required array length: 1 - 100 elements

Delegable permission you hold.

expiresAt
string<date-time> | null

Optional expiry, at most 2 years ahead.

Example:

"2026-11-01T00:00:00Z"

Response

Success.

Single-object envelope around ApiKeyWithSecret.

data
object
required

An API key with its secret, returned only by create and :roll.