Rotate an API key
POST/v1/api-keys/:api_key_id:rotate
Issues a new secret for the same key record (same id, scope and capabilities) and invalidates the previous secret. The new raw key is returned only in this response.
Refused for a connected app, like creation: rotation returns a raw secret for a key the caller need never have held, so it reaches the same place by another door.
Request
Responses
- 200
- 401
- 403
- 404
Rotated. The new raw key value is only returned here.
Missing or invalid credentials.
Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
The resource does not exist (existence is not leaked).