Skip to main content
PATCH
Core - Disable a key
Related guide: API keys guide. See the API keys guide for a walkthrough with examples.

Authorizations

Authorization
string
header
required

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

Path Parameters

api_key_id
string
required

Unique identifier of the API key.

Body

application/json
access
object

Per-domain access level (none, read or write) for restricted keys.

active
boolean

Legacy toggle mirrored onto status: false disables, true re-enables.

constraints
object

Expiry and other limits; null clears them.

name
string

New display name.

Maximum string length: 100
permission_mode
enum<string>

Permission preset; a restricted key must keep at least one granted domain.

Available options:
all,
restricted,
read_only,
PERMISSION_MODE_ALL,
PERMISSION_MODE_RESTRICTED,
PERMISSION_MODE_READ_ONLY
project_scope
object

Projects the key may reach.

status
enum<string>

Lifecycle status; revoked is terminal.

Available options:
active,
disabled,
revoked

Response

API key updated successfully.

id
string
required
name
string
required
workspace_id
string
required
token
string
required

Raw on create; the key prefix on retrieve and update; masked in list responses.

active
boolean
is_legacy
boolean
source
string
budget
object
expiration
string<date-time>
projects
string[]
created_by_id
string | null
updated_by_id
string | null
created
string<date-time>
updated
string<date-time>
consumption
number
token_consumption
number
requests_per_minute_consumption
number
owner
object
project_scope
object
permission_mode
string
access
object
token_prefix
string
status
string
constraints
object
mcp_access
object
legacy_token_family
string
legacy_key_id
string
last_used_at
string<date-time>