Phone
Use Phone endpoints for telephony resource management.Authentication & scope
- Header:
X-API-Key: YOUR_API_KEY - Read operations:
phone:read - Write operations:
phone:write - Use API Reference for Try-it on each phone endpoint.
GET /v1/phone/purchases
Lists purchased numbers for your organization.
Common status codes
200success403missingphone:read500server error
GET /v1/phone/contacts/{id}
Lists contacts for a purchased number.
Common status codes
200success403missingphone:read404purchase not found500server error
POST /v1/phone/allocate-assistant
Assigns which agent answers inbound calls and which one places outbound calls on a purchased number. Optionally turns on call forwarding for the number in the same request.
An announcer agent can only be allocated as
outboundAssistantId, never inboundAssistantId — it’s rejected with a 400 there since announcer agents can’t handle inbound calls. inboundAssistantId is still a required field on every call to this endpoint, even for a number that only ever places announcer calls; use any conversational agent you aren’t otherwise routing inbound calls to.Request body
Common status codes
200success400validation error;inboundAssistantIdis an announcer agent; orcallForwardingNumberis not in the same country as the purchased number403missingphone:write404resource not found500server error
PATCH /v1/phone/{id}/call-forwarding
Turns call forwarding on or off for a purchased number, and configures when calls get forwarded.
Request body
callForwardingWhen accepts:
always— every inbound call is forwarded immediately, without connecting to the assistant.unavailable— forwarded only if the number has no inbound assistant assigned.no_answer— forwarded if the assistant doesn’t pick up within the connect timeout.busy— accepted by the API but not yet enforced.
Common status codes
200success400validation error (e.g.callForwardingNumbermissing or not E.164 when enabled); or not in the same country as the purchased number403missingphone:write404phone purchase not found500server error
GET /v1/phone/{id}/call-forwarding/history
Lists forwarding events for a purchased number, most recent first.
Common status codes
200success403missingphone:read404phone purchase not found500server error
POST /v1/phone/schedule-call
Schedules a batch of outbound calls to a list of contacts, all using the same message and outbound number, at one or more future dates. Use this for a standard conversational-agent campaign; for a personalized one-way announcer campaign, use POST /v1/phone/schedule-announcer-campaign instead.
Request body
201 Created
dates can create more than one call schedule in a single request (one per unique date), so there’s no single id to hand back. Look the schedule up afterwards via its campaign name.
Common status codes
201scheduled400validation error403missingphone:write404resource not found500server error
POST /v1/phone/contacts
Adds a single contact to a purchased phone number. Use this for one-off additions; for bulk import, use POST /v1/phone/contacts/upload instead.
Request body
Common status codes
200success400validation error, or contact already exists403missingphone:write404phone number not found500server error
POST /v1/phone/contacts/upload
Uploads a contact list file (.xlsx, .vcf, or .csv) for a purchased phone number. Each phone number in the file must include a country code (start with +).
200 OK
Common status codes
200success400unsupported file type, or numbers missing country code403missingphone:write404phone number not found500server error
POST /v1/phone/announce
Places an outbound announcer call: the system dials the destination number and, once the call connects, speaks a one-way message — either synthesized from text or played back from an audio source — using the voice configured on the assistant allocated to the purchased number, then automatically hangs up. The call never listens for or accepts caller audio; nothing the recipient says is transcribed or acted on.
This is useful for reminders, alerts, one-time codes, or any broadcast-style message that doesn’t need a two-way conversation.
This endpoint dials out with an announcer agent that’s already been created and allocated to the number. To create and configure the agent itself (message, voice, personalization), see Agents → Announcer agents.
How it’s routed
- The underlying telephony carrier for the purchased number is resolved automatically — you don’t choose it.
- The assistant used is the number’s
outboundAssistantIdif set, otherwise itsinboundAssistantId. That assistant must be configured with a voice provider that supports announcer calls; assistants configured to rely on a full conversational voice engine are rejected, since announcer calls are one-way only (no conversation, no listening). - The call is placed first (a
Callsrecord is created and the number is dialed), and once it connects, the announcement is streamed into the live call audio. - At the end of the call: the transcript, call analysis, and call tag are generated as with any other assistant call, and credit is deducted from your organization’s balance for call duration exactly as with
/v1/calls/phone/initiate.
Request body
201 Created
id with the Calls endpoints — GET /v1/calls/{id}, GET /v1/calls/{id}/transcripts, GET /v1/calls/{id}/analysis, and GET /v1/calls/{id}/recording — to check on the announcement call afterwards.
Common status codes
201announcer call initiated400validation error; zero or more than one oftext/audioUrl/audioFileprovided; the audio couldn’t be fetched or processed; the allocated assistant isn’t configured for announcer calls; the number’s carrier doesn’t support announcer calls; or the phone number is no longer active403missingphone:write404phone purchase or assistant not found500server error
GET /v1/phone/announcer/{phoneId}/campaign-template
Downloads an .xlsx contact sheet template for a personalized Announcer agent. The outbound assistant is resolved from the purchased phone number itself (its outboundAssistantId), not passed separately. The template has a phone_number column plus one column per personalization parameter the agent’s message uses (e.g. {first_name}, {amount} — these are extracted automatically from the message, never declared by the caller).
Non-personalized announcer agents (a single TTS or uploaded-audio message with no {placeholders}) don’t use this campaign flow at all — schedule them the same way as conversational agents, via POST /v1/phone/schedule-call.
To make an agent personalized — so it has parameter columns to download here — set its message with
personalized: true via PUT /v1/agents/{id}/announcer-message. See Agents → Personalized campaign flow for the full sequence.Common status codes
200success (binary.xlsxresponse)400this phone number does not have a personalized announcer agent allocated as its outbound assistant, or that agent has no message configured403missingphone:read404phone number not found500server error
POST /v1/phone/schedule-announcer-campaign
Schedules a personalized Announcer campaign: uploads a filled-in contact sheet (from the template above) and schedules a one-way, personalized announcer call to every row. Every parameter the agent’s message uses must be present as a column in the sheet, alongside a mandatory phone_number column.
Request body
201 Created
Common status codes
201scheduled400validation error; this phone number does not have a personalized announcer agent allocated as its outbound assistant; contact sheet is missing thephone_numbercolumn or a required personalization column; or a row has an invalid phone number403missingphone:write404phone number not found500server error
GET /v1/phone/get-schedules/{id}
Lists the call schedules (campaigns) created for a purchased number, most recently created first. Use this to find a campaign’s id before calling POST /v1/phone/duplicate-call-schedule/{id} or GET /v1/phone/bulk-call-summary/{id} below, or to check a campaign’s progress.
Path parameters
Query parameters
200 OK
status on each item is 0 (pending — not yet handed off for dialing), 1 (scheduled — already queued to dial; this does not mean every contact has been reached yet), or 2 (failed at the schedule level, e.g. the outbound number became unavailable). The status filter groups 1 and 2 together as scheduled — to know whether every contact has actually been dialed, check GET /v1/phone/bulk-call-summary/{id} below, which returns a 400 until the campaign has finished. contacts is the count of contacts on the schedule that still exist as active phone contacts, not necessarily how many were actually called.
Common status codes
200success403missingphone:read404phone purchase not found500server error
POST /v1/phone/duplicate-call-schedule/{id}
Relaunches a campaign without re-uploading anything: creates a new call schedule that reuses the source campaign’s contact list, phone number, message, and timezone, and queues it to run on a new date you provide. Use this instead of POST /v1/phone/schedule-call when you’re re-running the same audience and message — for example, sending last week’s promo to the same list again next month.
The copy is independent of the source once created — deleting or editing the original afterwards has no effect on it. It always starts fresh in the pending state, so it will be picked up and dialed out on schedule even if the source campaign is still running or has already finished.
Path parameters
Request body
201 Created
Common status codes
201duplicated400datemissing or not a valid ISO datetime403missingphone:write404call schedule not found500server error
GET /v1/phone/bulk-call-summary/{id}
Downloads a one-page report for a finished campaign: how many calls succeeded, failed, or are still pending, plus a short list of contacts that need a follow-up action (e.g. calls that failed to connect). Useful for closing out a campaign — attach it to an internal report or share it with whoever requested the outreach, without having to pull the raw call list and tally it yourself.
This only becomes available once every contact in the schedule has been dialed at least once. Calling it while the campaign is still in progress returns a 400 telling you it hasn’t finished yet.
Path parameters
Query parameters
Common status codes
200success (binarypdfordocxfile)400formatmissing or not one ofpdf/docx; campaign still has contacts left to dial403missingphone:read404call schedule not found500server error