Knowledge base

Send Zinn® Campaigns events to your app with webhooks

Get a signed post on your own server when a campaign is sent, a person signs up or unsubscribes, or an e-mail bounces or is marked as spam, with retries and a delivery log.

Zinn®, our Viking, reading his checklist beside an index of articles with one open.

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

  1. Open Campaigns, then the Webhooks tab.
  2. Give it a name and the address of your endpoint. It must start with https:// and must not contain a user name or password.
  3. Tick the events you want, then press Add webhook.
  4. 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.

Latest from the blog

What we have been writing about hosting, SEO and running sites at scale.

SEO and Link Building from the Hosting Layer: A 2026 Operator's View

How hosting shapes indexing and link equity in 2026: keeping pages indexed, vetting aged domains before you build on them, link building without a footprint, and an honest line on what infrastructure can and cannot do for SEO.

Read the post →

Making WordPress Fast and Secure: A Performance and Plugin Checklist

A practical checklist for fast, secure WordPress: server-level caching, a per-site object cache, the handful of plugins worth running, keeping the stack current, and the WooCommerce pages you must never cache.

Read the post →

How to Choose Managed Web Hosting in 2026: A Buyer's Guide

What actually separates good managed hosting from a cheap box with a control panel — migrations, backups, isolation, real caching and honest scaling — and how to judge it before you commit.

Read the post →

Read the blog →

Still stuck?

Support is included on every plan, the desk is open 24 hours a day, and you can write to us in any of our 59 languages — we answer you in yours.

Contact support All articles