Keys

Rotate the current credential without losing account history

Requires scope account:manage. Atomically revokes the calling key and returns one replacement secret bound to the same account.

POST/api/v1/keys/rotateTry it
iNote
Requires a key with the account:manage scope, sent as Authorization: Bearer <api-key>. Keys missing the scope are rejected with 403 — see Authentication.

Errors

CodeMeaning
400Credential cannot be rotated, for example a server-configured static key.
401Invalid or missing API key.
403The API key lacks the required scope for this operation.
cURL
curl -X POST https://gateway.kepto.xyz/api/v1/keys/rotate \
  -H "Authorization: Bearer <api-key>"
201 · application/json
{
  "apiKey": "string",
  "key": {
    "id": "string",
    "name": "string",
    "prefix": "string",
    "scopes": [
      "account:manage"
    ],
    "createdAt": 0,
    "lastUsedAt": 0,
    "revokedAt": 0,
    "rotatedFrom": "string"
  },
  "freeTierMaxBytes": 0
}