Skip to main content
Provide a unique Idempotency-Key per logical request. Retries with the same key return the original result. Rules
  • Scope: idempotency is enforced per organization
  • Header: Idempotency-Key: <unique value> (recommended)
  • Body: idempotencyKey is accepted when a header cannot be set
  • Determinism: identical inputs with the same key return the first created sendId
Headers
HeaderTypeRequiredDescription
Idempotency-KeystringnoUnique per logical request (recommended)
Body
FieldTypeRequiredDescription
idempotencyKeystringnoUse when a header cannot be set
Example
curl -X POST "$BASE/api/v1/emails/send" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: send-123" \
  -H "Content-Type: application/json" \
  -d '{"to":"user@example.com","subject":"Hi","content":"Hello"}'
If the request is retried with the same key, the API returns the same { sendId, status, messageId, reused: true }. Response headers
  • Idempotency-Key: echoes the key used for the request (when provided)
  • Idempotency-Replayed: true when a previous result is returned for the same key