Skip to content

API guide

Contact center

Dialer campaigns and their modes, lead upload, dispositions and callbacks, the wallboard, call scripts, and do-not-call compliance.

Dialer campaigns#

A campaign dials a list of leads and connects answered calls to its agents. Scopes: campaigns:read to read, campaigns:write to create, change, start and stop campaigns and to upload leads.

modeHow it dials
previewthe agent sees the lead first and clicks to dial
progressiveone call per available agent, dialed automatically
predictiveseveral calls per available agent, adapting the ratio to keep abandoned calls under maxAbandonPct
powera fixed number of lines per ready agent (linesPerAgent, 1–5)
super_powera higher fixed number of lines per agent; extra answered calls follow the noAgent action
aian AI agent (aiAgentId) talks instead of a human; dialRatio is the number of concurrent AI calls
voicemailleaves a voicemail message per lead (ringless voicemail or voicemail drop); see AI agents and ringless voicemail

Create and start a campaign#

curl -X POST "$LEXO_URL/api/v1/campaigns" \
  -H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "Renewals", "object": "lead", "mode": "progressive", "windowStart": "09:00", "windowEnd": "18:00", "timezone": "America/New_York", "useLeadTimezone": true, "agentIds": ["0b7e5d1c-2a3f-4e6d-8c9b-1a2b3c4d5e6f"], "maxAttempts": 3, "retryMinutes": 60, "amdEnabled": true, "amdAction": "hangup"}'

Useful fields:

  • object: the CRM object the leads are (lead, contact, …).
  • windowStart / windowEnd and timezone: the calling hours. With useLeadTimezone: true each lead is called only inside the window in its own time zone.
  • maxAttempts, retryMinutes and retryRules (minutes per result, for example {"busy": 7, "no_answer": 45, "machine": 240}); rotatePhones tries a lead's next phone number on a retry.
  • amdEnabled and amdAction (hangup, message with amdMessage, or connect): what to do when an answering machine picks up.
  • callerIdProfileId: the caller ID profile (see Phone system).
  • noAgent: what happens when a customer answers and no agent is free: {"action": "hangup"}, {"action": "message", "message": "..."}, {"action": "voice_drop", "vmMessageId": "..."} or {"action": "callflow", "callflowId": "..."}.
  • scriptId: the call script shown to agents (see below); nationalDnc: also check national do-not-call registries.

Add leads (next section), then start the campaign:

curl -X POST "$LEXO_URL/api/v1/campaigns/CAMPAIGN_ID/status" \
  -H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" -d '{"status": "running"}'

A campaign without leads cannot start (409). PUT /campaigns/{id} changes the settings; DELETE /campaigns/{id} deletes a paused campaign.

Leads#

POST /campaigns/{id}/leads/upload adds up to 10 000 leads at a time, as JSON rows or a CSV file. LexoConnect creates or reuses CRM records (deduplicated by phone number) and skips numbers on the do-not-call list and invalid numbers.

curl -X POST "$LEXO_URL/api/v1/campaigns/CAMPAIGN_ID/leads/upload" \
  -H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
  -d '{"rows": [{"name": "Grace Hopper", "phone": "+12125550123", "email": "grace@example.com", "timezone": "America/New_York"}]}'

POST /campaigns/{id}/leads/load adds existing CRM records of the campaign's object instead (optionally filtered by ownerId, stageId or a search q). GET /campaigns/{id}/leads lists leads with their status, attempts and last result. When a lead reaches a final state, LexoConnect sends campaign.lead.completed. GET /reports/lead-uploads lists every upload with its counts.

Dispositions and callbacks#

Dispositions are the outcomes agents pick at wrap-up ("Sale", "Not interested", "Call back"). GET /dispositions lists them; PUT /dispositions replaces the list (scope campaigns:write). A disposition can schedule a callback; the agent (or your system) then gives a follow-up time.

  • Agents save the outcome in the LexoConnect app, or your product saves it with POST /calls/wrapup (see Calls).
  • A follow-up time creates a task for the agent; GET /crm/tasks lists the key user's open tasks, and LexoConnect's callback queue shows every due callback to agents and supervisors.
  • For a dialer lead, the disposition decides whether the lead is retried later or completed.
  • Every saved outcome sends the call.dispositioned webhook with the disposition, note, follow-up, record, lead and campaign, which is the easiest way to copy outcomes into your own CRM.

Wallboard and reports#

  • GET /supervisor/board (scope calls:monitor): live queues, agents and their state, live calls and missed calls today.
  • GET /reports?from=2026-11-01&to=2026-11-30 (scope reports:read): calls, agents, queues, dispositions, campaigns and pipelines for a date range.
  • GET /reports/missed-calls and GET /reports/call-qa (AI quality scores of reviewed calls).
  • The agent.state webhook reports every agent state change (for example available, ringing, on_call, wrap_up, break and offline).

Call scripts#

A call script is text with merge fields shown to the agent beside the lead during a call, for example Hi {{first_name}}, this is {{agent_first_name}} from {{company_name}}.

curl -X POST "$LEXO_URL/api/v1/call-scripts" \
  -H "Authorization: Bearer $LEXO_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "Opener", "body": "Hi {{first_name}}, this is {{agent_first_name}} from {{company_name}}."}'

GET /call-scripts/render?campaignId=...&recordId=... returns the script with the merge fields filled in, for your own agent screen.

NeedEndpoint
Company do-not-call listGET /dnc, POST /dnc {"phones": ["+1..."], "reason": "..."}, DELETE /dnc/{phone}
National registries (uploaded lists)GET /dnc/registries, POST /dnc/registries, PATCH/DELETE /dnc/registries/{id}, POST /dnc/registries/{id}/refresh
Check one numberGET /dnc/check?phone=%2B12125550123
Emergency (E911) addressesGET /emergency/addresses, PUT /users/{id}/emergency-address (scope users:write)

Dialer campaigns skip numbers on the company list (and on enabled national registries when nationalDnc is on), and only call inside the calling window. Recipients who opt out of messages (for example by replying STOP to an SMS) are refused on that channel with 409 opted_out. Calling and messaging consent rules (TCPA and similar laws) remain the company's responsibility.

Contact center · API guide · LexoConnect