v4

OpenAPI 3.1.02026-07-3163216290.7 KB
Webhooks

Email unsubscribed

Sent when a recipient unsubscribes from marketing email or a mailing list using an email's "Unsubscribe" link. A contact.unsubscribed or contact.mailingList.unsubscribed event will also be sent depending on whether the email was sent to a mailing list. Not available for transactional emails because unsubscribe links are not included for transactional emails. Contains sourceType and the related campaignId or loopId (workflow ID), plus contactIdentity and email objects.

postWebhookemailUnsubscribed

Headers

webhook-idstring required

Unique message ID. Use to deduplicate deliveries.

webhook-timestampstring required

Unix timestamp of when the message was sent.

webhook-signaturestring required

HMAC signature for verifying the request. Verify using your endpoint signing secret from the Loops dashboard.

Payload

eventName'email.unsubscribed' required
eventTimeinteger required

Unix timestamp in seconds.

webhookSchemaVersion'1.0.0' required
sourceType'loop' | 'campaign' required

The type of email this event relates to. Workflow emails use loop. Not available for transactional emails.

campaignIdstring

The ID of the campaign if sourceType is campaign.

loopIdstring

The ID of the workflow if sourceType is loop.

Response

Webhook received successfully. Return any 2xx status code to acknowledge delivery.