Skip to main content
PATCH
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Body

application/json
name
string

A new label for the key.

scopes
enum<string>[]

Replaces the key's scopes. Takes effect on the next request.

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

Response

The updated key

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