Skip to main content
POST
/
api
/
v1
/
api-keys
/
{id}
/
rotate
Rotate an API key. Creates a new key and revokes the old one.
curl --request POST \
  --url https://api.backside.app/api/v1/api-keys/{id}/rotate \
  --header 'Authorization: Bearer <token>'
{
  "new_key": {
    "created_at": "2023-11-07T05:31:56Z",
    "environment": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "key": "<string>",
    "key_hint": "<string>",
    "name": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "scopes": [
      "<string>"
    ]
  },
  "revoked_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

API key ID to rotate

Response

Key rotated

new_key
object
required
revoked_key_id
string<uuid>
required