Skip to content
Website API / Site keys

Roll a site key

POSThttps://<your Reveata origin>/api/v1/websites/{website}/site-keys/{keyId}/roll

Replaces the secret: the old one stops working at once. The new secret is shown once. Needs the admin role.

Related: List site keys and Create a site key in Site keys.

Try in playground

Request

Path parameters

websitestringrequired

Website id or domain, e.g. example.com

1–253 characters

keyIdstringrequired

Pattern: ^[a-f0-9]{24}$

Headers

Authorizationstringrequired

Bearer followed by an account token or an OAuth access token with the api_keys:write scope.

Response

The key and its new secret.

{
  "status": "string",
  "data": {
    "key": {
      "id": "string",
      "siteId": "string",
      "name": "string",
      "maskedKey": "string",
      "createdBy": "string",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "lastUsedAt": "2026-01-01T00:00:00.000Z",
      "rolledAt": "2026-01-01T00:00:00.000Z"
    },
    "secret": "string"
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.keyobject
data.key.idstring
data.key.siteIdstring
data.key.namestring
data.key.maskedKeystring
data.key.createdBystring
data.key.createdAtstring (date-time)
data.key.lastUsedAtstring (date-time) | null | null
data.key.rolledAtstring (date-time) | null | null
data.secretstring