Rotate Issued API Key
POST/v2alpha1/admin/issuedApiKeys/:key_id:rotate
Generates a new secret for an issued API key. Creates a new API key with a new key_id and secret, and immediately revokes the old key. This is the recommended way to update scopes, metadata, or rotate credentials.
For zero-downtime rotation, use this workflow instead:
- IssueAPIKey with new credentials
- Deploy new secret to all services
- Verify new secret works everywhere
- RevokeAPIKey to remove the old key
Request
Responses
- 200
- 201
- default
A successful response.
API key rotated successfully. New key issued, old key revoked.
An unexpected error response.