Rotate API key
POST/v1/api_keys/:id/rotate
Issues a successor key (same name and settings) and keeps the previous one working for grace_days days (default 7, max 30). Only an active key rotates (409). The new secret is returned ONCE.
Request
Responses
- 200
- 401
- 403
- 404
- 409
- 422
- 429
- 500
The successor key with its secret in key, and previous_key with the grace period of the old one.
Missing or invalid bearer token.
Token is valid but lacks permission for this operation.
Resource not found in the current organization.
The current state of the resource does not allow this operation.
Request body failed validation.
Rate limit exceeded.
Unexpected server error.