Resend webhooks: event types, payload and signature verification
Resend webhooks POST a JSON payload with type, created_at and data to your HTTPS endpoint for events such as email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.opened, email.clicked, email.failed and email.suppressed. Each request is signed through Svix: verify the raw body with the svix-id, svix-timestamp and svix-signature headers and the endpoint's whsec_ signing secret. Answer with a 200; anything else is retried up to seven more times over roughly 28 hours.
Resend webhook event types
| Event | Fires when |
|---|---|
email.sent | The API request succeeded; Resend will try to deliver |
email.scheduled | The email is scheduled to be sent |
email.delivered | The recipient's mail server accepted it |
email.delivery_delayed | A temporary problem, such as a full inbox or a receiving server issue |
email.bounced | The recipient's mail server permanently rejected it |
email.complained | Delivered, then marked as spam by the recipient |
email.opened / email.clicked | Opened, or a link clicked (needs open or click tracking on the domain) |
email.failed | Sending failed: invalid recipients, API key problems, domain verification, quota limits |
email.suppressed | Resend skipped it because the address is on your suppression list |
email.received | Resend received an inbound email |
Beyond email there are domain.created, domain.updated and domain.deleted; contact.created, contact.updated, contact.deleted and contact.topics.updated; suppression.added and suppression.removed; topic.*; and a set of inbox.* events for Resend's inboxes. Contacts imported by CSV don't fire contact.created. How each email event maps to an email's status: Resend email statuses.
What the payload looks like
Every payload has the same top level: type, created_at and a data object. This is the shape of an email.bounced event, from Resend's reference:
{
"type": "email.bounced",
"created_at": "2026-11-22T23:41:12.126Z",
"data": {
"email_id": "56761188-7520-42d8-8898-ff6fc54ce618",
"message_id": "<[email protected]>",
"created_at": "2026-11-22T23:41:11.894Z",
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Your receipt",
"bounce": {
"message": "The recipient's email address is on the suppression list because it has a recent history of producing hard bounces.",
"subType": "Suppressed",
"type": "Permanent"
},
"tags": {"category": "confirm_email"}
}
}data.email_idis the id you can fetch withGET /emails/{id}; store it when you send, so events can be matched to your records.data.tois an array, even for one recipient.data.tagscarries the tags you sent, which is the easiest way to route events (order id, user id).message_idis missing onemail.scheduled,email.failedandemail.suppressed, because nothing has been sent yet.email.failedaddsdata.failed.reason, for examplereached_daily_quota;email.bouncedaddsdata.bouncewithtype,subType,messageand the server'sdiagnosticCode.
Verify the signature
Resend signs webhooks with Svix. Each request carries three headers, svix-id, svix-timestamp and svix-signature, and each endpoint has its own signing secret starting whsec_. You'll find it on the webhook's details page, and the create, retrieve and list webhook endpoints return it too. With the Resend SDK:
const payload = await req.text(); // the raw body, not parsed JSON
const event = resend.webhooks.verify({
payload,
headers: {
id: req.headers.get('svix-id'),
timestamp: req.headers.get('svix-timestamp'),
signature: req.headers.get('svix-signature'),
},
webhookSecret: process.env.RESEND_WEBHOOK_SECRET,
}); // throws if the signature is wrongThe svix package's new Webhook(secret).verify(payload, headers) does the same. To check by hand: sign svix-id + "." + svix-timestamp + "." + body with HMAC-SHA256, using the base64-decoded part of the secret after whsec_; base64-encode the result and compare it with each space-separated v1,… entry in svix-signature. Also reject timestamps outside a tolerance you choose, which stops replayed requests.
The usual cause of "invalid signature" is the body: a framework that parses the JSON and re-serialises it changes the bytes. Read the raw body before any JSON middleware. After you rotate a secret (POST /webhooks/{id}/signing-secret/rotate), payloads are signed with both the old and the new secret for 24 hours, which gives you time to deploy.
Retries, duplicates and replays
Respond with a 200 quickly and do slow work afterwards. If Resend doesn't get one, it retries on this schedule, each step counted from the previous failure: immediately, 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 10 hours. If an endpoint keeps failing, Resend disables it and emails your team; you re-enable it on the Webhooks page.
Delivery is at-least-once, so the same event can arrive twice. Store each processed svix-id and skip repeats. Retries keep the same svix-id.
To recover missed events, replay them from the webhook's page in the dashboard, or over the API: list events with GET /webhooks/{webhook_id}/events (each has a status of success, failed, attempting or pending), then queue one more delivery:
curl -X POST "https://api.resend.com/webhooks/$WEBHOOK_ID/events/$EVENT_ID/replay" \
-H "Authorization: Bearer $RESEND_API_KEY" \
-H "User-Agent: my-app/1.0"If your firewall needs an allowlist, Resend's webhooks come from 44.228.126.217, 50.112.21.217, 52.24.126.164, 54.148.139.208 and 2600:1f24:64:8000::/52.
Create a webhook over the API
In the dashboard: Webhooks, Add Webhook, enter a public HTTPS URL and choose the events. Over the API, with a full_access key:
curl -X POST https://api.resend.com/webhooks \
-H "Authorization: Bearer $RESEND_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{"endpoint": "https://example.com/webhooks/resend",
"events": ["email.delivered", "email.bounced", "email.complained", "email.failed", "email.suppressed"]}'The response holds the webhook id and its signing_secret. Subscribe to what you'll act on: for delivery monitoring, bounces, complaints, failures and suppressions matter far more than opens. If a call fails, see Resend API errors.
Questions
Where do I find the Resend webhook signing secret?
On the webhook's details page in the dashboard. The create, retrieve and list webhook API endpoints also return it as signing_secret; it starts with whsec_.
Why does Resend webhook verification fail?
Usually because the body was parsed and re-serialised before verifying. Pass the raw request body as a string, with the svix-id, svix-timestamp and svix-signature headers and the secret for that endpoint.
How many times does Resend retry a failed webhook?
After the first attempt it retries at 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, each counted from the previous failure. You can also replay any event manually.
Can Resend send the same webhook twice?
Yes. Delivery is at-least-once, so store the svix-id of each event you process and ignore duplicates.
Related
- Resend email statuses: delivered, bounced, delayedWhat each Resend last_event means: sent, delivered, delivery_delayed, bounced, complained, failed, suppressed and more, with the matching webhook events.
- Resend suppressed email: why, and how to remove itResend marks an email suppressed when the recipient is on your team's suppression list after a hard bounce or complaint. How to check why, and remove them.
- Resend API errors: validation_error, 403 and 429 explainedResend errors come as JSON with name, message and statusCode. What validation_error, restricted_api_key, 403 code 1010 and the three kinds of 429 mean.
- Resend API key: create one and pick the right permissionResend API keys are full_access or sending_access. Sending keys only send and get 401 restricted_api_key on reads, so reading data needs full access.
- Hard bounce vs soft bounce: what each means, what to doA hard bounce is a permanent failure (5xx, e.g. 550 5.1.1): stop sending to it. A soft bounce is temporary (4xx, e.g. full mailbox): retry, then stop.
- How to monitor email delivery from your phoneWatch bounce rate, spam complaints, failed inbound and DNS status from your phone, with spike alerts and widgets for Postmark, Mailgun, SendGrid, Resend.