Update BYOK key
Updates a BYOK key’s metadata and routing state
name, is_default, account_tier, or disabled state.
Requires byok:write scope. Naturally idempotent (last write wins). Audit event: byok_key.updated.
disabled: true excludes the key from routing without deleting it; the secret stays encrypted at rest. A disabled key can’t be set as default unless the same request re-enables it.202 with propagation_status: "pending" while the change takes effect. Propagation completes within about 5 minutes.Authorizations
API key authentication.
Keys start with ak_ prefix.
Example: Authorization: Bearer ak_live_xxxxxxxxxxxx
Path Parameters
Workspace identifier
BYOK key identifier
Body
At least one field is required. Provider secret fields are rejected — secrets are immutable.
New human-readable name
1 - 100Promote (true) or demote (false) this key as the provider's routing default
Provider account tier from the tiers endpoint
Disable (true) to exclude the key from routing without deleting it
Response
OK
BYOK key metadata. Redacted — the provider secret is never returned.
Unique identifier for the BYOK key
Workspace this key belongs to
Provider identifier
Human-readable name for the key
Masked display prefix of the submitted secret
Whether this key is the provider's default for routing
Disabled keys are excluded from routing; the secret stays encrypted at rest
Coarse validation status (no provider diagnostics)
valid, pending, invalid, error Provider account tier used for rate-limit and data-policy routing
How the tier was determined
auto_detected, user_specified, fallback, null When the key last passed validation (null if never)
"pending" while a routing-affecting change for this key's provider is committed but edge propagation has not yet been applied
pending, null