Idempotency
Safe retries for POST requests.
Every /v1 POST accepts an Idempotency-Key header (up to 255 characters, any value you generate — a UUID is fine). Retry the exact same request with the same key as many times as a flaky network needs:
curl -s https://devapi.temp-mail.lol/v1/inboxes \
-H "Authorization: Bearer tm_live_YOUR_KEY" \
-H "Idempotency-Key: 4c2f-91cd-4a3e-8b7d" \
-X POST| Situation | Result |
|---|---|
| First time we see the key | Runs normally |
| Same key, identical request, already finished | Replays the original response, header Idempotent-Replayed: true |
| Same key, a second request arrives before the first finished | 409 conflict |
| Same key, a different method/path/body | 422 idempotency_mismatch |
| The original request 5xx'd | Not stored — safe to retry with the same key |
Keys are kept for 24 hours.