Idempotency
Network retries shouldn't mean duplicate emails. Attach an idempotency key to a send and safely retry it as many times as you need.
How it works
Send an Idempotency-Key header with any POST /emails request. If Sendibl has seen that key from your account in the last 24 hours, it returns the original email's id instead of sending again:
curl -X POST https://api.sendibl.com/emails \
-H "Authorization: Bearer sb_..." \
-H "Idempotency-Key: order-4531-receipt" \
-H "Content-Type: application/json" \
-d '{"from": "...", "to": ["..."], "subject": "...", "html": "..."}'
# first call -> {"id": "eml_abc"} (email sent)
# retry -> {"id": "eml_abc"} (nothing sent)Choosing keys
Derive the key from the business event, not the attempt: order-4531-receipt, signup-usr_9f2-welcome. Retries of the same event share the key; genuinely different emails must not.
Keys are scoped to your account and expire after 24 hours — a repeat of the key on day two sends a fresh email. Only the key is compared; a retry with a different body still returns the original email.