Deliveries and retries
Delivery log, BullMQ retry policy, and idempotent handling.
Every outbound webhook is persisted and delivered asynchronously via the mc:webhook-delivery BullMQ queue. Use the deliveries API to debug failures and design idempotent receivers.
Delivery log
GET /webhooks/endpoints/:id/deliveries?limit=20
Authorization: Bearer mc_live_xxxx
X-Tenant-Id: clxxxxxxxx
Each WebhookDelivery record includes:
| Field | Meaning |
|---|---|
id | Delivery ID (also sent as X-MailingCore-Delivery-Id) |
event | Event type (email.bounced, contact.unsubscribed, …) |
payload | JSON body delivered to your URL |
statusCode | HTTP status from your server (if a response was received) |
responseBody | Truncated response body for debugging |
attempt | Attempt number (1–5) |
deliveredAt | Timestamp of the last attempt |
createdAt | When the delivery was enqueued |
Default limit is 20 if omitted.
Retry policy
| Setting | Value |
|---|---|
| Queue | mc:webhook-delivery |
| Max attempts | 5 |
| Backoff | Exponential, 10 s base delay |
| Request timeout | 10 s per HTTP call |
| Success criteria | HTTP 2xx response |
On non-2xx status or network/timeout error, BullMQ re-queues the job with exponential backoff until attempts are exhausted. After the fifth failed attempt, the delivery is marked with the last statusCode and no further automatic retries occur for that job.
POST https://your-app.com/webhooks/mailingcore
User-Agent: MailingCore-Webhook/1.0
Content-Type: application/json
X-MailingCore-Signature: t=1719763200,v1=...
X-MailingCore-Event: contact.unsubscribed
X-MailingCore-Delivery-Id: clxdelivery...
Receiver checklist
Respond fast
Return 200 within a few seconds. Heavy work belongs in your own queue.
Verify signature
Validate
X-MailingCore-Signatureon the raw body before parsing JSON — see Verify signature.Deduplicate
Use
X-MailingCore-Delivery-Idor the payloadidfield. Retries may deliver the same logical event more than once.Monitor failures
Poll
GET /webhooks/endpoints/:id/deliveriesor alert on repeated non-2xxstatusCodevalues.