Skip to main content
POST
Mint Api Key

Authorizations

Authorization
string
header
required

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

Path Parameters

team_id
string
required

Body

application/vnd.api+json

Request body for minting a new API key.

Send either a flat body {"name": ..., "scopes": [...]} or a JSON:API envelope {"data": {"type": "api_keys", "attributes": {"name": ...}}}.

name is required. scopes defaults to ["*"], expires_at to no expiry, and can_moderate and can_author_events to false.

scopes is a non-empty list drawn from a closed vocabulary. The only scope is "*", full access to the key's team; repeated entries are collapsed to one. Any other value, an empty list, a missing name or a wrong envelope type returns 422.

name
string
required
can_author_events
boolean
default:false
can_moderate
boolean
default:false
expires_at
string<date-time> | null
scopes
string[]
Minimum array length: 1
Allowed value: "*"

Response

Successful Response

data
JsonApiResource[ApiKeyCreateAttributes] · object
required
included
any[] | null
meta
Meta · object | null