Skip to content
Get started for free
EN

API reliability

How do I retry an OutSendr API call without creating duplicates?

A timeout does not tell you whether a request succeeded. OutSendr accepts an Idempotency-Key on POST requests so a retry of the same operation can return the first successful result.

01

When should I set Idempotency-Key?

Set it on a POST that creates or triggers one logical action.

For example, one contact creation request gets one key. Store that key with your job so a network retry uses it again. A different contact or a new intentional action gets a new key.

One logical operation

  1. CreateGenerate a unique key for this action.
  2. SendPOST with the key and complete JSON body.
  3. RetryIf uncertain, reuse both the key and identical body.
  4. InspectRead the response and saved resource.
02

What do I send on retry?

Use the same key, path, API key, and request body.

Do not generate a fresh key after a timeout. OutSendr replays a stored successful response for the same POST. If you change the body under the old key, the API rejects that conflicting request.

03

What if two workers retry at the same time?

Treat an in-progress conflict as a reason to wait and inspect state.

OutSendr can report a conflict while another request with the same key is still running. Queue a later check rather than launching two different writes. Keep a durable job record in your own system.

04

Does this cover every HTTP method?

The Idempotency-Key replay mechanism covers POST requests.

For a PATCH or DELETE with an uncertain result, read the resource's current state before deciding whether to repeat the change. Do not assume every endpoint has the same retry contract.

05

How can I test it?

Use an isolated test resource and repeat one harmless POST with the same key.

Confirm that the second response represents the same operation, then try a new key for a genuinely new one. Read the API response and resource ID rather than relying only on a success toast.

How do I retry an OutSendr API call without creating duplicates?

Discover OutSendr