Skip to main content

Rotate an API key

POST 

/api-key/:keyId/rotate

Creates a replacement key with the same scopes and either revokes the old key immediately (default) or keeps it usable until gracePeriodExpiresAt. The new plaintext key is returned ONLY in this response and can never be retrieved again.

Request

Responses

Key rotated. data.newKey.key contains the new plaintext key, shown only once.