Webhook Requests
When an event occurs, Emailit sends an HTTP POST request to your configured webhook URL. This page describes the request format, headers, and delivery behavior.
Request format
All webhook requests are sent as POST requests with a JSON body:
- Method:
POST - Content-Type:
application/json - Timeout: 30 seconds
Headers
Each webhook request includes the following headers:
| Header | Description |
|---|---|
Content-Type | application/json |
User-Agent | Emailit-Webhooks/2.0 |
X-Emailit-Signature | HMAC-SHA256 signature for verifying authenticity |
X-Emailit-Timestamp | Unix timestamp of when the request was signed |
Request body
The request body contains the event payload as JSON:
{
"event_id": "evt_2bH7kNwP5mQaV1sXgIdKe6pZr",
"type": "email.delivered",
"data": {
"object": {
"id": "em_4yM2nTvR8oPcX3uZiKeLg7sB",
"object": "email",
...
}
}
}
Expected response
Your endpoint should return a 2xx status code (e.g. 200, 201, 204) to acknowledge receipt. Any other status code is treated as a failure.
Retry policy
If your endpoint does not respond with a 2xx status code within 30 seconds, Emailit will retry delivery with the following schedule:
| Attempt | Delay |
|---|---|
| 0 | 5 seconds |
| 1 | 5 minutes |
| 2 | 30 minutes |
| 3 | 2 hours |
| 4 | 5 hours |
| 5 | 10 hours |
| 6 | 24 hours |
After attempt 6 (7 total attempts), the webhook is automatically disabled. You can re-enable it from the Emailit dashboard.
Ordering
Webhook events are delivered in near real-time but are not guaranteed to arrive in order. Use the event_id and timestamps within the event payload to handle ordering in your application.
IP addresses
Webhook requests are sent from Emailit’s infrastructure. If you need to allowlist IPs, contact support for the current list of outbound IP addresses.
Best practices
- Respond quickly — Process the webhook asynchronously and return a
2xximmediately. Do heavy processing in a background job. - Handle duplicates — Use
event_idto deduplicate events. The same event may be delivered more than once during retries. - Verify signatures — Always validate the
X-Emailit-Signatureheader to ensure the request came from Emailit. See Request Signature.