Update API Key
Updates an API key's name, permissions, API version, expiration, or IP allowlist. Fields that are omitted keep their current value; default keys cannot be modified.
Request body
Dated API version used when requests authenticated with this key omit the Api-Version-Date header. New keys default to the latest version.
When the API key should stop working, as an ISO 8601 timestamp. Omit (or pass null on update) for a key that never expires.
IPv4/IPv6 CIDR ranges allowed to use this key, for example ["203.0.113.0/24"]. Empty or null allows any IP.
A new human-readable name for the API key.
Example request
{
"api_version_date": "2026-08-10"
}Response
api key updated
Dated API version used when requests authenticated with this key omit the Api-Version-Date header.
When the API key was created, as an ISO 8601 timestamp.
When the API key stops working, as an ISO 8601 timestamp. null means it never expires.
API key ID, prefixed apik_.
Whether this is the resource's default API key. Default keys cannot be updated or deleted, only rotated.
Human-readable name identifying the API key, or null when none was set.
Masked version of the secret key, so the key can be recognized without revealing the full secret.
The full secret used to authenticate requests. Returned only once, on create and rotate responses — store it immediately.
System role the key inherits its permissions from, or null when it uses an explicit permissions policy. Only account API keys can use a system role.
When the API key was last updated, as an ISO 8601 timestamp.
Example response
{
"api_version_date": "2025-01-01",
"system_role": "owner"
}