Skip to main content
POST
/
v1
/
account
/
api-key
Mint User Session Api Key
curl --request POST \
  --url https://api.example.com/v1/account/api-key \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "key_prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "key": "<string>"
}

Headers

authorization
string | null
refresh-token
string | null

Body

application/json

POST /v1/account/api-key — mint a new API key for the caller's org.

name
string
required

Human-readable label for the key.

Required string length: 1 - 120

Response

Successful Response

Returned once by POST /v1/account/api-key.

Carries the plaintext key exactly once, at creation — it is hashed server-side and never retrievable again. Later reads return :class:ApiKeyResponse (metadata only, no secret).

id
required
name
string
required
key_prefix
string
required

Masked prefix shown in listings, e.g. op_live_ab…1234.

created_at
string<date-time>
required
key
string
required

Plaintext API key; shown only at creation.