ThunderPhone v3 is live.Self-serve, from 2¢/min.Read the announcement

Calls

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

MethodPathDescription
POST/v1/callPlace an outbound call
POST/v1/calls/{call_id}/cancelCancel a queued call before it dials

Place a call

Using an agent id
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"
  }'
Inline config (one-off)
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": []
    }
  }'
Saved agent with variables and context
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."
  }'
Saved agent with a different voice
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}
  }'
Python
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

FieldTypeRequiredDescription
from_numberstringyesE.164. Must be an outbound-enabled number owned by this organization
to_numberstringyesE.164 target. A number without a country code is read in the from_number's country and called in E.164
agent_idintegersee belowAn agent id in this org
variablesobjectnoPer-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.
contextstringnoFree-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
configobjectsee belowInline config — schema matches the call.incoming webhook response
overridesobjectnoChanges 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
languagestringnoLanguage 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_modestringnophi 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_secondsintegernoOverride the agent's hold timeout for this call only
timezonestringnoIANA 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_keystring (1–128 characters)noPrevent 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:

  1. agent_id — use the saved configuration.
  2. config — inline a one-off configuration (same shape as a call.incoming webhook response).
  3. Neither — the call uses the number's configured outbound_agent. Fails with 400 if no outbound agent is set.

Response

Returns 201 Created:

{
  "call_id": 987654321,
  "status":  "initiated"
}
FieldTypeDescription
call_idintegerAssigned id — use it on the call endpoints to follow the call.
statusstringAlways "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_attimestampOnly present when the call is waiting for room: when it began waiting.
warningsarrayOnly 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 statusMeaning
in_progressSIP dialing or connected, or waiting for room when queued_at is set
completedCall ended normally
failedCall 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:

Queued
{
  "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 failed with that reason as its end_reason: concurrent_call_limit_reached, insufficient_balance, spending_limit_reached, same_number_too_soon, contact_opted_out or state_blocked. A call whose agent was deleted while it waited ends with agent_deleted, and one whose number can no longer place calls with outbound_number_not_routable.
  • A call still waiting after 10 minutes ends as failed with end_reason outbound_queue_timeout. It is not billed, and nothing was dialed.
  • Queuing sends no webhook. telephony.complete fires once when the call ends, with status failed if it never dialed. No call.billed follows a call that never dialed.
  • Sending the same idempotency_key again 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: 429 with code outbound_queue_full. Retry after the seconds in Retry-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.

Cancel a queued call
curl -X POST https://api.thunderphone.com/v1/calls/987654321/cancel \
  -H "Authorization: Bearer $THUNDERPHONE_API_KEY"

Error responses

StatusBody code/detail hintMeaning
400from_number and to_number are requiredMissing required fields
400Provide either agent_id or config, not bothBoth supplied
400{ "code": "destination_not_allowed", "reason": "...", "detail": "..." }to_number is a destination ThunderPhone does not call. See blocked destinations
402Insufficient balanceOrg balance is ≤ $0.00. Top up first
403outbound_tcpa_confirmation_requiredThe org's one-time TCPA confirmation is missing
404from_number is not registered to this organizationThe number is unknown, belongs to another organization, or is not active when the request first looks it up
404Agent not foundagent_id invalid or wrong org
409Idempotency key already used with a different requestUse 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.
429concurrent_call_limit_reachedYour 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
429same_number_too_soonYour organization called this to_number less than its same-number spacing ago (10 seconds by default). Retry after Retry-After seconds
429outbound_queue_fullYour organization already has 50 queued calls waiting. Nothing was accepted; retry after Retry-After seconds
429platform_outbound_daily_limit_reachedToday's daily limit for outbound calls is used up. It counts calls from every carrier
429outbound_hourly_limit_reachedThe 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.
502Upstream SIP / LiveKit submission failureThe 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, or managed_number_outbound_revoked.
  • Number state: number_provisioning, number_failed, number_releasing, number_released, or number_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, or voip_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/call now returns after origination is accepted instead of waiting for answer; ring failures finalize asynchronously. Added optional idempotency_key, durable dial-state reconciliation, and 202 status=unknown for 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.

MethodPathDescription
GET/v1/outbound-tcpa-confirmationConfirmation status + current text_version
POST/v1/outbound-tcpa-confirmationRecord 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.

MethodPathDescription
GET/v1/identity-checkWhether this organization needs the check and where it stands
POST/v1/identity-check/sessionStart 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:

FieldTypeDescription
requiredbooleanWhether this organization must pass the check before calling out
exempt_reasonstring or nullWhy it doesn't have to: agreement, internal_org or contract
enforcedbooleanWhether outbound calls are refused today without it
statusstringnone, requires_input, processing, verified, canceled, staff_review or denied
methodstring or nullHow the latest check is being done: stripe, staff_check or staff_exempt
last_error_codestring or nullWhy the last attempt failed, when it did
verified_atstring or nullWhen the check passed
attempts_used / attempts_leftintegerAttempts for the organization
user_attempts_leftinteger or nullAttempts left for you; null with an API key
paid_in_okbooleanWhether $5 of card money has been paid in, which the check needs before it can start
paid_in_minimum_centsintegerThat minimum, in cents
notice_ends_atstring or nullDuring 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.