Pular para o conteúdo principal
PATCH
Core - Disable a key
Guia relacionado: Guia de chaves de API. Consulte o Guia de chaves de API para ver um passo a passo com exemplos.

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de caminho

api_key_id
string
obrigatório

Unique identifier of the API key.

Corpo

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.

Opções disponíveis:
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.

Opções disponíveis:
active,
disabled,
revoked

Resposta

API key updated successfully.

id
string
obrigatório
name
string
obrigatório
workspace_id
string
obrigatório
token
string
obrigatório

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>