Update an API key.
Update an API key. Send name to rename it; at least one field must be provided. Changing a key’s expiry with expires_at is deprecated in 26.28; removal no earlier than 26.32: a key’s expiry will be fixed at creation. To change a key’s expiry, create a new key and revoke the old one. An expired key can only be revoked, so renaming it returns 422; until expires_at is removed, it can still renew an expired key.
Authorizations
Path Parameters
The public API key identifier (e.g. fkh_a1b2c3d4). Used for lookups, deletion, and updates.
Public API key identifier (e.g. fkh_a1b2c3D4). Composed of the prefix (e.g. "fkh_") followed by a base64url-encoded random suffix containing uppercase and lowercase letters, digits, hyphens, and underscores. Used for lookups, deletion, and updates.
12 - 16^[a-z0-9]+_[A-Za-z0-9_-]+$Body
At least one field must be provided. Only the fields included in the request are updated. Unknown fields return a 400.
User-assigned label for the API key. Must be unique per user per organization. Must start with a letter (A-Z or a-z). After that, letters, digits, spaces, hyphens, and underscores are allowed. Leading and trailing whitespace is stripped by the server before saving.
1 - 128^[A-Za-z][A-Za-z0-9_ -]*$Deprecated in 26.28; removal no earlier than 26.32. A key's expiry will be fixed at creation. To change it, create a new key and revoke the old one. Until removal, the new expiration timestamp must be a future timestamp (greater than the current time) and cannot exceed 100 years from now. Until removal, this can also renew an expired key. Service-account keys can't be renewed; replace them with a new key.
Response
API key updated successfully.