Resend webhooks
Last verified against Resend's documentation on September 27, 2026.
Resend sends webhooks when something happens to an email you sent or received: it’s delivered, it bounces, a recipient marks it as spam, or a new email arrives in an inbox. Bounce and complaint events are the ones you can’t afford to miss, because they drive your suppression list and your sender reputation. Most delivery problems come from a signature check run against a re-serialized body, a slow handler, or a verification window that a late delivery misses. This page covers what Resend sends, how it delivers, how to fix the common errors, and where HookDeploy fits.
What Resend sends webhooks for
| Area | Events | Typical use |
|---|---|---|
| Delivery | email.sent, email.delivered, email.delivery_delayed, email.failed, email.scheduled | Track delivery status in your app |
| Problems | email.bounced, email.complained, email.suppressed | Suppress bad addresses and protect your sender reputation |
| Engagement | email.opened, email.clicked | Measure engagement |
| Inbound | email.received | Route incoming email to your app or an AI agent |
| Contacts | contact.created, contact.updated, contact.deleted | Keep audiences in sync |
Every webhook is a JSON POST with a type, a created_at timestamp, and the event details under data. For email.bounced, data includes whether the bounce was hard or soft.
How Resend delivers webhooks
| Behavior | Detail |
|---|---|
| Signature headers | svix-id, svix-timestamp, and svix-signature |
| Signing scheme | HMAC-SHA256 over {svix-id}.{svix-timestamp}.{raw body}, keyed with the base64-decoded part of your whsec_ secret. The header can carry several space-separated v1,<signature> values |
| Timestamp tolerance | Svix-style verifiers reject requests more than five minutes old |
| Retries | Immediately, then 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and 10 hours more, about 27 hours in total |
| Failing endpoints | Resend emails your team when an endpoint starts failing, and eventually disables it |
| Manual replay | Replay failed or succeeded events from the Webhooks page |
| Delivery guarantee | At least once. Duplicates are possible |
| Ordering | Not guaranteed. An email.opened can arrive before email.delivered. Sort by created_at |
| Duplicates | Deduplicate on svix-id |
Common Resend webhook errors and how to fix them
Signature verification fails on some events
The most common cause is verifying a re-serialized body. Several Resend examples pass JSON.stringify(req.body) to the verifier, which only works if parsing and re-serializing reproduces Resend’s exact bytes. Often it does, which is why the bug is intermittent. Anything that changes spacing, escaping, or number formatting breaks the signature. Resend’s own inbound email guide warns about exactly this. Read the raw body before any JSON middleware and verify that.
Other causes:
- Wrong secret. Each webhook has its own
whsec_signing secret. - Secret not decoded. For manual verification, the HMAC key is the base64-decoded part after
whsec_, not the whole string. - Wrong signed content. It’s the ID, timestamp, and body joined with periods, not the body alone.
“Message timestamp too old”
The verifier rejects requests more than five minutes old. Check your server’s clock first. If the request is a retry or a replay, the timestamp is genuinely old; see Verifying late deliveries and replays.
Endpoint disabled
Resend emails your team when an endpoint starts failing and, if it keeps failing, disables it and sends a second email. Fix the endpoint, re-enable it on the Webhooks page, then replay the events you missed.
Bounced addresses keep getting emailed
If your handler drops email.bounced or email.complained events, bad addresses stay on your lists and your sender reputation suffers. Treat these as the events that must never be lost. Suppress hard bounces immediately, and track soft bounces so you can suppress an address after repeated failures.
The email.received webhook has no content
That’s by design. Fetch the message with Resend’s Receiving API and its attachments with the attachments API.
Events out of order
Resend doesn’t guarantee order. Store created_at and don’t let an older event overwrite a newer status.
Why use HookDeploy with Resend
Resend already retries for about a day and lets you replay events from its dashboard, so HookDeploy’s value here isn’t mainly about lost events. It’s about where the events go and what you can see.
Send each event where it’s needed
A bounce often needs to reach three places: your app’s suppression logic, your CRM, and an alert channel. Point one Resend webhook at HookDeploy and forward each event to all of them in parallel. A failing destination doesn’t hold up the others. Free includes 1 destination per endpoint, Starter includes 5, and Pro and above are unlimited.
Reshape events for other tools
Destinations that don’t verify Resend’s signature, such as an analytics pipeline or a Slack alert, can get a reshaped payload. HookDeploy’s transformations can pick out the fields you need, rename them, and format values. Transformations are available on Starter and above.
Inspect every event
See the exact body and headers of every delivery, alongside what your handler returned. When a signature check fails in your app but the request looks right in HookDeploy, the problem is between your server’s edge and your handler, usually a JSON parser.
Route inbound email to private systems
Inbound email often feeds internal tools or AI agents that shouldn’t be on the public internet. The HookDeploy Agent connects outward from your network over mTLS and delivers email.received events to a local port, with no public IP or open port. The service still needs outbound access to Resend’s API to fetch the email.
Develop against real events
A tap sends a temporary copy of live Resend events to 127.0.0.1 on your machine while production keeps receiving them. Taps arrive in real time, so signatures verify within the five-minute window.
Know the trade-offs
- HookDeploy’s retries replace Resend’s. Once HookDeploy responds, Resend stops retrying. Starter retries 3 times over about 35 minutes, and Pro and Scale up to 5 times on a schedule you choose, which is shorter than Resend’s 27 hours. Incidents and replay cover anything after that.
- Late deliveries and the signature window. Retries and replays that arrive more than five minutes after Resend signed them fail the default check. Plan for that with the pattern below.
- Transformations and privacy filters. A transformation changes the body, and a privacy filter changes the stored copy used for retries and replays. Either way, the signature won’t match at that destination.
- Plan limits. On Free, requests beyond the monthly allowance or the daily limit get a
429, which Resend treats as a failed delivery and retries. Paid plans keep accepting traffic past the included volume.
Verifying late deliveries and replays
HookDeploy forwards Resend’s original body and svix-* headers unchanged, and those headers are on HookDeploy’s protected list: they’re never redacted from stored requests, and custom header strip rules can’t remove them. So a retry or replay carries a genuine signature. But if it arrives more than five minutes after Resend signed it, the default check rejects it.
A sound pattern:
- Verify the HMAC on every request. A valid HMAC proves Resend created it.
- If the timestamp is within five minutes, process it normally.
- If only the timestamp is stale, accept it only when the request carries an auth header you inject on the HookDeploy destination.
- Deduplicate on
svix-id, which stays the same across retries and replays. - For status events, compare
created_atwith what you’ve stored, or fetch the email from Resend’s API to confirm its current status before acting.
Set up Resend with HookDeploy
- In HookDeploy, create an endpoint (for example,
Resend events) and copy its URL. - On the Forwarding tab, add a destination pointing to your handler, or to an agent for private delivery. Add a header
Authorization: Bearer YOUR_HANDLER_SECRET, and set the destination’s retries. - In the Resend dashboard, open Webhooks and add a webhook with your HookDeploy URL and the events you handle. Copy its
whsec_signing secret. - Send a test email, or trigger an event, and confirm the webhook appears in HookDeploy and reaches your handler.
Example handler (Node.js and Express)
import crypto from 'node:crypto';
import express from 'express';
const app = express();
const TOLERANCE_SECONDS = 5 * 60;
const secret = Buffer.from(process.env.RESEND_WEBHOOK_SECRET.split('_')[1], 'base64');
const hookdeployAuth = Buffer.from(`Bearer ${process.env.HANDLER_SECRET}`);
// Raw body parser on this route, registered before any global JSON middleware.
app.post('/webhooks/resend', express.raw({ type: 'application/json' }), async (req, res) => {
const id = req.get('svix-id') ?? '';
const timestamp = req.get('svix-timestamp') ?? '';
const signatures = (req.get('svix-signature') ?? '')
.split(' ')
.map((part) => part.split(',')[1])
.filter(Boolean);
const expected = crypto
.createHmac('sha256', secret)
.update(`${id}.${timestamp}.${req.body.toString('utf8')}`) // raw bytes, untouched
.digest('base64');
const valid = signatures.some(
(sig) => sig.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))
);
if (!valid) return res.status(401).send('Invalid signature');
const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) <= TOLERANCE_SECONDS;
if (!fresh && !isFromHookDeploy(req)) return res.status(401).send('Stale signature');
res.sendStatus(200);
const event = JSON.parse(req.body.toString('utf8'));
await enqueue({ deliveryId: id, type: event.type, createdAt: event.created_at, data: event.data });
// Deduplicate on deliveryId (svix-id) in your worker.
});
function isFromHookDeploy(req) {
const received = Buffer.from(req.get('authorization') ?? '');
return received.length === hookdeployAuth.length &&
crypto.timingSafeEqual(received, hookdeployAuth);
}
FAQ
How are Resend webhooks signed?
Resend signs webhooks with Svix headers, svix-id, svix-timestamp, and svix-signature. The signature is an HMAC-SHA256 of the ID, timestamp, and raw body joined with periods, keyed with the base64-decoded part of your whsec_ signing secret. Resend's SDK verifies it with resend.webhooks.verify.
Why does Resend signature verification fail?
Usually because the body was parsed and re-serialized before verification. Pass the raw request body, not JSON.stringify of a parsed object. Other causes are the wrong signing secret, or a request older than five minutes, which the verifier rejects.
Does Resend retry failed webhooks?
Yes. Resend retries immediately and then after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and another 10 hours, about 27 hours in total. You can also replay failed or succeeded events from the Webhooks page in the dashboard.
Does HookDeploy break Resend signature verification?
Not on first delivery. HookDeploy forwards the original body and svix headers unchanged, and those headers are protected from redaction and header strip rules. Retries and replays that arrive more than five minutes after Resend signed them fail the default timestamp check, and a transformation or privacy filter changes the body.
Does the email.received webhook include the email content?
No. The webhook tells you an email arrived. Fetch the content with Resend's Receiving API, and attachments with its attachments API. Resend designed it that way so large emails don't hit request size limits.
How is HookDeploy different from Resend's Webhook Ingester?
Resend's open-source Webhook Ingester is something you host to store Resend events in your own database. HookDeploy is hosted, captures every event, and forwards it to as many destinations as you need, including private servers through an agent, with inspection and replay built in.