A webhook sends what happens in Zinn® Campaigns to your own app as it happens. Use it to update your CRM when someone unsubscribes, to start an onboarding flow when someone signs up, or to clean an address that bounced.
1. Add a webhook
- Open Campaigns, then the Webhooks tab.
- Give it a name and the address of your endpoint. It must start with
https:// and must not contain a user name or password.
- Tick the events you want, then press Add webhook.
- Copy the signing secret straight away. It is shown only once. If you lose it, press New secret; the old secret stops working at once.
You need permission to manage Campaigns to add, change or remove a webhook. Anyone who can view Campaigns can read the delivery log.
2. The events
contact.subscribed: a person signs up through one of your forms.
contact.unsubscribed: a person unsubscribes.
campaign.sent: a campaign has finished sending.
email.bounced: an e-mail to a contact bounced.
email.complained: a contact marked an e-mail as spam.
Press Send a test to post a webhook.test event to your endpoint. It is sent within a minute and shows in the delivery log.
3. What we send
Each event is an HTTPS POST with a JSON body:
{"event": "contact.unsubscribed", "occurred_at": "2026-12-06T10:00:00+00:00", "data": {...}}
and these headers:
X-Zinn-Event: the event name.
X-Zinn-Delivery: a unique id for the delivery. A retry keeps the same id, so use it to ignore a post you already handled.
X-Zinn-Timestamp: when we signed it (Unix seconds).
X-Zinn-Signature: sha256= followed by the signature.
4. Check that a post is really from us
Make an HMAC-SHA256 with your signing secret over the timestamp header, a full stop, and the raw request body exactly as received. It must equal the signature header after sha256=. Compare in constant time, and reject a timestamp more than a few minutes old.
import hashlib, hmac
def is_from_zinn(secret: str, headers: dict, raw_body: bytes) -> bool:
timestamp = headers["X-Zinn-Timestamp"]
expected = hmac.new(
secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256
).hexdigest()
given = headers["X-Zinn-Signature"].removeprefix("sha256=")
return hmac.compare_digest(expected, given)
5. Failures, retries and the log
Answer with any 2xx status within a few seconds. Anything else counts as a failure, and we try again later, up to 5 tries in all over about 3 hours. Every try is in the Delivery log with the status code your endpoint answered.
If 20 deliveries in a row fail, the webhook is stopped so it does not keep hitting a broken endpoint. Fix the endpoint, then press Resume. Any delivery in the log can be sent again with Send again; it goes out as a new delivery that names the original.
The log keeps 30 days of deliveries. Press Pause to stop posting for a while without losing the webhook or its secret.