Skip to main content
Networks fail. If your request to start a call times out, you cannot know whether the call was created. Send an Idempotency-Key header, and retrying becomes safe:
  • Keys are up to 255 characters (251 on POST /v1/batches) and are honoured for 24 hours. After that the same key starts a new call.
  • Build them from your own ids (lead-8812, enquiry-5521-attempt-2) so that a retry naturally reuses the key, and a deliberate new attempt gets a new one.
  • Two requests with the same key at the same moment create one call.

Batches

POST /v1/batches takes an Idempotency-Key too, of up to 251 characters.
  • A replay never places a call. A row the first request accepted but could not place (call_failed, or call_already_queued found while queueing) comes back as call_not_placed. To call it, send it again in a new batch, without the key or under a new one.
  • A batch in which no call was placed at all is not remembered: retrying it is a new attempt.
Without a key, a re-sent batch is still partly protected: a number that already has a waiting call is rejected as call_already_queued.

Counsellors and agents

POST /v1/counsellors and POST /v1/agents take an Idempotency-Key too (up to 255 characters, 24 hours), with the same rules: the same request returns the counsellor or agent the first one made (200, idempotent_replay: true, as it is now), a different request is 409 idempotency_key_reused, and a retry while the first is still running is 409 request_in_progress (Retry-After: 5). A request that failed leaves the key free to retry, and a request that was cut off (no answer within two minutes) no longer blocks it: after two minutes a retry runs. Adding a counsellor is also safe without a key: an email that is already a counsellor in your account comes back with created: false and nothing changes.