Skip to content
Website API / Site keys

Create a site key

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

A new key that reads analytics and sends goals, payments and identify calls for this website only. secret is shown once (Cache-Control: no-store). Needs the admin role.

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

Try in playground

Request

Path parameters

websitestringrequired

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

1–253 characters

Headers

Authorizationstringrequired

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

Content-Typestringrequired

Send the body as JSON.

One of: application/json

Body fields

namestringrequired

1–60 characters

Response

The key and its 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