v1
latestOpenAPI 3.0.32026-07-17183583.3 KBApiKeys
Rotate Issued API Key
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
- AdminRevokeIssuedApiKey to remove the old key
POST /v2alpha1/admin/issuedApiKeys/01HQZX9VYQKJB8XQZQXQZQXQXQ:rotate
{
"scopes": ["read"]
}
post/v2alpha1/admin/issuedApiKeys/{key_id}:rotate
Path parameters
key_idstring required
key_id is the ID of the existing API key to rotate
Request body
Response
A successful response.