Glossary

What is an email webhook?

Short answer

An email webhook is an HTTP POST that your email provider sends to a URL in your app whenever something happens to a message, such as delivered, bounced, complained, opened, clicked or received. The payload is JSON with the event type and the email id. Webhooks let your app react in real time, for example by flagging a bad address, without polling. Always verify the signature before trusting one.

Last checked 16 November 2026

An email webhook is an HTTP request that your email provider sends to your application when something happens to a message. Instead of your code asking “was it delivered yet?”, the provider calls a URL you choose with a JSON payload saying a message was delivered, bounced, marked as spam, opened, clicked, or that a new email was received.

How email webhooks work

  1. You register an endpoint, such as https://app.acme.com/hooks/email, and choose which events to receive.
  2. You send email through an email API or SMTP relay and store the returned message id.
  3. Something happens. The receiving server accepts the message, or bounces it, or the user complains.
  4. The provider POSTs an event to your endpoint, signed with a shared secret.
  5. Your app verifies and responds with a 2xx status, then updates its own records.

If your endpoint fails, the provider retries later.

Example payload and headers

An illustrative bounce event. Field names vary by provider, but the shape is similar:

POST /hooks/email HTTP/1.1
Content-Type: application/json
webhook-id: msg_2KWPBgLlAfxdpx2AI54pPJ85f4W
webhook-timestamp: 1763284364
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
{
  "type": "email.bounced",
  "created_at": "2026-11-16T09:12:44Z",
  "data": {
    "email_id": "9f2c1e7a-...",
    "to": ["sam@exmaple.com"],
    "bounce": { "type": "hard", "code": "5.1.1" }
  }
}

The headers follow the Standard Webhooks specification: the signature is an HMAC-SHA256 over webhook-id.webhook-timestamp.body, and webhook-id stays the same across retries, so you can use it to ignore duplicates.

Common events

Event What it tells you
delivered The receiving server accepted the message
delivery_delayed Temporary failure, still retrying
bounced Permanent failure, stop mailing the address
complained The recipient marked it as spam (feedback loop)
opened, clicked Engagement, approximate
suppressed Not sent, address on the suppression list
received A new inbound email arrived

Why it matters for app email

A 202 from the API only means “queued”. Webhooks tell you what actually happened, so you can show a delivery status in your support tools, prompt a user to fix a mistyped address after a bounce, stop emailing someone who complained, or turn an inbound reply into a ticket comment.

Common mistakes

  • Not verifying signatures. Anyone who finds the URL can post fake events.
  • Parsing the body before verifying, or re-serializing it, which changes the bytes and breaks the HMAC.
  • Doing slow work in the handler, so the provider times out and retries.
  • Not deduplicating. Retries mean you can see the same event twice.
  • Assuming order. A delivered can arrive after an opened.

How Mailcandor handles it

Mailcandor webhooks are signed with Standard Webhooks (also svix-* headers), retried up to 8 times over about 28 hours, and replayable.

Questions

What email webhook events are common?

Sent, delivered, delivery delayed, bounced, complained, opened, clicked, failed, suppressed and received for inbound mail. Names vary a little by provider.

How do I verify an email webhook?

Check the signature header with your webhook secret before parsing the body. Under the Standard Webhooks spec that is an HMAC-SHA256 of the message id, timestamp and raw body. Reject old timestamps to stop replays.

What happens if my endpoint is down?

Most providers retry with backoff for hours, and some let you replay past events. Return a 2xx quickly and do the work in a background job.

Are open and click events reliable?

Only roughly. Opens rely on a tracking pixel that privacy features and image blocking can trigger or hide. Treat them as trends, not facts about one person.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.