For Developers
Get started

Core concepts

How agents, voices, phone numbers, calls, conversations, contacts, campaigns and your wallet relate to each other.

An agent uses a phone number to call someone. That call produces a call log and usually a recording. Your wallet pays for it.

Who makes the call

What a call produces

A call and a call log are different records with different IDs. A call exists as soon as you request it, and it ends as completed or failed. A call log exists once the call has run. Its directCallId points back to the call.

Who gets called

What pays for it

Before a queued call is dialed, a hold for its maximum duration is placed on your wallet. If the hold can't be covered, the call fails with the failure_code insufficient_balance.

The life of a call

  1. POST /v1/calls checks the request, the agent and the phone number. A problem at this stage returns an error, and nothing is queued.
  2. An accepted call returns 201 with a callId. Its status is queued.
  3. The call waits for the recipient's calling hours and a free line, then funds are held. Its status is dialing.
  4. The call goes out. Its status is in_progress.
  5. The call ends as completed or failed. A failed call has a failure_code that says why.

Read the status at any point with GET /v1/calls/{id}. See Calls.

How the IDs connect

These fields link the resources. Field casing differs between resources, so use the names exactly as shown.

ResourceFieldPoints to
AgentvoiceCloneIdVoice
AgentknowledgeBaseIdKnowledge base
AgentfollowUpSequenceIdFollow-up sequence
Phone numberassignedAgentIdAgent
Callagent_idAgent
Callphone_number_idPhone number
ConversationagentIdAgent
Call logagent_idAgent
Call logdirectCallIdCall (its id)
Recordingcall_log_idCall log (its call_id)
Campaignassistant_idAgent
Campaignaudience_idAudience
Campaignphone_number_idPhone number

Audiences link to contacts directly. GET /v1/audiences/{id}/members returns contact objects.

provider_call_id appears on calls, call logs and recordings. It is the same ID on all three, so quote it when you ask about a call.

Where to set things up

The API doesn't create agents, voices, phone numbers or campaigns. Set those up in the dashboard, then use the API to run calls and read results.