Idempotency
Prevent duplicate charges with Idempotency-Key. Include a unique key (at least 8 characters) in every request header.
Idempotency-Key: my-campaign-launch-v2Behavior
| Scenario | Result |
|---|---|
| Same key + same body | Cached Returns cached response, no re-charge |
| Same key + different body | 409 IDEMPOTENCY_CONFLICT |
| Key missing | 400 IDEMPOTENCY_KEY_REQUIRED |
| Key in use (job running) | 409 IDEMPOTENCY_IN_PROGRESS |
💡 Use a deterministic key per content piece (e.g.
weekly-promo-{date}-{appName}) so retries are safe and intentional.