patient.unsubscribed
When Signals sends patient.unsubscribed, its payload and how to handle it in Node.js, Python and Java.
A patient is detached from the subscriber.
Payload
Every delivery is the envelope type, timestamp, sequence and data; the delivery's id is the webhook-id header. See Verify webhooks.
{
"type": "patient.unsubscribed",
"timestamp": "2026-10-25T08:00:02.000Z",
"sequence": 1055,
"data": {
"patient": "6f1c2a8e-3b7d-4c55-9a0e-2d4b8f6e1a90",
"subscriber": "ovok-sub-4f2a9c"
}
}The fields are those of patient.subscribed.
Handle the event
Verify the delivery first (Verify webhooks), then act on the verified event as in Handle an event.
export async function handle(webhookId, event) {
if (!(await firstTime(webhookId))) return;
const { data } = event;
switch (event.type) {
case 'patient.unsubscribed':
await untrackPatient(data.patient);
break;
default:
break;
}
}Related
Last updated on