Skip to main content
PATCH
Update an API key
This endpoint requires a management API key. Standard Gateway API keys are not accepted.
Use this route to rename a key, adjust scopes, set expiry, disable it, or set a spend limit with limit and limit_reset.

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

id
string
required

API key identifier or hash.

Body

application/json
name
string
Minimum string length: 1
scopes
Example:

"[\"chat.completions\",\"responses\"]"

limit
number | null

Optional spend limit in USD for this key. Set null to clear.

Required range: x >= 0
limit_reset
enum<string>

Period used for the spend limit window.

Available options:
daily,
weekly,
monthly
include_byok_in_limit
boolean

Accepted for compatibility. Current Phaseo behavior always excludes BYOK from this limit field.

expires_at
string<date-time> | null
disabled
boolean
soft_blocked
boolean

Response

Updated API key metadata

data
object
required
Last modified on July 26, 2026