ApiKeys

Rotate an API key

Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.

POST
/v1/api-keys/{id}/rotate

Issues a replacement with the same owner, name, and access, then deactivates the existing key. Returns the new key, including the plaintext secret.

x-api-key<token>

In: header

Path Parameters

id*string
Match^key_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/api-keys/string/rotate"
{  "id": "string",  "name": "string",  "key": "string",  "start": "string",  "description": "string",  "createdAt": "string",  "expiresAt": "string",  "lastUsedAt": "string",  "isActive": true,  "access": {    "mode": "full"  },  "owner": {    "id": "string",    "name": "string",    "email": "string"  }}

Related documentation