Idempotency
A request that times out may still have succeeded, so retrying it can send the same email twice. An idempotency key makes that retry return the original result instead.
How it works
Send Idempotency-Key: <unique-value> with POST /v1/emails. The first request stores its result against your project. Repeating the key within 24 hours returns that stored result with a 200: one email, one billable send.
When to use it
On every send. Generate the key per logical operation, one per user action rather than one per retry attempt. For scheduled work, derive it from the run itself, e.g. invoice-run-2026-09-06, so a cron that fires twice replays instead of duplicating.
What it doesn’t do
A new key always sends; two different keys are two different operations. Idempotency also covers acceptance only. If the message later bounces, that is a delivery event with its own record, not a duplicate send.