Rotate API Key
POST/v1/api-keys/:key_id/rotate
Rotate an API key.
Creates a new key with the same configuration. The old key enters a grace period (default: 24 hours) during which both keys work. After the grace period, the old key is automatically deactivated.
The new key is returned in the response — store it securely.
Request
Responses
- 200
- 400
- 404
- 422
New key created. Old key enters grace period.
Cannot rotate an inactive key.
API key not found.
Validation Error