ApiKeys

Rotate an API key

Issues a replacement with the same owner, name, and permissions, 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 permissions, 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

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,  "permissions": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "roleName": "string"}