An idempotency key is a client-chosen identifier sent with a request so that retrying it after a timeout or error returns the original result instead of sending the message twice.
Networks fail after the server acted and before the client heard about it. Without idempotency, the safe reaction to a timeout is to do nothing, and the unsafe one is to retry and send a duplicate. With a key, the client retries freely: the server recognises the key, replays the first response and sends nothing new.
The key should be derived from your own business identifier (order number, user and attempt) so that retries from different processes collide correctly, and it should be reused, never regenerated, on a retry.
At SMSMeteor: any POST accepts Idempotency-Key; the same key with the same payload within 24 hours returns the original response with Idempotent-Replayed: true, and a different payload gets 409 idempotency_conflict.
