Replaces a project API key by a new one.
HTTP
POST /projects/{projectId}/api-keys/{keyId}/rotateAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Project manager.
The new key has the same name, scopes, owner and lifetime as the old one. If the organisation limits the lifetime of API keys, the new key lives at most that long. The old key stops working at once. The new value is shown only in this response.
Response 201 #
JSON
{ "token": "ct_live_...", "keys": [] }token is the new key. keys is the list as the list route gives it.
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 403 | forbidden | You are a member of the project, but not a manager. |
| 404 | not_found | There is no such key in this project, or an id is not a UUID. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.