What is a webhook?
Resend uses webhooks, which are real-time HTTPS requests that tell your application an event occurred, such as an email delivery notification or subscription status update.Why use webhooks?
All webhooks use HTTPS and deliver a JSON payload that can be used by your application. You can use webhook feeds to do things like:- Automatically remove bounced email addresses from mailing lists
- Create alerts in your messaging or incident tools based on event types
- Store all send events in your own database for custom reporting/retention
- Receive emails using Inbound
How to receive webhooks
To receive real-time events in your app via webhooks, follow these steps. Prefer video? Watch the tutorial below.1. Create a dev endpoint to receive requests.
In your local application, create a new route that can accept POST requests. For example, you can add an API route:pages/api/webhooks.ts
HTTP 200 OK to signal to Resend that the event was successfully delivered.
2. Add a webhook in Resend.
Navigate to the Webhooks page, then select Add Webhook.- Add your publicly accessible HTTPS URL
- Select all events you want to observe

Resend also supports managing webhooks via the API or the SDKs. View the API reference for more details.
3. Test your local endpoint.
To ensure your endpoint is successfully receiving events, perform an event you are tracking with your webhook, like sending an email, creating a contact, or creating a domain. The webhook will send a JSON payload to your endpoint with the event details. For example:
View all possible event types and their webhook payload
responses.
4. Update and deploy your production endpoint.
Once you successfully receive events, update your endpoint to process the events. For example, update your API route:pages/api/webhooks.ts
5. Register your production webhook endpoint
Once your webhook endpoint is deployed to production, you can register it in the Resend dashboard.FAQ
What is the retry schedule?
What is the retry schedule?
If Resend does not receive a 200 response from a webhook server, we will retry the webhooks.Each message is attempted based on the following schedule, where each period is started following the failure of the preceding attempt:
- 5 seconds
- 5 minutes
- 30 minutes
- 2 hours
- 5 hours
- 10 hours
What IPs do webhooks POST from?
What IPs do webhooks POST from?
If your server requires an allowlist, our webhooks come from the following IP addresses:
44.228.126.21750.112.21.21752.24.126.16454.148.139.2082600:1f24:64:8000::/52
What are the delivery guarantees?
What are the delivery guarantees?
Resend webhooks provide at-least-once delivery. Every event will be delivered to your endpoint at least once, but may be delivered more than once in rare cases (such as network timeouts where your server processed the event but the acknowledgement was lost).To handle duplicates, use the
svix-id header included with every webhook request. This is a unique identifier for each event delivery. Store processed svix-id values and skip any duplicates.Do events arrive in order?
Do events arrive in order?
Events are sent as they occur, but delivery order is not guaranteed. Network conditions, retries, and processing delays can cause events to arrive out of order. For example, an
email.opened event could arrive before the email.delivered event for the same email.If ordering matters for your application, use the created_at timestamp in the event payload to sort events after receipt.Can I retry webhook events manually?
Can I retry webhook events manually?
Yes. You can retry webhook events manually from the dashboard.To retry a webhook event, click to see your webhook details
and then click the link to the event you want to retry.On that page, you will see both the payload for the event
and a button to replay the webhook event and get it sent to
the configured webhook endpoint.
Try it yourself
Webhook Code Example
See an example of how to receive webhooks events for Resend emails.