Open in
Outbound Calls
Trigger an outbound voice call from an outbound-enabled phone number.
Place an outbound call from one of your own phone numbers to a target number. You can reference a saved agent by id, or inline a one-off configuration for this call only.
Endpoint
| Method | Path | Description |
|---|---|---|
POST | /v1/call | Place an outbound call |
POST | /v1/calls/{call_id}/cancel | Cancel a queued call before it dials |
Place a call
curl -X POST https://api.thunderphone.com/v1/call \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_number": "+15551234567",
"to_number": "+14155552671",
"agent_id": 12,
"idempotency_key": "crm-task-4815"
}'curl -X POST https://api.thunderphone.com/v1/call \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_number": "+15551234567",
"to_number": "+14155552671",
"config": {
"prompt": "You are calling on behalf of Acme to confirm…",
"voice": "john",
"product": "bolt",
"tools": []
}
}'curl -X POST https://api.thunderphone.com/v1/call \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_number": "+15551234567",
"to_number": "+14155552671",
"agent_id": 12,
"variables": {"name": "Ada", "account_id": "A-17"},
"context": "Ada asked to be called back about the late fee on her March invoice."
}'curl -X POST https://api.thunderphone.com/v1/call \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_number": "+15551234567",
"to_number": "+14155552671",
"agent_id": 12,
"overrides": {"voice": "john", "voice_speed": 1.1}
}'result = requests.post(
"https://api.thunderphone.com/v1/call",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
json={
"from_number": "+15551234567",
"to_number": "+14155552671",
"agent_id": 12,
},
).json()Request fields
| Field | Type | Required | Description |
|---|---|---|---|
from_number | string | yes | E.164. Must be an outbound-enabled number owned by this organization |
to_number | string | yes | E.164 target. A number without a country code is read in the from_number's country and called in E.164 |
agent_id | integer | see below | An agent id in this org |
variables | object | no | Per-call values for {{name}} and {{name|Friend}} placeholders. Strings, numbers, booleans, or null; 32 KB maximum. Applies to the saved agent or inline prompt. See call variables. |
context | string | no | Free-form text for this call, such as a task description or notes collected earlier, up to 20,000 characters. Added after the prompt in a delimited block and not rendered as a template. Works with agent_id, config or the number's outbound agent. Also accepted inside config; when both are sent they must match. See call variables and context |
config | object | see below | Inline config — schema matches the call.incoming webhook response |
overrides | object | no | Changes some of the saved agent's settings for this call only, such as {"voice": "john"}. Works with agent_id or the number's outbound agent, not with config. Keys are agent setting names; each value is checked as an edit of the agent would check it, and a refused one returns 400 with the reason under overrides. A top-level max_hold_seconds wins over the one here. See which settings can change per call |
language | string | no | Language for this call only, such as es (primary_language is accepted as an alias). Overrides the agent's language; when the agent's voice can't speak it, a voice that can is chosen. See supported languages |
phi_mode | string | no | phi handles this call as processing protected health information, even when the agent or organization would not. Only tightens: any other value is a 400. See the agent's phi_processing_override |
max_hold_seconds | integer | no | Override the agent's hold timeout for this call only |
timezone | string | no | IANA time zone for this call only, such as America/Chicago. The agent states the date and time and offers times in it, ahead of the agent's own timezone. Use it when one agent calls contacts in different zones. Also accepted inside config. A name that is not an IANA zone is ignored (the call goes ahead in the agent's zone) and reported in the response's warnings |
idempotency_key | string (1–128 characters) | no | Prevent duplicate origination when the same normalized request is retried. Unique within the organization for the lifetime of the retained call record. May not start with scheduled:, which is reserved for scheduled calls (400). |
Exactly one of:
agent_id— use the saved configuration.config— inline a one-off configuration (same shape as acall.incomingwebhook response).- Neither — the call uses the number's configured
outbound_agent. Fails with400if no outbound agent is set.
Response
Returns 201 Created:
{
"call_id": 987654321,
"status": "initiated"
}| Field | Type | Description |
|---|---|---|
call_id | integer | Assigned id — use it on the call endpoints to follow the call. |
status | string | Always "initiated" on success. This is the initiation status, not the call state machine; poll GET /v1/calls/{call_id} for the live status (in_progress → completed/failed). |
queued_at | timestamp | Only present when the call is waiting for room: when it began waiting. |
warnings | array | Only present when part of the request was ignored, each {"code", "message"}. timezone_invalid: timezone was not an IANA zone. |
201 means LiveKit accepted the origination request. The endpoint does not
wait for the destination to answer. Busy, no-answer, rejection, and trunk
failures therefore normally arrive asynchronously: poll
GET /v1/calls/{call_id} or subscribe
to telephony.complete. A failed dial transitions
the call to failed, releases its billing reservation, and reports a sanitized
end_reason.
The call rings for the agent's ring_duration_seconds
(60 seconds when unset) and never less than 14 seconds: a call that rings
briefly and drops looks like a one-ring scam call. Once it connects and ends,
the call's answered_by says whether a
person, voicemail, a call screening assistant or a phone menu answered.
If the LiveKit submission response times out, ThunderPhone cannot safely know
whether LiveKit accepted the call. The API returns 202 Accepted with the same
call_id and "status": "unknown"; ThunderPhone then reconciles the
deterministic room and SIP participant. It never treats that timeout as a
definite failure or blindly originates a second call.
Idempotent retries
Send idempotency_key when a client might retry POST /v1/call. The key is
scoped to the organization and remains reserved for as long as the CallLog
is retained. The request fingerprint covers the normalized from_number,
to_number, agent_id, complete inline config, language override,
max_hold_seconds, timezone, variables, context and overrides.
A replay of the same request returns 200 OK, the original call_id, and
"idempotent_replay": true without originating a second call. Its status
reflects the durable outcome: pending, unknown, initiated, in_progress,
completed, or failed. Failed replays also include the stored sanitized
failure_reason. Reusing a key with a different normalized request returns
409 Conflict.
Poll GET /v1/calls/{call_id}
to observe state transitions:
Live status | Meaning |
|---|---|
in_progress | SIP dialing or connected, or waiting for room when queued_at is set |
completed | Call ended normally |
failed | Call could not be established (trial-mode, unverified number, provider error) |
Queued calls
ThunderPhone keeps some of its shared outbound capacity free for live
transfers. When the rest is in use, a call from a ThunderPhone number waits
in line instead of being refused. The response is the usual 201 with the
same call_id and status, plus queued_at, when it began waiting:
{
"call_id": 987654321,
"status": "initiated",
"queued_at": "2026-10-31T18:00:00Z"
}While it waits, GET /v1/calls/{call_id}
shows status in_progress and the same queued_at, and nothing has been
dialed. queued_at becomes null once the call starts dialing.
- Calls dial in the order they were placed, usually within a minute of room opening. Calls through your own carrier never queue.
- A queued call is not billed, holds no credit and does not count toward your
concurrent-call limit. When its
turn comes it is checked as a new call would be. If your organization is at
its limit, out of balance, called that number too recently, the number has
opted out, or its state is now blocked, the call ends as
failedwith that reason as itsend_reason:concurrent_call_limit_reached,insufficient_balance,spending_limit_reached,same_number_too_soon,contact_opted_outorstate_blocked. A call whose agent was deleted while it waited ends withagent_deleted, and one whose number can no longer place calls withoutbound_number_not_routable. - A call still waiting after 10 minutes ends as
failedwithend_reasonoutbound_queue_timeout. It is not billed, and nothing was dialed. - Queuing sends no webhook.
telephony.completefires once when the call ends, withstatusfailedif it never dialed. Nocall.billedfollows a call that never dialed. - Sending the same
idempotency_keyagain returns the same call, still waiting, and does not move it in line. - An organization may have up to 50 calls waiting. Past that, a new call is
not accepted:
429withcodeoutbound_queue_full. Retry after the seconds inRetry-After.
To stop a queued call, cancel it. It ends as failed with end_reason
outbound_queue_canceled, not billed. Repeating a cancel that succeeded returns
the same result. Once the call has started dialing or ended some other way, the
request returns 409 with code call_not_queued. A queued call cannot be
deleted until it has been cancelled.
curl -X POST https://api.thunderphone.com/v1/calls/987654321/cancel \
-H "Authorization: Bearer $THUNDERPHONE_API_KEY"Error responses
| Status | Body code/detail hint | Meaning |
|---|---|---|
400 | from_number and to_number are required | Missing required fields |
400 | Provide either agent_id or config, not both | Both supplied |
400 | { "code": "destination_not_allowed", "reason": "...", "detail": "..." } | to_number is a destination ThunderPhone does not call. See blocked destinations |
402 | Insufficient balance | Org balance is ≤ $0.00. Top up first |
403 | outbound_tcpa_confirmation_required | The org's one-time TCPA confirmation is missing |
404 | from_number is not registered to this organization | The number is unknown, belongs to another organization, or is not active when the request first looks it up |
404 | Agent not found | agent_id invalid or wrong org |
409 | Idempotency key already used with a different request | Use the original request or a new key |
409 | { "code": "...", "detail": "...", "retryable": false } | The number is not eligible to place this call. Correct the number's state before trying again; do not retry the same request unchanged. |
429 | concurrent_call_limit_reached | Your organization already has as many calls in progress as its concurrent-call limit. Nothing was dialed; retry after Retry-After seconds or when a call ends |
429 | same_number_too_soon | Your organization called this to_number less than its same-number spacing ago (10 seconds by default). Retry after Retry-After seconds |
429 | outbound_queue_full | Your organization already has 50 queued calls waiting. Nothing was accepted; retry after Retry-After seconds |
429 | platform_outbound_daily_limit_reached | Today's daily limit for outbound calls is used up. It counts calls from every carrier |
429 | outbound_hourly_limit_reached | The hourly limit for outbound calls is used up. resets_at says when the next call can go |
500 | { "detail": "..." } | No outbound trunk is configured. Contact support; this is not a number-state problem you can correct. |
502 | Upstream SIP / LiveKit submission failure | The stored attempt is failed. Correct the reported issue or retry as a new call with a new idempotency key. |
Eligibility conflicts use one of these stable code values:
- Account state:
outbound_blocked_by_staff(ThunderPhone turned outbound calling off for the account, from every number; contact support). - ThunderPhone-number review state:
managed_number_inbound_only,managed_number_outbound_pending,managed_number_outbound_denied, ormanaged_number_outbound_revoked. - Number state:
number_provisioning,number_failed,number_releasing,number_released, ornumber_missing. - Customer VoIP state:
voip_verification_failed,voip_connection_missing,voip_connection_wrong_organization,voip_connection_error,voip_connection_pending,voip_connection_testing,voip_verification_unverified, orvoip_verification_stale.
The request first looks up an active from_number. A number that is already
provisioning, failed, releasing, or released fails that lookup with 404. If an
initially active number becomes ineligible after the request is accepted but
before the call is placed, the final eligibility check returns the 409 payload
above with the corresponding number_* code.
The other 409 response is the existing idempotency conflict. It has a
detail field but does not include code or retryable.
Blocked destinations
Every outbound call, from any number, refuses to_number values that are not
valid phone numbers (reason invalid_number), emergency numbers such as 911,
112 or 999 (emergency_number), short codes (short_code), and numbers in
Cuba, Iran, North Korea or Syria (sanctioned_country). Calls from a number
on your own carrier (VoIP connection) are
refused only for these reasons; any other number, including premium-rate and
shared-cost numbers, is up to you and your carrier.
A number on your organization's opt-out list for
calls is refused with reason contact_opted_out, from any number. A number
in a blocked state is refused with reason state_blocked.
Calls from ThunderPhone numbers can also only reach ordinary landline, mobile,
toll-free or VoIP numbers. Outside the US and Canada they reach the countries
and line types we have an international rate for, and each minute is charged
at that country's rate (see Pricing). The most expensive
networks can't be dialed from ThunderPhone numbers at all: Russian mobiles, for
example, while most Russian landlines can be. Premium-rate numbers
return premium_rate, numbers we can't reach platform_country_not_supported,
other number types platform_number_type_not_supported, and the fictional
555-0100 to 555-0199 range fictional_number. To call these, use a number on
your own carrier.
Blocked states
Blocked states stop outbound calls to a US state right away, for example when
a state restricts AI-voiced calls. List the states in your organization's
blocked_call_states (two-letter codes such as CA; DC, Puerto Rico, Guam,
the U.S. Virgin Islands, the Northern Mariana Islands and American Samoa count
too), in Zeus Settings → All settings → Privacy & data → Blocked states, with
PATCH /v1/orgs/{id}/, or
by asking Zeus. Owners and admins can change the list.
Every outbound call checks it, including campaigns, scheduled calls and calls
placed through MCP or Zeus. A call's state is the state of its number's area
code. Mobile numbers keep their area code when people move, so you can also
pass the contact's state as a state variable (any capitalization of the key,
a code or a full name such as Texas); a campaign contact's state column
works the same way. The call is refused when either state is blocked. Numbers
outside the US and its territories are never refused for their state.
A refused call answers 400 with reason state_blocked and a detail that
names the state, and nothing is dialed. A campaign marks that contact failed
(last_outcome destination_not_allowed) and keeps calling the rest. A call
already waiting to dial when its state is blocked ends with
end_reason state_blocked.
Changelog
- 2026-08-06:
POST /v1/callnow returns after origination is accepted instead of waiting for answer; ring failures finalize asynchronously. Added optionalidempotency_key, durable dial-state reconciliation, and202 status=unknownfor ambiguous submission timeouts.
Outbound TCPA confirmation
Before an organization's first outbound-enabling action, an
organization admin must record a one-time confirmation that its outbound
calling complies with applicable telemarketing/robocall law (including
the TCPA). Until it exists, POST /v1/call and
campaign creation/start reject with:
{
"code": "outbound_tcpa_confirmation_required",
"detail": "Outbound calling requires a one-time TCPA compliance confirmation…"
}with status 403. The confirmation is per organization and one-time
— once recorded, it is never requested again. It applies only to
organizations created on or after 2026-08-03; organizations that
existed before then (and enterprise-agreement organizations) are fully
exempt — GET /v1/outbound-tcpa-confirmation reports this as
"gate_applies": false. The gate covers only originating outbound
calls: inbound calls, live-call transfers, and campaigns that are
already running are never affected.
| Method | Path | Description |
|---|---|---|
GET | /v1/outbound-tcpa-confirmation | Confirmation status + current text_version |
POST | /v1/outbound-tcpa-confirmation | Record the confirmation (org admin sessions only) |
GET returns:
{
"text_version": "outbound-tcpa-v5-2026-11-12",
"statement_en": "I confirm on behalf of my organization that its outbound calls through ThunderPhone will comply with applicable calling laws — the TCPA and FCC rules for U.S. calls, and the destination country's laws elsewhere. ThunderPhone takes spam calls seriously: accounts that break calling laws may be banned and reported to law enforcement.",
"fcc_link_url": "https://www.ecfr.gov/current/title-47/chapter-I/subchapter-B/part-64/subpart-L/section-64.1200",
"docs_link_url": "https://thunderphone.com/docs/guides/outbound-calling-laws",
"gate_applies": true,
"confirmed": false,
"confirmation": null
}POST takes { "accepted": true, "text_version": "…", "locale": "en", "rendered_text": "…" }. rendered_text must be exactly the
canonical statement for the submitted text_version — the statement is
server-pinned, and a mismatch returns 400. It is stored server-side as
a SHA-256 hash, with the UI locale, confirming user + role, IP, and user
agent, as the evidence record. text_version may be the current version
from GET or any still-accepted earlier version (so a dialog fetched
just before a statement update still submits cleanly, paired with that
version's own statement text). Returns 201 (or 200 if the org is
already confirmed — repeat confirms are idempotent).
Identity check
ThunderPhone will ask some accounts to confirm an organization admin's identity before their agents call out.
| Method | Path | Description |
|---|---|---|
GET | /v1/identity-check | Whether this organization needs the check and where it stands |
POST | /v1/identity-check/session | Start or continue the check for the signed-in admin |
GET /v1/identity-check works with an API key or a signed-in session and
answers:
| Field | Type | Description |
|---|---|---|
required | boolean | Whether this organization must pass the check before calling out |
exempt_reason | string or null | Why it doesn't have to: agreement, internal_org or contract |
enforced | boolean | Whether outbound calls are refused today without it |
status | string | none, requires_input, processing, verified, canceled, staff_review or denied |
method | string or null | How the latest check is being done: stripe, staff_check or staff_exempt |
last_error_code | string or null | Why the last attempt failed, when it did |
verified_at | string or null | When the check passed |
attempts_used / attempts_left | integer | Attempts for the organization |
user_attempts_left | integer or null | Attempts left for you; null with an API key |
paid_in_ok | boolean | Whether $5 of card money has been paid in, which the check needs before it can start |
paid_in_minimum_cents | integer | That minimum, in cents |
notice_ends_at | string or null | During a notice period, when outbound calls without the check stop being allowed |
POST /v1/identity-check/session is a person's own act: an organization
admin signed in to ThunderPhone starts it, and API keys are refused. It
answers {"client_secret": "..."} for Stripe Identity's verification
window (201 when a new check starts, 200 when it continues one). The
secret works once; don't log it or put it in a URL.