Contents
At a glance
- Category
- Automation mechanics
- Definition
- Doing it twice has the same effect as doing it once
- Why it is needed
- Webhooks deliver at least once and platforms retry - duplicates are normal
- Best mechanism
- The vendor's idempotency key, where offered
- Best for webhooks
- Store and check the sender's event ID before acting
- Highest-risk operations
- Charging, messaging, calendar writes, record creation
What idempotency means
An operation is idempotent if performing it repeatedly produces the same result as performing it once. Setting a customer's status to "won" is idempotent - do it five times, the status is still "won". Creating a customer is not: five attempts produce five records. Sending an SMS is emphatically not, and your customer will tell you so.
This matters because distributed systems retry. Webhooks are delivered at least once, so duplicates are normal. Automation platforms retry failed steps. A call that times out may well have succeeded on the server anyway. Every one of those produces a repeat, and without idempotency each repeat does the work again.
How to make an operation idempotent
Three approaches, from best to workable. Use the vendor's idempotency key where one exists. Stripe's implementation is the reference: you send a unique key with a request, and if the same key arrives again the API returns the original result instead of performing the action a second time. Many payment and messaging APIs offer the same.
Check before acting. Before creating a customer, search for one with that email; before sending a reminder, check whether one was already sent for this appointment. It costs an extra call and it is not perfectly safe against two runs racing each other, but it removes most real duplicates.
Record what you have processed. Store the incoming event ID and check it before doing anything. This is the most robust approach for webhook handlers, because the sender's event ID is naturally unique and stable across retries. A small table or datastore keyed by event ID is usually all it takes.
Where it matters most
Anything with an external consequence, in rough order of embarrassment: charging a card, sending an SMS or email, creating a calendar event, creating a CRM record, posting to a channel. Internal state updates are usually naturally idempotent because they set a value rather than adding one.
Note that REST gives you a hint: GET, PUT and DELETE are defined as idempotent, POST is not. When a workflow retries a POST, assume it may duplicate unless you have made it otherwise.
Cost and the design habit
Idempotency costs an extra lookup or a stored key per operation, which is negligible next to the cost of a duplicate charge or a customer receiving the same reminder three times. It is the cheapest reliability control in automation and the one most often skipped, because the failure only appears under conditions - a timeout, an outage, a burst - that never occur while you are testing.
Build it in at the start for anything customer-facing. Retrofitting it after the incident means writing the deduplication logic and separately cleaning up the duplicates you already created, which is the expensive order to do it in.
What you should know
Design your retry policy and your idempotency together - retries are only safe because operations are idempotent, so a platform that retries automatically has made this decision for you whether or not you noticed. And when you cannot make something idempotent, make it visible: log every send with its identifier so a duplicate can at least be detected and explained rather than argued about.
Idempotency FAQ
What does idempotent mean?
That repeating an operation has no additional effect. Setting a value is idempotent; creating a record or sending a message is not. It is the property that makes retries and duplicate webhook deliveries safe rather than damaging.
What is an idempotency key?
A unique identifier you send with a request so the service can recognise a repeat. If the same key arrives again, the API returns the original result rather than performing the action a second time. Stripe's implementation is the widely copied reference.
Why did my customer get the same text twice?
Almost certainly a retry or a duplicate webhook. The send succeeded but the response was slow or lost, so the platform tried again, or the sender redelivered the event. Recording the event ID and checking it before sending is the standard fix.
Which operations need idempotency protection?
Anything with an external consequence: charging a card, sending an SMS or email, creating a calendar event, creating a CRM record. Internal updates that set a value are usually naturally idempotent, because setting a field twice leaves it the same.
How do I make a webhook handler idempotent?
Store the sender's event ID the first time you see it, and check for it before doing any work. The event ID is stable across retries, so a repeat is recognised immediately. A small table or key-value store is enough, with old entries expired after a sensible window.
Does my automation platform handle this for me?
It handles the retrying, not the deduplication - which means the platform has already decided that repeats will happen, and the safety is your responsibility. Check what your platform retries automatically, then make every externally visible action idempotent.
Primary source
Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.
Want this built rather than explained?
Knowing what idempotency means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.
