Skip to main content
Networks fail at the worst moment. If you send POST /v1/calls and the connection drops before the answer arrives, you can’t tell whether the call was placed. Retrying blindly could ring someone twice. So creates and control actions require an Idempotency-Key header. Send a unique value with each new request, and the same value when you retry it:

How it behaves

Details worth knowing:
  • Keys are scoped to your workspace, your credential and the operation. Two different integrations can’t collide.
  • A key is honoured for 24 hours. After that, the same key is treated as new.
  • Keys can be up to 255 characters. A UUID v4 is the simplest choice.
  • A replay re-checks authorization first, so knowing someone else’s key never hands you their result.
  • If an attempt crashes mid-way, the key is released after 60 seconds so a retry can take over.
Creating an API key is the one exception to “the first response again”. A replay returns the key’s details but never the secret a second time, because a key is only ever shown once.

Which endpoints need a key

Idempotency-Key is required on every POST that creates something or takes an action: placing and cancelling calls, creating agents, tools, webhooks, widgets and knowledge sources, publishing, buying numbers, moving minutes, starting web calls, and so on. Without it they answer 428 precondition_required. The only POSTs that don’t need one are read-only ones, like POST /v1/agents/validate and POST /v1/knowledge/search. Some PATCH and DELETE operations take one too, such as editing or archiving an agent. The API reference marks the header required on every operation that needs it.
The SDKs send a fresh key on every create and action automatically, and reuse it on retries.

A retry helper