Skip to main content
POST
Create an API key

Authorizations

X-API-Key
string
header
required

Body

application/json
name
string
required

The unique name of the API key.

Required string length: 1 - 255
expire_at
string<date-time> | null

The date and time when the API key will expire. If not provided, the API key will never expire.

scope
enum<string> | null

What the key may do. Defaults to the most the workspace's plan allows: write on a paid plan, read on the free plan.

Available options:
read,
write

Response

Successful Response

A key the moment it is made: the only response that carries the secret.

Its own schema rather than a nullable field on APIKeyRead, so no read route can grow a path that serves the value back by accident.

created_at
string<date-time>
required
id
string<uuid>
required
key
string
required

The key's value. Shown here and nowhere else, ever: only a hash is stored. Copy it now; a lost key has to be replaced.

key_prefix
string
required

The first characters of the key's value, so it can be told apart from another in a list. The value itself is shown once, when the key is created, and is not recoverable afterwards.

name
string
required
org_id
string
required
scope
enum<string>
required

What the key may do. A read key may call read endpoints only; a write key may call everything the workspace's plan allows.

Available options:
read,
write
updated_at
string<date-time>
required
expire_at
string<date-time> | null
last_used_at
string<date-time> | null

When this key last authenticated a request, to the minute.