Skip to main content

Subscription Event Format

For the canonical AI-friendly schema reference, see Subscription Event Schema.

GraphQL subscriptions return a thin delivery wrapper and a JSON-encoded event envelope.

Delivery Wrapper

User feed responses look like:

{
"data": "{\"version\":\"1.0\",\"eventId\":\"evt...\",\"timestamp\":\"2026-04-24T10:38:36.822Z\",\"level\":\"INFO\",\"event\":\"recipientVisiting\",\"category\":\"recipientLifecycle\",\"groupId\":\"grp...\",\"userId\":\"usr...\",\"requestId\":null,\"batchId\":null,\"error\":null,\"data\":{\"id\":\"rec...\",\"documentId\":\"doc...\",\"documentName\":\"Example document\",\"firstName\":\"Ada\",\"lastName\":\"Lovelace\"}}",
"userId": "..."
}

Group feed responses use groupId instead of userId in the outer wrapper.

The wrapper identifies the subscription channel. The inner data string is the canonical event payload.

Event Envelope

After parsing data, you receive:

{
"version": "1.0",
"eventId": "evt...",
"timestamp": "2026-04-24T10:38:36.822Z",
"level": "INFO",
"event": "recipientVisiting",
"category": "recipientLifecycle",
"groupId": "grp...",
"userId": "usr...",
"requestId": null,
"batchId": null,
"error": null,
"data": {
"id": "rec...",
"documentId": "doc...",
"documentName": "Example document",
"firstName": "Ada",
"lastName": "Lovelace"
}
}

Envelope Fields

FieldDescription
versionEvent envelope version. Currently 1.0.
eventIdStable logical event ID. Fanout copies of the same event share the same value.
timestampISO-8601 event timestamp.
levelEvent severity. Currently usually INFO.
eventCanonical event name such as documentArchived or uploadCompleted.
categoryEvent family. This describes how to interpret data.
groupIdGroup context when applicable.
userIdUser context when applicable.
requestIdRequest correlation ID when available.
batchIdBatch context when available.
errorError payload when applicable, otherwise null.
dataCategory-specific payload.

Categories

Current categories:

  • document
  • recipient
  • documentLifecycle
  • recipientLifecycle
  • template
  • task
  • upload
  • credit

category tells you what object or workflow the event is about. event tells you what happened.

Data Shapes

data is category-specific and forward-extensible:

  • Producers may add fields over time.
  • Producers should not remove existing fields incompatibly.
  • Consumers should ignore fields they do not recognise.

Current base shapes:

// document
{ "id": "doc..." }

// recipient
{ "id": "rec...", "documentId": "doc..." }

// documentLifecycle
{ "id": "doc...", "documentName": "Example document" }

// recipientLifecycle
{
"id": "rec...",
"documentId": "doc...",
"documentName": "Example document",
"firstName": "Ada",
"lastName": "Lovelace"
}

// template
{ "id": "tpl..." }

// task
{ "id": "tsk...", "code": "TSKPROCESSOK", "documents": [] }

// upload
{ "id": "tmp...", "key": "upload/usr.../tmp....pdf", "code": "UPLOADOK" }

// credit
{ "credit": 172 }

Richer lifecycle data is currently populated most consistently for documentLifecycle and recipientLifecycle events.

Export This Article

Save a copy of this page as PDF or plain text.