API guide
Calls
Place calls, control live calls, read call history, download recordings and transcripts, and monitor calls in progress.
How calls work#
Every call belongs to a user (an extension) of the company. When your integration places a call with the API, LexoConnect first rings that user's phone (the browser webphone, a softphone or a desk phone); when the user answers, LexoConnect dials the customer as that user. All the company's rules apply exactly as if the user had dialed: caller ID profiles, call protection and fraud checks, least-cost routing over the company's trunks, the recording policy and the prepaid balance.
A call has two ids:
id: the call record id (UUID) used by the history endpoints (GET /calls/{id}, recordings, events, transcript).callUuid: the id of the live call. The live control endpoints (hang up, transfer, record, park, conference, monitor) accept any leg UUID of the live call, orcurrentfor the key user's own active call. Webhooks (call.ringing,call.answered) and the wallboard carrycallUuid.
Place a call (click-to-call)#
POST /calls/originate (scope calls:write). Give the destination to (E.164 or an extension) and the user whose phone rings first, by userId or extension (default: the key's user). Placing a call for another user needs the creator of the key to be a supervisor or admin.
curl -X POST "$LEXO_URL/api/v1/calls/originate" \
-H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
-d '{"extension": "101", "to": "+12125550123", "timeoutSec": 30}'The answer comes as soon as the user's phone starts ringing (202):
{ "status": "ringing_user", "callUuid": "3f0c1d8e-7a51-4d1b-9a3e-2b51d2f4b6a0", "userId": "0b7e5d1c-...", "extension": "101", "userName": "Olivia Owner", "to": "+12125550123" }Optional fields: callerId (an E.164 number the company owns, to present to the customer) and timeoutSec (how long the user's phone rings, 5–120, default 30). Follow the call through the call.answered and call.ended webhooks rather than polling.
POST /ai-agents/{id}/calls; see AI agents. To dial lists of numbers, use a dialer campaign; see Contact center.Control a live call#
All of these take the live call reference in the path (callUuid, any leg UUID, or current). Scope calls:write.
| Action | Endpoint | Body |
|---|---|---|
| Hang up | POST /calls/{id}/hangup | none |
| Transfer | POST /calls/{id}/transfer | {"target": "...", "mode": "blind" | "attended"} |
| Add a third party (3-way call) | POST /calls/{id}/conference | {"add": "102"} (extension or E.164) |
| Leave a 3-way call | POST /calls/{id}/conference/leave | none |
| Start or stop recording | POST /calls/{id}/recording | {"action": "start"} or {"action": "stop"} |
| Park | POST /calls/{id}/park | optional {"timeoutSec": 120} |
| Pick up a parked call | POST /parked/{slot}/pickup | none |
| Leave a saved voicemail and free the agent | POST /calls/{id}/voicemail-drop | {"messageId": "..."} |
Transfer targets: an extension ("102"), an E.164 number, queue:<queueId>, ai_agent:<agentId>, voicemail:<userId> or callflow:<callflowId>. A blind transfer hands the caller over at once; an attended transfer first connects the transferring user with the target.
curl -X POST "$LEXO_URL/api/v1/calls/3f0c1d8e-7a51-4d1b-9a3e-2b51d2f4b6a0/transfer" \
-H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
-d '{"target": "queue:6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f", "mode": "blind"}'Park puts the caller on hold in a numbered slot (GET /parked lists them) where any user can pick the call up. There is no separate hold / unhold endpoint: hold is a button on the user's phone, and park is the server-side way to hold a caller for someone else. Live control answers 409 conflict when the call has already ended and 503 media_unavailable when the phone system is briefly unreachable.
Call history#
GET /calls (scope calls:read) lists calls newest first, with filters direction (inbound, outbound, internal), status (answered, missed, voicemail, ai_handled, failed), mine=true, limit and cursor. Without the supervisor role, the creator of the key sees only their own calls.
curl "$LEXO_URL/api/v1/calls?direction=inbound&status=missed&limit=50" -H "Authorization: Bearer $LEXO_API_KEY"Each call record has from, to, fromName, toName, startedAt, answeredAt, endedAt, durationSec, status, hangupCause, the handling userId, the linked CRM recordId, the dispositionId saved at wrap-up, transferCount, the callerIdUsed and the answering machine result amdResult (human, machine, unknown). More detail:
GET /calls/{id}: one call.GET /calls/{id}/events: what happened during the call (transfers, park and pickup, recording, answering machine detection).GET /calls/{id}/transcript: the transcript and AI summary of a call that was transcribed (when live transcription is on for the queue or campaign).GET /calls/{id}/recordings: the on-demand recordings of a call.GET /reports/missed-callsandGET /reports(scopereports:read): totals by number, queue, agent, hour or day, as JSON or CSV (format=csv).
The call.ended webhook delivers the same call record the moment a call ends, which is the best way to keep another system in sync.
Recordings and voicemail#
| What | Endpoint |
|---|---|
| Full-call recording (audio) | GET /calls/{id}/recording |
| One on-demand recording (audio) | GET /calls/{id}/recordings/{recId}/audio |
| Voicemails of the key's user (or all, for admins) | GET /voicemails |
| Voicemail audio | GET /voicemails/{id}/audio |
| Mark a voicemail read / delete it | PATCH /voicemails/{id} {"read": true} / DELETE /voicemails/{id} |
Audio downloads need the Authorization header. To play a recording in a browser or another system without a key, ask for a signed link (valid 1 hour by default, at most 24 hours):
curl -X POST "$LEXO_URL/api/v1/media/sign" \
-H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "/api/v1/calls/8a7c2b4e-5f1d-4c3a-9b2e-1d0f3a6b7c8d/recording", "expiresInSec": 3600}'The recording.ready and voicemail.created webhooks already include a 24-hour signedUrl.
Monitor live calls (listen, whisper, barge)#
Scope calls:monitor. Supervisors can join a live call in three modes:
listen: hear both sides, unheard;whisper: talk to the agent only (coaching);barge: talk to both sides.
POST /calls/{id}/monitor rings the monitoring user's phone (the key's user, or userId); when they answer they join the call.
curl -X POST "$LEXO_URL/api/v1/calls/3f0c1d8e-7a51-4d1b-9a3e-2b51d2f4b6a0/monitor" \
-H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
-d '{"mode": "listen"}'GET /supervisor/board (same scope) is the live wallboard: queues, agents with their state, live calls with their uuid, and missedToday. Use it to show live calls in your own dashboard and to pick the call to monitor.
Wrap-up after a call#
When the agent's wrap-up is done in your own product, save it with POST /calls/wrapup (scope calls:write). Send the customer's number and the call direction, plus at least one of a dispositionId (from GET /dispositions), a note or a follow-up time followUpAt. LexoConnect stores it on the CRM record (by recordId, else the newest record with that number) and its timeline; a follow-up becomes a task. For a dialer call, add campaignLeadId so the lead is retried or completed according to the disposition. LexoConnect then sends the call.dispositioned webhook.
curl -X POST "$LEXO_URL/api/v1/calls/wrapup" \
-H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
-d '{"number": "+12125550123", "direction": "outbound", "dispositionId": "4b5c6d7e-8f90-4a1b-2c3d-4e5f6a7b8c9d", "note": "Interested, call back next week", "followUpAt": "2026-11-20T15:00:00Z"}'A disposition that schedules a callback (for example "Call back") requires followUpAt; the request is refused with 400 otherwise.