Resend · api · fg-0409

Resend returns 409 invalid_idempotent_request when a retry reuses the key

If you see 409 invalid_idempotent_request, the cause and the fix for Resend are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
409 invalid_idempotent_request409 concurrent_idempotent_requests during a fast retry400 invalid_idempotency_key for keys longer than 256 characters
Cause
An Idempotency-Key is bound to the exact payload for 24 hours, so a retry that rebuilds the body differently, such as a new timestamp in the HTML, is refused. A second request while the first is still running gets a concurrency 409.
Fix
Derive the key from a stable event id, build the payload deterministically, retry concurrent 409s after a pause, and keep keys under 256 characters.
Apply
await resend.emails.send(payload, { idempotencyKey: `welcome/${user.id}` });
Affected
Resend API send and batch endpoints, keys kept 24 hours, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun