Payload JSON Schema
This schema is generated from the reviewed event authority for Cortex API 18.303.2 (865c6e284bf10cfbea9888c88a3e3794c29cd652). It ties each event name to its ID type and permits deltas only on the four order-update events.
Required top-level fields are id, idType, additionalMetadata, event, eventDate, and svixAppId. organizationId is optional for compatibility with earlier payloads; current producers include it. metadata is optional. svixAppId identifies the Svix application and is not a signing secret.
For delta operations, before and after are independently optional. An undefined side is omitted during JSON serialization; an actual null value remains null. The schema does not make metadata or metadata.delta nullable.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Cerebrum compact event webhook",
"description": "Reviewed against cerebruminc/cortex-api 865c6e284bf10cfbea9888c88a3e3794c29cd652 (API 18.303.2). All published fixtures are synthetic.",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"idType",
"additionalMetadata",
"event",
"eventDate",
"svixAppId"
],
"properties": {
"id": {
"type": "string",
"description": "Entity identifier; interpret it using idType."
},
"idType": {
"type": "string",
"enum": [
"order",
"invite",
"beamInput",
"report"
]
},
"organizationId": {
"type": "string",
"description": "Event organization context. Optional for compatibility with earlier payloads; current producers include it. It remains the child organization during CRA signing delegation."
},
"additionalMetadata": {
"type": "object",
"additionalProperties": true,
"description": "Creation metadata or event-specific correlation/error data."
},
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"delta": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"op",
"path"
],
"properties": {
"op": {
"type": "string",
"enum": [
"add",
"remove",
"replace",
"move",
"copy",
"test"
]
},
"path": {
"type": "string",
"description": "RFC 6901 JSON Pointer. Escape ~ as ~0 and / as ~1."
},
"before": {
"description": "Previous mapped value. Omitted when undefined, including add operations; null is retained when it is the actual value."
},
"after": {
"description": "New mapped value. Omitted when undefined, including remove operations; null is retained when it is the actual value."
}
}
}
}
}
},
"event": {
"type": "string",
"enum": [
"ORDER_STATUS_CHANGE",
"ORDER_SCORE_CHANGE",
"ORDER_CUSTOM_SCORE_CHANGE",
"ORDER_DISPUTE_RESOLVED",
"ORDER_ERROR",
"VOUCHER_REDEEMED",
"VOUCHER_ACCEPTED",
"VOUCHER_STARTED",
"VOUCHER_CANCELED",
"VOUCHER_EXPIRED",
"VOUCHER_OPTED_OUT",
"BEAM_INPUT_CREATED",
"MONITORING_REPORT_GENERATED"
]
},
"eventDate": {
"type": "string",
"format": "date-time"
},
"svixAppId": {
"type": "string",
"description": "Svix application identifier. This is not a signing secret."
}
},
"oneOf": [
{
"title": "ORDER_STATUS_CHANGE (order)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"ORDER_STATUS_CHANGE"
]
},
"idType": {
"enum": [
"order"
]
}
}
},
{
"title": "ORDER_SCORE_CHANGE (order)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"ORDER_SCORE_CHANGE"
]
},
"idType": {
"enum": [
"order"
]
}
}
},
{
"title": "ORDER_CUSTOM_SCORE_CHANGE (order)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"ORDER_CUSTOM_SCORE_CHANGE"
]
},
"idType": {
"enum": [
"order"
]
}
}
},
{
"title": "ORDER_DISPUTE_RESOLVED (order)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"ORDER_DISPUTE_RESOLVED"
]
},
"idType": {
"enum": [
"order"
]
}
}
},
{
"title": "ORDER_ERROR (order)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"ORDER_ERROR"
]
},
"idType": {
"enum": [
"order"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "VOUCHER_REDEEMED (invite)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"VOUCHER_REDEEMED"
]
},
"idType": {
"enum": [
"invite"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "VOUCHER_ACCEPTED (invite)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"VOUCHER_ACCEPTED"
]
},
"idType": {
"enum": [
"invite"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "VOUCHER_STARTED (invite)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"VOUCHER_STARTED"
]
},
"idType": {
"enum": [
"invite"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "VOUCHER_CANCELED (invite)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"VOUCHER_CANCELED"
]
},
"idType": {
"enum": [
"invite"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "VOUCHER_EXPIRED (invite)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"VOUCHER_EXPIRED"
]
},
"idType": {
"enum": [
"invite"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "VOUCHER_OPTED_OUT (invite)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"VOUCHER_OPTED_OUT"
]
},
"idType": {
"enum": [
"invite"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "BEAM_INPUT_CREATED (beamInput)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"BEAM_INPUT_CREATED"
]
},
"idType": {
"enum": [
"beamInput"
]
}
},
"not": {
"required": [
"metadata"
]
}
},
{
"title": "MONITORING_REPORT_GENERATED (report)",
"required": [
"event",
"idType"
],
"properties": {
"event": {
"enum": [
"MONITORING_REPORT_GENERATED"
]
},
"idType": {
"enum": [
"report"
]
}
},
"not": {
"required": [
"metadata"
]
}
}
]
}