Consume immutable delivery facts exactly once.
Marmunk normalizes provider events, signs the canonical request bytes, and retries webhook delivery with bounded backoff.
Verify before parsing
Marmunk-Webhook-Id: whd_...
Marmunk-Webhook-Timestamp: 1785369600
Marmunk-Webhook-Signature: v1=<hex-hmac>Compute HMAC-SHA256 over timestamp + \".\" + raw_body. Use the raw request bytes, compare signatures in constant time, reject stale timestamps, then deduplicate by webhook ID.
Delivery event
{
"id": "evt_01example",
"type": "delivery.succeeded",
"created_at": "2026-07-29T20:01:20.000Z",
"data": {
"email_id": "msg_01example",
"recipient_id": "rcp_01example"
}
}Handler order
- Read the raw body and signature headers.
- Verify timestamp and HMAC.
- Claim the event ID in durable storage.
- Apply the normalized outcome transactionally.
- Return a 2xx response only after the durable claim succeeds.