Skip to main content
key_revoked means you tried to rotate a key that has already been revoked. Read this page if a rotation script fails with a 409.

What happened

Route: POST /v1/keys/{key_id}/rotate. Revoking a key is final. A revoked key cannot be rotated, re-enabled or given a new secret; it stays in the key list with state: "revoked" as an audit record. Nothing changed. This code appears only on rotation. A request authenticated with a revoked key gets invalid_credential, not key_revoked.

How to fix

  1. Create a new key with POST /v1/keys, with the scopes the old key had. The old key’s scopes are still listed on it.
  2. Store the new secret; it is shown once.
  3. Deploy it to the services that used the old key.
In a rotation script, skip keys whose state is revoked before calling rotate.

Example

Replacing a revoked key with a new one that has the same name and scopes. The calls need keys_read and keys_write.