Skip to main content
Key rotation lets you replace an API key without interrupting service. You generate a new key while the previous one stays valid for a grace period, then the old key expires automatically.

How rotation works

1

Call the rotate endpoint

Authenticate with your existing key and call Rotate API Key. A new key is generated and the previous key is marked Rotating.
2

Switch to the new key

Both keys are accepted during the grace period. Update your configuration and start using the new key.
3

The old key expires

When the grace period ends, the old key becomes Expired and only the new key is accepted.

Rotate an API key

POST /api/v1/api-keys/rotate Generates a new API key and marks the existing key as Rotating. Both keys remain valid until the grace period expires.
The new key is returned only in this response. Store it securely. It can’t be retrieved or shown again, so if you lose it you must rotate again.

List API keys

GET /api/v1/api-keys Returns every API key on your account, including keys that are mid-rotation. A key’s status is Active, Rotating, Expired, or Revoked.

Revoke an API key

DELETE /api/v1/api-keys/{id} Immediately revokes a key before its scheduled expiry.

Rules

Audit log

Every rotation action is written to your audit log.

Errors

Example error
Last modified on November 10, 2026