TANITARDevelopers
WebhooksEvent catalogevent

event.page-state-changed

Version 1 of the event.page-state-changed webhook event.

The event.page-state-changed event.

Event typeevent.page-state-changed
Schema version1
Routing keyevent.event.page-state-changed.v1
Produced byevent-management-service
Schemaurn:defendr:contract:event:page-state-changed:1

data fields

FieldTypeRequiredDescription
accountIdstringyes
eventIdstringyes
headRevisionintegeryes
draftRevisioninteger or nullyes
publishedRevisioninteger or nullyes
operation"save", "reset", "restore", "publish", "withdraw"yes
updatedAtstring (date-time)yes
updatedByobjectyes
updatedBy.namespace"api_key", "clerk_user", "player"yes
updatedBy.idstringyes

Some fields are required only in particular states. The JSON Schema below is authoritative.

Example delivery

Signed with the example secret whsec_placeholder_example_webhooks_signing_secret, so you can check your verifier against it. See Verifying signatures.

POST /your/webhook/endpoint HTTP/1.1
content-type: application/json
webhook-id: whd_00000000-0000-4000-8000-000000000005
webhook-timestamp: 1800000000
webhook-signature: v1,ES5Y0iMobmuiCT9NcDD4SD1ZmgYhuxHE2+KoqLMX/K0=
tanitar-event-type: event.page-state-changed
tanitar-schema-version: 1
tanitar-delivery-attempt: 1

{"messageId":"evt_00000000-0000-4000-8000-000000000005","kind":"event","type":"event.page-state-changed","schemaVersion":1,"occurredAt":"2027-01-15T10:00:00.000Z","producer":"event-management-service","accountId":"acc_11111111-1111-4111-8111-111111111111","correlationId":"corr_00000000-0000-4000-8000-000000000005","data":{"accountId":"account_example","eventId":"evt_example","headRevision":2,"draftRevision":1,"publishedRevision":1,"operation":"publish","updatedAt":"2026-10-26T12:00:00Z","updatedBy":{"namespace":"api_key","id":"key_example"}}}

The same body, formatted:

{
  "messageId": "evt_00000000-0000-4000-8000-000000000005",
  "kind": "event",
  "type": "event.page-state-changed",
  "schemaVersion": 1,
  "occurredAt": "2027-01-15T10:00:00.000Z",
  "producer": "event-management-service",
  "accountId": "acc_11111111-1111-4111-8111-111111111111",
  "correlationId": "corr_00000000-0000-4000-8000-000000000005",
  "data": {
    "accountId": "account_example",
    "eventId": "evt_example",
    "headRevision": 2,
    "draftRevision": 1,
    "publishedRevision": 1,
    "operation": "publish",
    "updatedAt": "2026-10-26T12:00:00Z",
    "updatedBy": {
      "namespace": "api_key",
      "id": "key_example"
    }
  }
}

JSON Schema

urn:defendr:contract:event:page-state-changed:1
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "accountId",
    "eventId",
    "headRevision",
    "draftRevision",
    "publishedRevision",
    "operation",
    "updatedAt",
    "updatedBy"
  ],
  "properties": {
    "accountId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "eventId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "headRevision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "draftRevision": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "publishedRevision": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "operation": {
      "enum": [
        "save",
        "reset",
        "restore",
        "publish",
        "withdraw"
      ]
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedBy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "namespace",
        "id"
      ],
      "properties": {
        "namespace": {
          "enum": [
            "api_key",
            "clerk_user",
            "player"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        }
      }
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:defendr:contract:event:page-state-changed:1",
  "title": "EventPageStateChanged"
}

On this page