# Email event webhooks: setup, signatures, retries

> Send email event webhooks from Inspiremail to your app: add an HTTPS endpoint, pick events, verify the HMAC signature and see how retries and auto-disable work.

Published 2026-11-22, updated 2026-11-23 by Reda El Kasraoui, Founder of Inspiremail. Canonical page: https://inspiremail.io/blog/webhooks-setup

**TL;DR:** open **Settings › Webhooks**, click **Add endpoint**, enter an HTTPS URL, tick the events you want and click save. Copy the signing secret shown once. Inspiremail then POSTs a signed JSON event for each delivery, bounce, complaint, open, click, conversion, unsubscribe or transactional message event, and retries failures for about 22 hours. Verify the `X-Inspiremail-Signature` header on your side before you trust the body.

**A webhook** is an HTTP request Inspiremail sends to your server when something happens, such as a bounce or a click. **A signing secret** is the shared key used to compute the HMAC signature on every request, so your server can tell real events from forged ones.

Webhooks are how your CRM, data warehouse or support tool learns about email events without polling. If you'd rather connect a no-code tool, Zapier and Make subscribe through REST hooks instead; see [Zapier / Make](https://inspiremail.io/integrations/zapier-make).

## Step 1: add the endpoint

:::screenshot{src="https://inspiremail.io/media/blog/2026/11/48c823e3-0fde-43d2-a822-a09d455372fd.webp" alt="Inspiremail Settings › Webhooks with the Add endpoint form: an Endpoint URL field, an optional description, and checkboxes for drop events such as Delivered, Bounced, Complained, Opened, Clicked, Converted, Unsubscribed and Campaign completed, and transactional events from Message sent to Message clicked"}
Settings › Webhooks with the endpoint form open.
:::

:::steps
1. Open **Settings › Webhooks** (owner or Organization Manager) and click **Add endpoint**.
2. Paste the **Endpoint URL**. It must be HTTPS on a public host name: IP addresses, private networks and redirects are refused.
3. Add a **Description** ("CRM sync") so the next person knows what it feeds.
4. Tick the **Subscribed events**. Start small: delivered, bounced, complained and unsubscribed cover most CRM syncs.
5. Save, then copy the **signing secret**. It's shown once.
6. Click **Test ping** to send a `ping` event, and open the **Delivery log** to see the response your server gave.
:::

:::screenshot{src="https://inspiremail.io/media/blog/2026/11/e3d0fe9f-5412-4555-a567-a598fbfa24a1.webp" alt="Webhooks page listing the endpoint https://hooks.example.com/inspiremail described as CRM sync, active, subscribed to delivered, bounced, complained and unsubscribed, with the time of the last successful delivery"}
An active endpoint (fictitious demo data). The delivery log keeps the last 100 attempts.
:::

## Step 2: verify the signature

Every request carries three headers: `X-Inspiremail-Signature`, `X-Inspiremail-Event` (the event type) and `X-Inspiremail-Delivery` (the event ID, useful for de-duplication). The signature looks like `t=1795350000,v1=5f2b…`, where `v1` is the hex HMAC-SHA256 of `"<t>.<raw body>"` using your secret. Here's a receiver in Node:

```js
import { createHmac, timingSafeEqual } from "node:crypto";

export function verify(rawBody, header, secret) {
  const parts = header.split(",");
  const t = parts.find((p) => p.startsWith("t="))?.slice(2);
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  return parts.filter((p) => p.startsWith("v1=")).some((p) => {
    const got = Buffer.from(p.slice(3), "hex");
    return got.length === expected.length && timingSafeEqual(got, expected);
  });
}
```

Three things trip people up. Use the **raw** body, before your framework parses and re-serializes the JSON. Accept **any** `v1` value, because there are two for 24 hours after a secret rotation. And reject old timestamps (five minutes is a common window) so a captured request can't be replayed later. The technique is the standard one from [RFC 2104](https://www.rfc-editor.org/rfc/rfc2104); OWASP's [webhook security notes](https://cheatsheetseries.owasp.org/cheatsheets/Webhook_Security_Cheat_Sheet.html) cover the same checks.

The body is JSON: `id`, `type`, `created_at`, `attempt` and a `data` object with the event's details. Answer with any 2xx as soon as you've stored it, and do the slow work afterwards.

## Step 3: know what happens when your server is down

![Bar chart of the retry delays after each failed webhook delivery: 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours and 12 hours, 9 attempts over about 22.7 hours, with the rule that 50 consecutive failures disable the endpoint](https://inspiremail.io/media/blog/2026/11/5214048a-8267-47e0-a8a4-6dda5d3f20ee.webp "Failed deliveries are retried for about a day before Inspiremail gives up on the event.")

- **A failure** is anything but a 2xx: an error status, a redirect (never followed), or no answer within 10 seconds.
- **Retries** come after 30 s, 2 min, 10 min, 30 min, 1 h, 3 h, 6 h and 12 h. That's 9 attempts over roughly 22.7 hours, so a deploy that takes your receiver down for an hour loses nothing.
- **Auto-disable**: after 50 consecutive failures, and once an event has run out of retries or nothing has succeeded for 24 hours, the endpoint is disabled. Owners and managers get a **Webhook endpoint disabled** alert. Fix the receiver, then enable the endpoint again.

Events can arrive more than once (a retry after a timeout your server actually processed) and not always in order. Key your processing on the event `id`, store it with a unique constraint, and duplicates become harmless no-ops. Use `created_at` when the order matters, not the arrival time.

## Rotating the secret

Click **Rotate signing secret** on the endpoint. New requests are signed with the new secret straight away and, for the next 24 hours, with the old one as well. Deploy the new secret to your receiver within that window and nothing breaks.

## Why this is easy to run

The page gives you the URL check, a test ping and a delivery log with the status and response of every attempt, so debugging a receiver doesn't mean digging through server logs. Retries and auto-disable are built in, and owners are told when an endpoint gives up.

## What teams usually build with it

- **Keep the CRM honest.** Mark a contact as bounced or complained the moment it happens, so sales doesn't keep writing to a dead address.
- **Sync opt-outs everywhere.** Forward `unsubscribed` to every other system that emails the same people. One opt-out should mean one opt-out.
- **Close the loop on drops.** `campaign.completed` is a good trigger for pulling the report into a spreadsheet or posting a summary to your team chat.
- **Support lookups.** `message.bounced` and `message.failed` from the transactional API tell support why a customer never got a receipt, before the customer asks.

## Testing tips

Point a fresh endpoint at a request inspector first and send a **Test ping**: you'll see the exact headers and body your code has to handle. When the receiver is ready, swap the URL in **Edit endpoint**. If verification fails, log the raw body you hashed; nine times out of ten it was parsed JSON instead of the original bytes. Node's documentation for [timingSafeEqual](https://nodejs.org/api/crypto.html#cryptotimingsafeequala-b) explains why the comparison should be constant-time.

## How we checked this guide

We tested each step in a demo organization with fictitious data on 22 November 2026 and compared it with the provider documentation linked above, and with [FIPS 198-1, the HMAC standard](https://csrc.nist.gov/pubs/fips/198-1/final) for the background on message signing. Screens, button labels, limits and error messages are taken from the product as it works today. If something here no longer matches what you see, [contact us](https://inspiremail.io/contact) and we'll correct it, as our [editorial policy](https://inspiremail.io/editorial-policy) describes. Read more [about us](https://inspiremail.io/about).

## Related guides

[Transactional email API](https://inspiremail.io/blog/transactional-email-api) for `message.*` events, and the [API & webhooks](https://inspiremail.io/features/api-webhooks) and [developers](https://inspiremail.io/developers) pages for the full reference.

## Frequently asked questions

### Which events can Inspiremail send to a webhook?

Drop events (delivered, bounced, complained, opened, clicked, converted, unsubscribed and campaign completed) and transactional message events (sent, delivered, delayed, bounced, complained, failed, opened and clicked). Each endpoint subscribes to the ones it needs.

### How do I verify that a webhook came from Inspiremail?

Each request has an X-Inspiremail-Signature header with a timestamp t and one or more v1 values. Compute HMAC-SHA256 of the timestamp, a dot and the raw body with your signing secret, and accept the request if it matches any v1 value.

### How long does Inspiremail retry a failed webhook?

Up to 9 attempts over about 22.7 hours, with delays from 30 seconds to 12 hours. A response outside 2xx, a redirect or a timeout after 10 seconds counts as a failure.

### Why was my endpoint disabled?

After 50 consecutive failed attempts, combined with an event that ran out of retries or no success for 24 hours, the endpoint is disabled and owners get a Webhook endpoint disabled alert. Fix the receiver and enable it again.

### Can I rotate the signing secret without downtime?

Yes. After Rotate signing secret, requests are signed with the new secret and, for 24 hours, also with the old one, so a receiver that still has the old secret keeps working while you update it.
