Skip to main content
POST
/
v1
/
api-keys
Create an API Key
curl --request POST \
  --url http://localhost:3000/v1/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "ci-pipeline",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "team_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "operation": "read_render"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "key": "ak_7f9ba3271cf881309d9be8c9c0fcae47a95b8d29c3f0b2da8e89cf21e5c3df01",
  "operation": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Use an access token retrieved from login (Bearer sess_...) or a programmatic API key (Bearer ak_...).

Body

application/json
name
string
required

Descriptive name for the key.

Example:

"ci-pipeline"

org_id
string<uuid>
required
team_ids
string<uuid>[]
operation
enum<string>
default:read_render
Available options:
read_render,
all,
admin

Response

API key created successfully

id
string<uuid>
required

Unique API Key identifier.

name
string
required

Human-readable name of the key.

key
string
required

The fully generated secure raw API Key string. This is returned ONLY ONCE.

Example:

"ak_7f9ba3271cf881309d9be8c9c0fcae47a95b8d29c3f0b2da8e89cf21e5c3df01"

operation
string
required
created_at
string<date-time>
required

Timestamp of creation.