SpecinboxDocs
← Dashboard

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
SituationResult
First time we see the keyRuns normally
Same key, identical request, already finishedReplays the original response, header Idempotent-Replayed: true
Same key, a second request arrives before the first finished409 conflict
Same key, a different method/path/body422 idempotency_mismatch
The original request 5xx'dNot stored — safe to retry with the same key

Keys are kept for 24 hours.