Provider guide
Resend webhooks with Hooksmith
Resend signs its webhooks with Svix, so each request carries svix-id, svix-timestamp and svix-signature headers. Hooksmith verifies them with your whsec_ signing secret, filters events such as email.bounced, and forwards a reshaped body to your endpoint with retries.
How Resend signs webhooks
Resend uses the Svix signing scheme, which is the Standard Webhooks scheme with svix- header names. Hooksmith uses the svix- names when a request has svix-signature and no webhook-signature.
- Headers
- svix-id, svix-timestamp and svix-signature.
- Algorithm
- HMAC-SHA256, base64 encoded, compared in constant time.
- What is signed
- <svix-id>.<svix-timestamp>.<raw body>.
- Key
- The base64 part of the whsec_… secret, decoded. The whsec_ prefix is optional.
- Signature header
- A space separated list of v1,<base64> entries. Any matching entry passes, which allows secret rotation.
- Replay window
- The timestamp must be within 5 minutes of the server clock. Change it with source.verification.tolerance.
- The resend preset uses the standard-webhooks verification type. The sourceType stays resend, so events are labeled Resend in the dashboard.
- A second request with the same svix-id within 24 hours is reported as a duplicate and is not delivered again.
- A failed check answers 401 VERIFICATION_FAILED and stores nothing.
Set it up
Hooksmith turns the provider preset into a hook you own. The provider creates the signing secret when you add the endpoint, so deploy first, add the URL in the provider dashboard, then store the secret it shows you. Secrets live in your workspace vault and never go in the YAML. Store RESEND_WEBHOOK_SECRET, DESTINATION_URL.
- In the Resend dashboard, open Webhooks and add an endpoint.
- Paste the /h/<id> URL that hooksmith deploy printed and select the events to send.
- Copy the endpoint's signing secret (it starts with whsec_) and store it with hooksmith secrets set RESEND_WEBHOOK_SECRET.
hooksmith login hooksmith new resend-bounces --preset resend --yes # paste the example hook into .hooksmith/hooks/resend-bounces.yaml hooksmith secrets set DESTINATION_URL hooksmith test resend-bounces --payload ./bounced.json hooksmith deploy resend-bounces # prints the /h/<id> URL # add the URL in the provider dashboard, copy its signing secret, then: hooksmith secrets set RESEND_WEBHOOK_SECRET
hooksmith new writes the preset's starter hook. Replace its contents with the example below, or edit it by hand. The CLI's built-in test sample is generic, so pass your own payload with --payload; a matching one is in the next section. The command reference is in the docs.
Send bounces and complaints to your suppression list
This hook skips every Resend event except email.bounced and email.complained, and sends your endpoint the recipient address and the email id.
apiVersion: hooksmith/v1
kind: Hook
metadata:
name: resend-bounces
description: Bounces and complaints to the suppression service
spec:
source:
preset: resend
destinations:
- name: suppression
url: ${DESTINATION_URL}
method: POST
timeout: 8s
retries:
max: 5
backoff: exponential
initialDelay: 1s
transform:
engine: handlebars
fields:
event: "{{{type}}}"
email_id: "{{{data.email_id}}}"
recipient: "{{{data.to.[0]}}}"
subject: "{{{data.subject}}}"
conditions:
- if: type != "email.bounced" && type != "email.complained"
then:
skip: true
variables:
- name: RESEND_WEBHOOK_SECRET
from: secret
- name: DESTINATION_URL
from: secret
{
"type": "email.bounced",
"created_at": "2026-10-09T12:00:00.000Z",
"data": { "email_id": "56761188-7520-42d8-8898-ff6bc3eba0f8", "to": ["nobody@example.com"], "subject": "Welcome to Acme" }
}- DESTINATION_URL is a workspace secret, so the URL stays out of the YAML. Store it with hooksmith secrets set DESTINATION_URL.
- Values use triple braces so quotes, ampersands, apostrophes and equals signs reach your endpoint as typed. With double braces, template output is HTML-escaped.
- data.to is a list, and data.to.[0] reads its first address.
Resend event types
These are the email event names Resend documents. Choose them on the Resend endpoint, then filter further on the type field.
- email.sent
- Resend accepted the API request and will try to deliver.
- email.delivered
- The recipient's mail server accepted the email.
- email.delivery_delayed
- A temporary issue delayed delivery.
- email.bounced
- The recipient's server permanently rejected the email.
- email.complained
- The recipient marked the email as spam.
- email.opened
- The recipient opened the email.
- email.clicked
- The recipient clicked a link.
- email.failed
- The email failed to send.
Test against localhost
The Hooksmith desktop app for Mac can tunnel stored events to a server on your machine. In raw mode it replays the original body bytes and the stored provider headers. Proxy headers such as x-forwarded-host are never stored, so they are not replayed. The target must be localhost, 127.0.0.1, [::1] or a *.localhost name. Get it on the download page.
The 5 minute timestamp window applies, so resend fresh events only.
Questions
How do I verify a Resend webhook?
Resend uses Svix. Concatenate svix-id, svix-timestamp and the raw body with dots, compute HMAC-SHA256 with the base64-decoded part of your whsec_ secret, base64 encode it, and compare it with the v1 entries in svix-signature. Hooksmith does this for source.preset: resend and also rejects timestamps more than 5 minutes off.
Is a Resend webhook the same as a Standard Webhooks one?
The signing scheme is. Svix and Standard Webhooks use the same HMAC-SHA256 construction with different header prefixes (svix- or webhook-). Hooksmith accepts both from the same verification type. The difference between the two presets is the label, the starter template and the secret name.
What happens when Resend retries a webhook?
Resend sends the same svix-id on a retry, and Hooksmith dedupes on it for 24 hours, so a retry of an event you already accepted is acknowledged and not delivered twice. To deliver an event Hooksmith already accepted again, use hooksmith replay <event-id>, which skips the duplicate check. Hooksmith answers 200 once the event is stored, then retries your endpoint itself on 5xx responses, 408, 425, 429 and network errors.
Why does my Resend webhook fail with a signature mismatch?
Check that RESEND_WEBHOOK_SECRET is the signing secret of this endpoint and was copied whole, including the whsec_ prefix or at least the base64 part. A timestamp more than 5 minutes from the server clock also fails verification.
Other providers
All providers are listed on webhook providers. Hooks are metered by events processed: see pricing.