Skip to main content

Your First Call

The simplest call needs a destination number and a task:
Every call needs task (a short brief) or instructions (full control), at least 10 characters. The call goes out from the default number. To show your own caller ID, add from_number: it must be a number on your account, and GET /v1/phone-numbers lists yours. Anything else is refused with 422 (from_number_not_owned). Numbers starting with +1 (the US, Canada and the rest of North America) can only be called from a number rented from TopCalls or verified for US calling on your account, or from a number on your own carrier (Phone Numbers); without one the call is refused with 422 (us_caller_id_required).

Price a Number Before You Dial

GET /v1/pricing/quote tells you what a minute of a call to a number costs, and whether it can be called at all. It dials nothing, holds no credit and creates no call.
price_per_minute_usd is an exact decimal string in US dollars. Add from (one of your own numbers) to price a call that presents it: a number on your own carrier pays the AI part alone. For a number that can’t be called, the answer is still 200, with allowed: false, zone and price_per_minute_usd both null, and a reason that is the same one POST /v1/calls would refuse it with (Destination Not Allowed lists them). The key needs the calls:read scope.

Complete Example: Appointment Reminder

Optional Parameters

Voice and Mode

Live (the default) runs one voice model that listens and speaks. Live and Standard compares the two. Legacy chains speech recognition, a language model and a voice you pick. A call without mode runs Legacy if it sets voice, model or a Legacy-only field such as stt_provider. See the Voice Library for voices and GET /v1/models for models.

Opening and Length

Without first_sentence, no scripted opening plays. Legacy speaks it word for word; Live may reword it slightly. max_duration caps the call in minutes (default 5). Office ambience plays underneath unless background_audio is none.

Lead Context

Placeholders such as {{name}} fill from lead_context in first_sentence only; the rules and limits are in Placeholders. In task or instructions they stay as written, so put per-lead facts in the lead’s name and notes, which the model reads. lead_id loads a stored lead, and keys you also send in lead_context override it. campaign_id adds that campaign’s knowledge base and nothing else.

Webhooks and Summaries

webhook_url gets one payload when the call ends, limited to the call_status values in webhook_call_status_filter if you set it. For account-wide delivery, use webhook subscriptions. Each finished call carries a written summary; summary_prompt changes what it covers.

More Options

Also available: analysis_schema for structured extraction, scheduled_at to call later, and an Idempotency-Key header for safe retries. temperature, bot_protection_enabled and the speech and voice tuning fields apply to Legacy only. The API reference lists every field.

Response

A scheduled call answers scheduled plus scheduled_at. pending means it’s still being admitted. Sending the same phone_number again within 5 seconds returns the first call instead of placing another.

Call Status

The call also reports price_per_minute_usd, the price it was placed at, and cost_usd, what it cost once it has been charged (What a Call Cost). duration is talk time and actual_duration_billed the minutes charged, both in minutes.

How Calls End

The agent hangs up when the caller wraps up, asks to stop, or asks not to be contacted again. It won’t end the call over a pause, and it says a short goodbye first. Shape this in your instructions, for example: “Confirm the next step before you say goodbye.” Silence works the same in Live and Legacy. After about 7 seconds with nothing from the caller, the agent checks in. If 7 more seconds pass in silence, the call hangs up with no goodbye.

Calling in Another Language

stt_language must be a code GET /v1/models lists, or a regional form of one. Anything else gets a 400.

Error Handling

Invalid Phone Number

Insufficient Quota

Your credit balance can’t cover the call’s max_duration. Calls in progress hold theirs until they end, so add credit or wait for one to finish.
available and requested are talk-minutes at this call’s price. price_per_minute_usd is what one minute of this call costs, in dollars. To place this call you need requested times price_per_minute_usd free: 10 minutes at $0.25 is $2.50.

Every Concurrent-Call Slot in Use

With every concurrent-call slot busy, a new call gets a 429 and nothing is created. The per-minute rate limit also answers 429, but with code: RATE_LIMITED and a Retry-After header. A scheduled call is never refused for concurrency; it waits for a free slot.

Destination Not Allowed

A 422 with code: destination_not_allowed means the number can’t be called. The code is the same for every cause; reason says which one it is and what to do next, and detail says it in a sentence.
Check a number with GET /v1/pricing/quote before you dial it. No call is placed and no credit is held. A well-formed number that can’t be dialed is a 422, not a 400; a 400 means the request itself is malformed.

Other Refusals

None of these places a call or holds credit.
Keep instructions focused (200 to 500 words is plenty), and call your own number before you call real leads.

Next Steps

Function Calling

Let the agent act in your systems during a call.

Webhooks

Receive real-time notifications when calls complete.

Credit and Billing

What calls cost, and how a call reserves credit while it runs.