The short answer
Idempotency keys stop retries from causing duplicate side effects. In voice this is not an abstraction: a retried call request places a second real phone call to a real person, which costs money, annoys the recipient, and in a regulated campaign may count as an additional contact attempt against a per-day cap.
In detail
The problem is that a client cannot distinguish "the request never arrived" from "the request succeeded but the response was lost". Both look like a timeout, and both invite a retry. With an idempotency key the server can tell the difference: it records the key with the outcome, and a second request carrying the same key returns the stored response rather than executing again.
Scope and lifetime need to be defined explicitly. A key is normally meaningful within one account and one endpoint, so the same string on a different operation is a different key. The retention period bounds how long a retry is recognised — long enough to cover realistic retry behaviour, short enough that storage does not grow without limit.
Keys must be generated per logical operation, not per attempt. A UUID minted fresh on every retry provides no protection at all, which is the most common way the mechanism is defeated in practice. The key belongs to the intent — this specific call to this specific person for this campaign — and travels unchanged across every attempt to fulfil it.
How Rexa handles it
Every POST in the Rexa API accepts an Idempotency-Key header: an arbitrary UTF-8 string up to 256 characters, scoped to the combination of workspace, endpoint and key. A duplicate request carrying the same key within 24 hours returns the original response rather than performing the operation again, so a retried call-creation request does not place a second call.
Calls APIRelated terms
Webhook
A webhook is an HTTP request sent by a service to a URL you control when an event occurs, delivering the event rather than waiting to be polled.
Function calling
Function calling is the mechanism by which a language model requests execution of a defined external operation and incorporates its result into the conversation.
Credit ledger
A credit ledger is an append-only record of the balance changes in a prepaid usage account, from which the current balance is derived.
Concurrency
Concurrency is the number of calls a system is handling simultaneously at a given instant.