Skip to main content
Networks fail and queues redeliver. Without protection, a retry after a timeout can send the same receipt twice. Send an Idempotency-Key header with any POST and Sendbaze remembers the result.

How it behaves

  • Same key, same body within 24 hours: the original response is returned with the header Idempotent-Replayed: true. Nothing is sent again.
  • Same key, different body or channel: 409 idempotency_conflict. A key identifies one logical send; do not reuse it for a new message.
  • Request failed before the message was queued (validation, suppression, allowance): the key is released, so a corrected retry goes through.
  • After 24 hours the key is released.
  • Keys are up to 255 characters and scoped to your organisation. Something you already have is the best key: an order id plus the event, a job id, a UUID you store with the record.

Where it matters

  • Job queues that retry on failure (Sidekiq, Celery, BullMQ, SQS consumers).
  • Serverless functions that may run more than once for one trigger.
  • Any client that retries on timeout, which should be every client.
Batch endpoints apply the key to the whole batch, not to each item.