Email API Retries (2026): Idempotency-Key, 429s, and Webhook Backoff on Rovela
How retries work with Rovela: Idempotency-Key (24 hours) for POST /emails, what 429 means (per-key limit or monthly quota), and the five-attempt webhook backoff.
Email API retries: three different kinds
“Retry” around an email API usually mixes three problems that should stay separate:
- Your send request failed or timed out, and you want to try
POST /emailsagain without mailing the person twice. - The API answered
429, and you need to slow down or stop until a monthly allowance resets. - A webhook delivery to your endpoint failed, and the provider retries that POST to you.
Rovela documents all three, with different rules. This article is the retry picture. The deep dive on the header itself is already Idempotency Keys for Email APIs. Rate-limit and quota behaviour is Email API Rate Limits. Webhook construction and signatures are Transactional Email Webhooks and Verifying Webhook Signatures.
Start from the Email API product page, the Quick Start, the Send Email API, and Authentication.
Related product guides in this series:
- Transactional Email Service
- REST Email API
- Email API for Startups
- Send Email Programmatically
- Email API vs SMTP Relay
- Transactional Email Provider
- Email Delivery Status API
- Email API Authentication
- HTML Email API
- Email API for Multi-Tenant SaaS
- Receipt Email API
- Email API Logs
- Email API Rate Limits
- Transactional Email Infrastructure
1. Retrying a send safely: Idempotency-Key
The Send Email API and the Email API product page agree: send an Idempotency-Key header (up to 256 characters) and a retry of the same request within 24 hours returns the original response instead of sending again. Use it for anything driven by a queue or a webhook, where “did that already happen?” is otherwise your problem.
curl -X POST https://api.rovela.dev/emails \
-H "Authorization: Bearer re_your_sending_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: verify-signup-8f3a2c" \
-d '{
"from": "Acme <no-reply@yourdomain.com>",
"to": "alice@example.com",
"subject": "Your Acme code: 482913",
"html": "<p>Your verification code is</p><p style=\"font-size:28px;letter-spacing:6px\"><b>482913</b></p><p>It expires in 10 minutes.</p>",
"text": "Your verification code is 482913. It expires in 10 minutes."
}'
The key must be stable for the logical send — verify-signup-8f3a2c, or signup-verify:${userId}:${codeId} — not a fresh UUID on every retry. If you generate a new key each time, the header cannot help you, and the reader can receive two codes that disagree.
A 200 from a retry may be the original id. Treat it as “this send already exists,” not as “a second message was queued.” Delivery is still asynchronous; check status or a webhook after that (Email Delivery Status API).
2. When the API says 429
429 means rate limit exceeded. The Emails API notes that each message in a batch counts individually, so a large batch can trip this partway through. The first-email guide adds that the rate limit is per key. Official docs do not publish a numeric HTTP requests-per-second figure, and this article will not invent one.
A second, documented 429 is the monthly allowance. If you go over, sending stops for the rest of the month: the API answers 429 with how much you have used, and nothing is billed automatically. The allowance resets at the start of the calendar month; you can also upgrade to keep sending (Pricing).
What to do in code, without inventing headers the docs do not describe:
- Stop retrying immediately in a tight loop.
- Distinguish “too many requests right now” from “the monthly quota is spent” using the error
message(log it as-is). - If you were sending a batch, remember that some entries may already have been accepted — hold any ids you received, and do not blindly resubmit the whole array without idempotency keys on a subsequent single-send or a carefully keyed retry.
- For mailbox SMTP (not the HTTP API), the documented cap is 30 messages a minute from one client address (SMTP). That path is the wrong volume tool anyway (Email API vs SMTP Relay).
3. Webhook delivery retries (the provider retrying you)
When Rovela posts an event to your endpoint, you must return 2xx once you have taken custody of the event — quickly, with work done in your own queue (Webhooks overview).
A delivery that is not answered 2xx is retried to a maximum of five attempts in total, with the delay doubling each time:
- attempt 1: immediate
- attempt 2: after 1 second
- attempt 3: after 2 seconds
- attempt 4: after 4 seconds
- attempt 5: after 8 seconds
Only transport-level failures are retried: 5xx, 408, and 429. Any other response, including other 4xx, marks the delivery failed and it is not tried again. A 400 you return because a payload surprised you is a permanent loss. Deduplicate on the event id (retries reuse it). x-resend-delivery-id identifies the attempt, not the event.
If the server was down for longer than that window, the failed delivery remains visible in the dashboard event log (Email API Logs).
A compact policy you can implement
- Every
POST /emailsfrom a queue gets anIdempotency-Keyderived from the business action. - Timeouts retry the same body and the same key, and then stop.
429retries (if at all) only after you have read the error message and ruled out a spent monthly quota; never in a hot request path.- Webhook handlers return
2xxafter persisting the event id, and verify the signature first.
FAQ
Does idempotency cover webhook retries? No. Idempotency protects your send requests. Webhook retries are a separate, documented schedule. Deduplicate inbound events on id.
Can I cancel a send I retried by mistake without a key? If the duplicate already went out, no. If it is still scheduled and unsent, POST /emails/:id/cancel with a full_access key may apply (REST Email API). The cheaper fix is to have used a key the first time.
Are send-side retries also five attempts with 1s/2s/4s/8s? That schedule is documented for webhook deliveries to you, not for your retries of POST /emails. Do not copy it as a send-side SLA.
Retry the request, not the person
Make the send idempotent, treat 429 as a stop sign until you know why, and make webhook handlers cheap and 2xx. That is the retry story the current Rovela docs actually support.