OneShot

All packsTransactional Email Deliverability CoreSolve

resend webhook dedupe svix id vs email id

email_id looks like the dedupe key. It isn't.

Resend's data.email_id is shared across a message's bounced, delivered, and complained events -- deduping on it collapses distinct events into one.

This is one of the things Transactional Email Deliverability Core already handles. Send transactional email that actually lands, and stop emailing people who bounce or complain.

Buy for $793 of 3 clean-room builds passed · full refund if it fails on your machine

Is this you?

Resend webhook payloads carry no top-level event id, and the obvious candidate -- data.email_id -- is shared across every event type that happens to one message: sent, delivered, bounced, and complained can all carry the same email_id. Deduplicating on it looks correct in a quick test (the same event delivered twice does dedupe) and silently collapses genuinely distinct events into one, dropping real signal like a complaint that arrived after a delivery notification for the same message.

Why this one is easy to get wrong

email_id is right there in the payload, named like an identifier, and does correctly dedupe the retry-of-the-same-event case, which is the case most webhook-handling code is written and tested against. It takes reading Resend's event-shape documentation specifically for "can two different event types share this field" to notice the collision -- not something a dedupe implementation naturally surfaces on its own.

What you get instead

The pack's webhook decisions dedupe on the svix-id header instead -- unique per delivery attempt group, supplied by the Svix transport layer Resend signs with, not by Resend's own payload. It's stored as email_events.provider_event_id with a UNIQUE constraint, so the insert itself is the idempotency check: a duplicate delivery throws a conflict, is reported as {duplicate: true}, and the route still returns 200 so Svix doesn't retry forever.

Source: ARCHITECTURE.md 'Webhooks (Resend -> Svix transport)', decision 3 — checkable in the pack you receive

How you actually use this

You don’t install a library or wire up an SDK. Your own coding agent builds the code in your project, and you keep it — no runtime dependency on us.

  1. Step 1

    Download and unzip

    You get a folder: the docs that tell an agent what to build, a starting skeleton, and the test suite that decides when it's done.

  2. Step 2

    Open it in Claude Code or Cursor

    Point your coding agent at the folder. Nothing to install, no account with us, no API key.

  3. Step 3

    Paste one prompt

    The pack contains the exact prompt. Paste it as your first message and leave it alone — it works through the build itself, choosing a cheaper or stronger model per task.

  4. Step 4

    Run ./verify.sh

    One command. It prints a pass or fail for every check. Green means the build is done — the same script we ran to produce the receipt on this page.

Typical build: about 13 minutes of your agent working, mostly unattended. Then you integrate the working module into your app the way you would any code you’d written yourself.

Why you can believe this

3 of 3 runs passed

We ran this pack from an empty folder 3 times and published exactly what happened — every check, the model, the token cost, the wall time. Not a testimonial, and not our opinion: the same verify.sh you run yourself. Read the full receipt →

Buy for $7914-day refund if verify.sh fails →

Related problems