Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Headers

Idempotency-Key
string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Maximum string length: 255

Body

application/json
name
string | null

Optional human-readable label for the key. Defaults to "Default" when omitted.

kind
enum<string>
default:personal

personal acts as you. team is for shared automations: it sees and creates only what the whole account sees, and cannot run scripts.

Available options:
personal,
team
scopes
enum<string>[]

What the key may call, as <resource>:<action>: read (every GET), write (create, change, delete; includes read), agent:run (chats, messages, run control, the AI gateway's crevio model), scripts:run (script runs), models:run (raw models through the AI gateway), connections:read and connections:run (list the team's connections, call their tools), files:read (artifact downloads), audit:read (GET /logs). run scopes are never implied by read or write. Omit to copy the calling key's scopes. A key can only grant scopes it holds.

Available options:
read,
write,
agent:run,
scripts:run,
models:run,
connections:run,
connections:read,
files:read,
audit:read

Response

API key created (includes the full secret)

object
string
required
id
string
required
name
string | null
required
last4
string
required
token_type
string
required
kind
enum<string>
required

personal acts as the person who made it; team sees only what the whole account sees.

Available options:
personal,
team
scopes
string[] | null
required

What the key may call. Null for a key made before scopes existed, which reaches everything.

token
string | null
required
last_used_at
string | null
required
expires_at
string | null
required
created_at
string
required