Skip to main content

Idempotency

Use an idempotencyKey to safely retry requests without sending duplicate messages.

How it works

Pass a unique string per logical send operation. If Notifo has already processed a request with that key, it returns the original response instead of sending again.

{
"to": "+905551234567",
"text": "Your OTP is 123456",
"idempotencyKey": "otp-user-42-attempt-1"
}

Rules

  • Keys are scoped to your tenant — the same key used by two different tenants is treated as two separate messages.
  • Keys are unique per API request. If you send the same key with different content (different to, different text), the original message is returned unchanged.
  • Maximum key length: 100 characters.
  • There is no expiry window documented — treat keys as permanent to be safe.

When to use it

  • Retrying a failed HTTP request when you don't know if the first one reached the server
  • Retry loops that might execute more than once
  • Any scenario where at-most-once delivery matters (OTPs, financial notifications)