Resend · api · fg-0409

Resend returns 409 invalid_idempotent_request when a retry reuses the key

409 invalid_idempotent_request

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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}` });

Affects: Resend API send and batch endpoints, keys kept 24 hours, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp