CRM click-to-call with a status callback
- Make a key with the Click-to-call preset, allowed from your CRM’s servers.
- When an agent clicks a number, call
POST /calls:from.user_email: the agent’s login;to: the number they clicked;reference: the CRM’s activity id;callback_url: your endpoint;- an
Idempotency-Key, in case the CRM retries.
- Your endpoint receives
call.started,call.answeredandcall.ended(duration, outcome, recording), each carrying yourreference. Log the call against the activity. - When
recording.readyarrives, fetch the recording withGET /cdrs/{call_uuid}/recording/audio.
Screen-pop when a customer calls
- Subscribe a webhook to
call.ringing, or open the live event stream in the agent’s browser. - On each event, look up the caller with
GET /contacts/lookup?number={caller}. It returns the contact, their open tickets and what was said on their last calls. - Open the matching CRM record, using the contact’s
external_ref.
Have the AI agent call a lead
- When a lead comes in, call
POST /calls/aiwith:profile_id: your sales agent’s profile;to: the lead’s number;variables: what the form captured ({"name": "Sam", "interest": "whitening"});reference: the lead id;callback_url: your endpoint.
- The agent calls them, knowing what’s in
variablesand following its role and SOP. conversation.completedbrings the summary. If the agent booked a callback,callback.requestednames the person assigned. If nobody answered,call.failedsays why, and you can try again later.
Run a campaign from your system and get each result
POST /campaignswith areferenceand aresult_callback_url.POST /campaigns/{id}/contactswithitems, each with the lead’sreferenceandvariables. Send batches of up to 10,000, each with anIdempotency-Key.POST /campaigns/{id}/start.- Each
campaign.contact.completedbrings one lead’s outcome under its reference.campaign.completedbrings the totals. - Anything your endpoint missed can be read back from
GET /campaigns/{id}/results?since=….
Sync calls to a data warehouse
- Nightly, call
GET /cdrs/export?from=<yesterday>&to=<today>&format=ndjsonwith a Read calls & CDRs key. - Load the file. Each row carries
reference,contact_idandcampaign_id, so you can join calls to your own tables. - Allow the job’s address on the key. An export from an address the key doesn’t allow is refused and shows in Developer → Request log.
Keep contacts in step with your CRM
- When a CRM contact is created or changed, call
PUT /contacts/by-reference/{crm id}with the number, name and any attributes. Attributes merge into the existing ones. - When FireTone meets a new caller,
contact.createdarrives withsource: "call". Create them in the CRM, then write your id back with the samePUT.