Rotate API key
Replace an API key’s secret.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
Path Parameters
Body
Response
The rotated key. It keeps its id and name, and the new secret is in secret.
The key's lifecycle state. active: the current secret authenticates. rotating: the key was rotated and the previous secret still authenticates until previousKeyExpiresAt. expired: expiresAt has passed, no secret authenticates, and the key can't be rotated.
active, rotating, expired "active"
When the key stops authenticating. null means the key never expires. Set when the key is created or rotated, and must be in the future. When the request is authenticated with an API key that expires, the result can't be later than that key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to keep the current one. It can't be changed with an update; rotate the key instead.
"2027-01-01T00:00:00Z"