Skip to main content
POST
/
v1
/
api-keys
Create API key
curl --request POST \
  --url https://api.example.com/v1/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": []
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "key_prefix": "<string>",
  "status": "<string>",
  "scopes": [
    "<unknown>"
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "key": "<string>",
  "last_used_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required
scopes
string[]

Response

Successful Response

Returned only at creation time. Includes the full key — shown once.

id
string<uuid>
required
workspace_id
string<uuid>
required
name
string
required
key_prefix
string
required
status
string
required
scopes
any[]
required
created_at
string<date-time>
required
key
string
required
last_used_at
string<date-time> | null