Using Subscriptions
Subscriptions are useful for real-time UX such as:
- upload progress
- async task progress
- document and recipient lifecycle updates
- credit changes
For the payload schema itself, see:
Parse the Inner Event Payload
The subscription field returns:
- a delivery wrapper (
userIdorgroupId) - a JSON string in
data
Always parse the inner data value before handling the event.
const parseEnvelope = (payload) => {
const raw = payload?.data;
if (!raw) return null;
return typeof raw === 'string' ? JSON.parse(raw) : raw;
};
Route by category and event
Treat:
categoryas the event familyeventas the specific action or workflow state
Examples:
category: "upload",event: "uploadCompleted"category: "task",event: "taskCreditBlocked"category: "documentLifecycle",event: "documentCreated"category: "recipientLifecycle",event: "recipientVisiting"
Delivery Rules
subscribeUserFeedis used for user-targeted events such as upload progress and some lifecycle fanout.subscribeGroupFeedis used for group-targeted events such as document, recipient, template, task, credit, and lifecycle updates.- Some events are fanned out to both feeds with the same
eventId.
Compatibility Guidance
If you are migrating from the older flat subscription payloads:
- parse the inner
dataenvelope first - move event routing to
eventinstead of legacysystemMessage - use
categoryto decide how to interpretdata - continue ignoring unknown
datafields
Representative Event Names
Common event names include:
documentArchiveddocumentCancelledrecipientUpdatedrecipientResetdocumentCreateddocumentFinalPdfCreateddocumentRejectedrecipientSentEmailrecipientVisitingrecipientCompletedrecipientRejectedrecipientEmailOpenedtaskDocumentCreatedtaskCompletedtaskStoppedByRecipientStopListtaskTrialCreditBlockedtaskCreditBlockedtemplateArchivedtemplateUpdatedtemplateElementCreatedtemplateElementUpdatedtemplateElementDeletedtemplateRoleCreatedtemplateRoleUpdatedtemplateRoleDeleteduploadScanneduploadTypeCheckeduploadConvertinguploadFlatteneduploadTagsParseduploadPdfMetaExtracteduploadCompleteduploadFailedcreditUpdated
Dedicated workflow guides: