Open in
Agents
Create and manage voice agents over REST: configure prompts, engines, voices, languages, tools, and knowledge, then deploy, duplicate, transfer, or version them.
An agent is the configuration that drives every ThunderPhone call — the product tier, the voice, the languages, the system prompt, the acknowledgement behavior, silence/voicemail handling, the attached tools and knowledge, and whether the agent is reachable from the web widget. Phone numbers assign an inbound and/or outbound agent; outbound calls and mic sessions can target an agent directly.
Agents use a draft / deploy workflow: edits made via PATCH/PUT
are saved as a draft and do not affect production calls until you
POST /deploy. Test calls and mic sessions run against the draft (when
one exists) so you can try changes before shipping them.
For dashboard setup, see Voice agent settings. For prompt-callable actions, see Built-in tools and Transfer calls.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/agents | List agents |
POST | /v1/agents | Create an agent |
GET | /v1/agents/{agent_id} | Retrieve a single agent |
PUT / PATCH | /v1/agents/{agent_id} | Save changes to the agent's draft |
POST | /v1/agents/{agent_id}/deploy | Promote the draft to the deployed config |
POST | /v1/agents/{agent_id}/discard-draft | Throw away all pending draft changes |
GET / POST | /v1/agents/{agent_id}/relabel-calls | Put past calls on the agent's current outcome labels |
DELETE | /v1/agents/{agent_id} | Delete an agent (restorable for 30 days) |
POST | /v1/agents/{agent_id}/duplicate | Duplicate an agent |
GET | /v1/agents/{agent_id}/export | Download everything about an agent as a zip |
POST | /v1/agents/{agent_id}/transfer | Copy or move an agent to another org |
GET | /v1/agents/{agent_id}/versions | List deployed configuration revisions |
POST | /v1/agents/{agent_id}/versions/{revision}/restore | Put the agent back to a deployed revision |
GET / POST / DELETE | /v1/agents/{agent_id}/intro-clip | Download, upload or remove the agent's custom intro clip |
POST | /v1/agents/{agent_id}/intro-clip/generate | Make a recording notice in a platform voice and stage it as the custom intro clip |
GET / POST | /v1/agents/{agent_id}/consent-attestations | List or record consent-announcement attestations |
GET / POST | /v1/phi-designation-attestation | Read or record an agent's no-PHI designation attestation |
POST | /v1/agents/prompt-language-check | Detect the language of a prompt |
POST | /v1/agents/translate-prompt | Translate a prompt into another locale |
POST | /v1/agents/generate-acknowledgement-prompt | Auto-generate an acknowledgement prompt |
POST | /v1/agents/steps/flatten | Render shared instructions and steps as one prompt |
POST | /v1/agents/{agent_id}/prompt-analysis | Check a prompt against the agent's configuration |
POST | /v1/agents/{agent_id}/prompt-review | Review a prompt against the prompt style guide |
POST | /v1/agents/{agent_id}/prompt-refactor | Rewrite a prompt into the style guide's shape |
Related agent-scoped surfaces documented on their own pages: test scenarios & suites, split testing (A/B variants).
Agent object
{
"id": 12,
"name": "Customer Support Agent",
"prompt": "You are a helpful support agent for Acme Ops…",
"voice": "john",
"primary_language": "en",
"additional_languages": [],
"native_voice_switching": false,
"language_voices": {},
"language_switching": "ask_first",
"audio_tier": "standard",
"endpointing": "normal",
"speech_detection": "standard",
"voice_speed": 1.0,
"intelligence": "pro",
"faster_replies_enabled": true,
"product": "bolt",
"thinking_level": "base",
"background_track": "NONE",
"acknowledgement_prompt_mode": "auto",
"acknowledgement_prompt": "",
"acknowledgement_feedback_mode": "acknowledgement",
"inbound_speak_order": "agent_first",
"outbound_speak_order": "caller_first",
"voicemail_action": "prompt",
"voicemail_message": "",
"silence_interval_seconds": 15,
"silence_max_checkins": 3,
"silence_checkins_enabled": true,
"silence_hangup_seconds": 600,
"silence_final_action": "hang_up",
"silence_transfer_destination": "",
"silence_final_message": "",
"max_call_duration_seconds": 3600,
"ring_duration_seconds": null,
"max_hold_seconds": null,
"connect_tone_enabled": false,
"typing_sounds_enabled": false,
"typing_sound": "keys_and_mouse",
"filler_phrases_enabled": true,
"pronunciation_dicts": false,
"tool_start_line": "always",
"play_sound_asset": "",
"intro_clip": "none",
"intro_clip_artifact_path": "",
"intro_clip_sha256": "",
"intro_ring_count": 1,
"speak_uninterruptible_enabled": false,
"send_email_enabled": false,
"send_email_recipient": "",
"calculator_enabled": false,
"do_not_call_detection_enabled": true,
"system_tool_settings": {"end_call": false},
"transfer_destinations": [
{"name": "Billing", "number": "+14155552671", "platform_ok": true},
{"name": "Assigned rep", "number": "{{rep_phone}}", "platform_ok": null}
],
"warm_transfer_style": "introduce",
"warm_transfer_briefing": "",
"consent_announcement_enabled": true,
"consent_announcement_text": "This call may be recorded…",
"disclosure_voice": "female",
"disclosure_style": "clean",
"disclosure_ring_count": 0,
"consent_disabled_reason": "",
"audio_context_mode": "full",
"watchdog_enabled": false,
"additional_audio_context": null,
"extraction_fields": [
{
"key": "insurance_type",
"type": "enum",
"description": "Insurance type requested by the caller",
"options": ["term", "whole"],
"required": false,
"ask": true
}
],
"extraction_blocks_completion": "except_transfers",
"call_summary_enabled": false,
"call_review_enabled": true,
"end_of_call_tool": {},
"outcome_labels": [],
"report_instructions": "",
"attention_reasons": {},
"summary_language": "",
"phi_processing_override": "inherit",
"timezone": "America/New_York",
"business_hours": null,
"reusable_instructions": [],
"integrations": [],
"knowledge_bases": [],
"knowledge_documents": [],
"mcp_servers": [],
"tool_collision_warnings": [],
"widget_enabled": true,
"split_testing_enabled": false,
"steps": null,
"handoffs": [],
"words": [
{
"term": "Quayside",
"say_as": "Kee side",
"ipa": "ˈkiːsaɪd",
"language": "en",
"case_sensitive": false,
"speak_with": "auto",
"hear": false,
"step": null,
"hear_always": false,
"hear_when": null,
"checked": null,
"support": {
"level": "phonetic",
"reason": "Uses phonetic spelling on this voice. Voices usually follow it, but not always. Preview to check.",
"step_missing": false
}
}
],
"warnings": [],
"created_at": "2026-04-20T18:24:10.113Z",
"updated_at": "2026-04-20T18:24:10.113Z",
"draft_prompt": null,
"draft_voice": null,
"draft_consent_announcement_enabled": null,
"draft_updated_at": null,
"has_draft": false
}Deployed fields
| Field | Type | Description |
|---|---|---|
id | integer | Server-assigned agent id |
name | string | Human-readable name. 1–255 chars |
prompt | string | The system prompt that governs agent behavior |
voice | string | Voice name from GET /v1/voices — e.g. john, megan. Entitled organizations can also pass custom:<public_id> for a ready custom voice, any agent that does not process PHI can use an ElevenLabs voice as elevenlabs:<voice_id>, and any voice from GET /v1/voices/library works by its name |
primary_language | string | ISO 639 code, e.g. en, es. Default en. Drives the default TTS locale |
additional_languages | array of string | Extra language codes the agent supports (es or BCP-47 es-ES) |
native_voice_switching | boolean | For multilingual agents using catalog voices, switch to a native voice for the detected additional language, matched by gender. Returns to the configured voice for the primary language and keeps the current voice if no match is available. Default false |
language_voices | object | The voice a call uses when it starts in a given language, by language code: {"es": "marta"}. Used when a call names its own language (a config webhook's agent_id answer, a widget or realtime session; see Set the language per call), ahead of native voice switching's choice and of the agent's own voice. Each voice must speak its language. Default {} |
language_switching | string | How a multilingual agent handles the other person (the caller, or the person an outbound call reaches) speaking another of its languages. ask_first (default) switches at once when they ask for the language or say a full sentence in it, and asks whether to continue in it after something short, like a "sí". follow_caller switches to whatever configured language they speak, even a single word. Applies only when additional_languages is set |
endpointing | string | How long a Bolt v2 agent waits after the caller stops before asking the model for a reply: faster (200 ms), fast (300 ms), normal (500 ms, default) or patient (800 ms). Shorter waits can answer sooner but send more requests that the caller's next words make stale, which raises the model cost, and can talk over callers who pause mid-sentence; how fast the reply then arrives also depends on the intelligence tier. patient suits callers reading out numbers, addresses or spellings. Other products ignore it |
speech_detection | string | How the agent tells when the caller is talking: standard (default), right for almost every agent, or enhanced, which also hears voices the call setup makes quieter or muffled, such as a caller merged into a conference, a three-way call or an interpreter line with a second person joined in. Enhanced costs a little more per minute and shows on the call's receipt as Enhanced speech detection |
voice_speed | number | How fast the agent talks, as a multiplier on the normal pace: 1.0 (default) is the normal pace, 0.8 is 20% slower, 1.3 is 30% faster. From 0.8 to 1.3, stored to two decimals; anything outside is a 400. Spelled-out codes stay slower than the rest of a line at every speed. No price change. Not the same as endpointing, which is how long the agent waits before it replies |
eagerness | string | Deprecated: the name of endpointing until October 19, 2026. Responses still include it with the same value, and writes may still send it instead of endpointing; sending both with different values is a 400 |
intelligence | string | Intelligence: how reliably a Bolt agent on the Bolt v2 pipeline follows its instructions. Ignored while audio_tier is max, whose calls always run pro. core: ~700 ms to first word; cheapest and fastest, follows instructions a little less reliably than Pro (on calls treated as PHI, ~900 ms and less reliable). pro (default): ~900 ms to first word. A Core reply that would only call a tool, with no spoken words, is handed to Pro (except staying silent, waiting on hold and pressing keypad digits), which also takes over if Core is unavailable. The older values lite (Core) and standard (Pro) are still accepted. Other products ignore it |
faster_replies_enabled | boolean | Speed boost in the dashboard. Default true. On a Bolt agent on the Bolt v2 pipeline, replies start a little sooner, for a little more. false turns that off, and some replies may take longer. Plus hearing's audio check can still send extra requests. Other products ignore it. |
product | string | The agent's setup. bolt for almost every agent; tune it with intelligence, audio_tier, endpointing and acknowledgement_feedback_mode. full-duplex is Full duplex, a speech-to-speech conversation. Older values (spark, storm-base, storm-base-with-ack, storm-extra, storm-extra-with-ack) are still accepted; see Product values |
audio_tier | string | Bolt only (Hearing in the dashboard): how carefully the agent hears the caller. standard (default) is right for most calls; calls that process PHI use only BAA-covered providers. lite is cheapest and mishears more often. plus listens harder on difficult turns, best for languages, names and spelled-out codes; those turns take about 1–2 seconds longer, and acknowledgement_feedback_mode sets what the caller hears meanwhile. max: for the hardest audio and rare languages; every reply takes 3–4 seconds, and calls run pro intelligence whatever intelligence is set to (the stored value applies again on another tier). max is not generally available: only organizations it has been enabled for can set it; others get 400. The older values lean (Lite), hearing (Plus) and deep_hearing (Max) are still accepted. Other products ignore it |
thinking_level | string | base or extra. Set from product on agents still on an older product value |
background_track | string | Ambient audio track name, or "NONE" for silence. Never null — a null write is coerced to "NONE" |
acknowledgement_prompt_mode | string | auto (we generate the ack prompt) or manual (you supply it) |
acknowledgement_prompt | string | Used when acknowledgement_prompt_mode="manual", on agents still on an older -with-ack product value |
acknowledgement_feedback_mode | string | What the caller hears while a slower reply is worked out on a Bolt agent with audio_tier plus or max: acknowledgement (default, a short spoken acknowledgement), tick (ticking sound) or none (silence) |
inbound_speak_order | string | Who talks first on inbound calls. agent_first or caller_first |
outbound_speak_order | string | Who talks first on outbound calls |
voicemail_action | string | What to do when a voicemail system answers: prompt (let the agent decide), hangup, or message (leave a message). Leaving a short message usually gets more callbacks, and callbacks help the number's standing with carriers; hangup lists voicemail_hangup_on_outbound in warnings |
voicemail_message | string | TTS template for voicemail_action="message", max 2000 chars. Supports {agent_name} and {org_name} variables |
silence_interval_seconds | integer or null | Seconds between "are you still there?" check-ins. 10–120, default 15. null lets ThunderPhone pace them by context, the schedule an inline config without this field gets: before the caller has spoken, after 6, 10 and 15 seconds; ordinary quiet, after 10, 15 and 15 seconds; after the caller asks to wait, at least 60 seconds |
silence_max_checkins | integer | Check-ins before the agent hangs up. 1–10, default 3 |
silence_checkins_enabled | boolean | Whether the agent proactively checks in during caller silence. Default true |
silence_hangup_seconds | integer | Caller-idle seconds before a silent hangup when check-ins are disabled. 60–3600, default 600 |
silence_final_action | string | What the agent does after its last check-in: hang_up (default) or transfer to silence_transfer_destination. A transfer that can't be placed hangs up |
silence_transfer_destination | string | Name of one of the agent's transfer_destinations, matched without regard to case. Required when silence_final_action is transfer. Default "" |
silence_final_message | string | What the agent says at that moment, read as written, up to 300 characters. "" (default) uses the default line in the call's language |
max_call_duration_seconds | integer or null | Maximum call length in seconds. 60–21600 (1 minute–6 hours); null means no per-agent limit. New agents start at your organization's new-agent default (3600, one hour) unless you send a value; agents created before that default keep what they had. Every call ends after 6 hours whatever this says |
ring_duration_seconds | integer or null | Ringing time for outbound and transferred calls, in seconds. 5–120; null uses platform defaults (60s outbound, 45s warm transfer, provider default for cold transfer). Outbound calls ring for at least 14 seconds whatever this says, because a call that rings briefly and drops looks like a one-ring scam call; a shorter value still saves and applies to transfers. Does not affect inbound ringing. |
max_hold_seconds | integer or null | How long the agent waits on hold during a call it places before it hangs up, in seconds. 10–900; null uses the default (900, 15 minutes). A max_hold_seconds sent with an outbound call overrides it for that call |
connect_tone_enabled | boolean | Play a short connection tone before the agent begins. Default false |
typing_sounds_enabled | boolean | Play a soft keyboard sound while a custom tool runs. Platform-managed tools do not trigger it. Default false |
typing_sound | string | Which typing sound plays when typing_sounds_enabled is on: keys_and_mouse, mechanical, desktop, laptop, office, or quiet_room. Default keys_and_mouse |
filler_phrases_enabled | boolean | Long-wait updates: on a slow tool or reply, lines such as "Sorry, this is taking a little longer than expected" after the tool-start line. false stays quiet after the tool-start line, which tool_start_line controls. Default true |
pronunciation_dicts | boolean | Use ThunderPhone's pronunciation dictionary for the agent's Cartesia speech on phone, widget and test calls (not Realtime sessions). Applies only with ThunderPhone's own Cartesia voices, not a customer's own Cartesia key. Same as an inline config's pronunciation_dicts. Default false |
tool_start_line | string | Tool-start line: what ThunderPhone says when the agent calls a tool. always: something at every tool call (the agent's own words, or a short line written for the call). only_if_slow: a short line only if the tool is still running after about 3 seconds. never: nothing from ThunderPhone, and the agent is told not to speak at tool calls. The agent's own words always play. New agents default to always; agents created before this field existed have only_if_slow. Prompt text cannot override it |
play_sound_asset | string | Prompt-callable sound asset: "" (none), chime, ding, or beep |
intro_clip | string | Prerecorded clip played at the start of inbound phone calls (and Talk browser test calls), before the agent speaks: none, stock_recording_notice or stock_recording_notice_male ("This call may be monitored or recorded." in a female or male voice, in the language the call starts in; English when there is no clip for that language), or custom (the clip uploaded with POST /v1/agents/{agent_id}/intro-clip; plays nothing until one is uploaded). Not played on outbound calls, AI test calls, web widget calls or Realtime API calls. Default none |
intro_clip_artifact_path | string | Read-only. Storage path of the uploaded custom clip, "" when there is none |
intro_clip_sha256 | string | Read-only. SHA-256 of the uploaded custom clip, "" when there is none |
intro_ring_count | integer | US rings played after the intro clip, before the agent speaks. 0–2, default 1. Only used when intro_clip is not none |
speak_uninterruptible_enabled | boolean | Legacy compatibility field. The speak_uninterruptible tool is currently unavailable, so this setting has no runtime effect. Default false |
send_email_enabled | boolean | Offer the built-in email tool when send_email_recipient is also set. Default false |
send_email_recipient | string | Fixed recipient for the built-in email tool. The model supplies only the subject and body and cannot choose or change this address |
calculator_enabled | boolean | Offer the built-in calculate tool, which adds up totals and prices exactly. Default false |
do_not_call_detection_enabled | boolean | On outbound calls, when the person asks not to be called again, the agent apologizes, ends the call and adds the number to your opt-out list. Default true. Setting it to false needs your organization's do-not-call detection attestation |
system_tool_settings | object | Turn the end_call, send_keypad_input and wait_on_hold built-in tools on (true) or off (false) for every call. A tool left out follows the call: end_call is on, and the other two are on for outbound calls only. Default {} |
send_sms_enabled | boolean | Offer the send_sms tool when a customer-connected SMS-capable sender is available. Default false |
sms_from_number | string | Optional E.164 fallback sender on the organization's connected Twilio or Telnyx account |
sms_allowed_recipients | array of object | Up to 10 owner-configured contacts the agent may text. Each object has a unique E.164 number and a unique NFKC-normalized, case-insensitive label of 1–60 visible characters. Labels cannot look like phone numbers and are caller-visible public metadata; only labels are shown to the model |
sms_allow_other_recipients | boolean | Allow the model to text any valid E.164 number, including any number a caller dictates. Default false. This broad permission is not required for the telephone other party or sms_allowed_recipients |
transfer_destinations | array of object | The agent's transfer numbers: up to 50 {name, number} entries (or {name, action: "return"}), each with optional headers and a read-only platform_ok. The agent transfers only to these, by name; [] (the default for new agents) means it can't transfer calls |
warm_transfer_style | string | What happens when a warm transfer is answered. introduce (default, Introduce on the line): the caller is connected as soon as the person answers, then the agent introduces the caller on the line, which both hear, and drops. ask_first (Ask first): the caller waits on hold while the agent privately asks the person who answers whether they can take the call; they can decline. On yes the caller is connected and introduced on the line. whisper (Whisper): the caller waits on hold while the agent privately tells the person who answers who is calling and why, without asking; then the caller is connected and the agent drops with nothing said on the line |
warm_transfer_briefing | string | What the agent tells the person who answers a warm transfer about the caller, as an instruction to the agent, for example "The caller's name and what they need.". ≤300 characters; line breaks and repeated spaces are collapsed. "" (the default) keeps a very short briefing: who is calling and why |
sms_followup_enabled | boolean | Send one SMS from the customer carrier after an eligible completed telephone call. Default false |
sms_followup_template | string | Plain-text follow-up template. Supports call variables and extracted fields when present |
consent_announcement_enabled | boolean | Play the configured AI/recording announcement at call start. Default true; disabling requires an active consent attestation where applicable |
consent_announcement_text | string | Announcement played verbatim at call start; must not be blank and is limited to 2000 characters in the dashboard. The default text plays as a recording in the language the call starts in |
disclosure_voice | string | Voice the consent announcement and the AI-processing disclosure play in: female (default) or male. Never the agent's own voice |
disclosure_style | string | Version of the consent announcement and the AI-processing disclosure: clean (default), high quality, or phone, corporate style: the same words sounding like a classic company phone system |
disclosure_ring_count | integer | US rings played after the consent announcement on inbound and browser calls, before the agent speaks. 0–2, default 0 |
consent_disabled_reason | string | Read-only platform-managed status associated with an announcement exception. Clients cannot set it |
audio_context_mode | string | API-only compatibility control for agents on an older storm-* product value: full or reduced (lower latency, less prior audio). This is separate from additional_audio_context |
watchdog_enabled | boolean | Enables live supervision of agent turns on an older storm-* product value. Default false |
additional_audio_context | boolean | null | Backing field for the dashboard's Extra audio context choices: true is On, false is Off, and null is Automatic (recommended). Automatic uses more context for inbound and browser/WebSocket sessions and only the latest turn for outbound phone calls |
extraction_fields | array | Complete structured-data schema extracted from each retained call transcript. Up to 40 fields. Each item requires a unique lowercase key, a type (string, number, boolean, enum, date, or datetime), and a 1–500 character description. enum fields require 2–50 unique options; ask defaults to true and required defaults to false. Writes replace the complete list. |
outcome_labels | array | How calls with a gradeable conversation are labelled in the call report (dashboard: Reporting in the agent builder, where Suggest from prompt proposes a set fitted to the agent's job). [] (default) uses the platform pair success / failure, judged as before. Otherwise send 2–12 objects: key is required, unique, and matches [a-z][a-z0-9_]{0,39}; label is required, 1–60 characters after whitespace is collapsed; description is optional (default "", up to 400 characters) and tells the grader when the label applies; color is optional, one of gray, green, red, amber, blue, purple, pink or teal (default gray), and only sets the pill colour. Keeping the keys success / failure but rewriting a label or description makes them your own definitions. Calls are judged against the labels in effect when they started; to bring older calls onto a new list, relabel past calls. A quick hang-up has no configured outcome and shows as No conversation. Writes replace the complete list. |
report_instructions | string | Rules for the report's prose fields (one-line summary, call reason, caller-experience note, attention note), for example what must never be mentioned. ≤2,000 characters; "" uses the platform default. |
summary_language | string | The language this agent's call summaries are written in, whatever language the call was in: the call report prose and the Call object's summary. A language code such as en, es or fr. "" (default) follows the organization's summary language. Applies to calls summarized after it is deployed; test calls use the deployed value. |
timezone | string | IANA time zone, up to 64 characters, such as America/New_York (dashboard: Time zone). The agent states the date and time, offers times and works out "today" in it, and this agent's business hours in reports use it. Set it for every agent. "" means automatic: each phone call uses the zone of the number it is on when that number's area code places it, else the zone of the agent's numbers, else the organization's, else US Pacific; reports then use the organization's zone. An agent with "" lists timezone_not_set in warnings. A call can override it with its own timezone. |
business_hours | object | null | Weekly schedule keyed by mon through sun, each a list of at most four {start, end} windows in 24-hour HH:MM with the end later than the start, deciding which of this agent's calls count as after hours. null inherits the organization's schedule; {} counts every call as business hours. |
call_summary_enabled | boolean | Generate a plain-language summary after each call (dashboard: Generate a call summary under Data to collect). Delivered as summary on telephony.complete / web.complete and on the Call object. Runs in the post-call extraction step, so extraction_blocks_completion decides whether the completion event waits for it; when it does not wait, the summary is only available on the Call object. Requires call recording; not generated for calls too short to summarize. Default false. |
call_review_enabled | boolean | Call review: the analysis after each call that grades it into outcomes and flags, writes the summary and extracts extraction_fields, feeding the call report and improving the agent from real calls. Default true. false turns all of that off for this agent's calls, and on the new pricing removes its cost; detecting do-not-call requests on outbound calls still runs. Read when each call starts |
end_of_call_tool | object | A tool ThunderPhone calls after every call ends, however it ended, with its arguments filled from the call. See Run a tool when the call ends. {"tool": "<function name>", "when": "every_call" | "answered", "skip_if_called": true | false}; when defaults to every_call and skip_if_called to true. tool is the function name of one of the agent's own API tools (with an endpoint, or answered on your organization webhook); a built-in tool such as send_email returns 400. {} (default) or null turns it off. Read when each call starts |
attention_reasons | object | This agent's own "When calls need you" switches: which reasons can flag a call as needing attention in its call report, as {reason: true | false}. Reasons are urgent, caller_frustrated, asked_for_person, agent_did_not_know, detail_capture_trouble, booking_failed and transfer_failed. A reason left out follows the organization's setting; {} (default) follows it for all. Unknown reasons return 400 |
phi_processing_override | string | Whether this agent's calls are handled as processing protected health information: inherit (default, the organization's setting), phi (needs a signed BAA) or no_phi. no_phi is refused when the BAA makes every agent process PHI, and in an organization whose BAA has the designation clause it needs the agent's PHI designation attestation. effective_phi_mode shows the result |
call_setup_webhook_url | string | URL asked before each inbound phone call this agent answers on one of your numbers or through one of its SIP endpoints, to fill in its {{variables}} and the call's context; "" (default) for none. See Agent call setup webhook. Staged and published like other settings and kept in the version history. While the agent answers a number with its published settings, a deploy that would leave it using a {{variable}} with no default and no webhook is refused with 400 |
call_setup_webhook_signing_secret | string | Write-only: never returned by any read. Signs every call setup webhook request (X-ThunderPhone-Signature, the hex HMAC-SHA256 of the raw body). Set one your endpoint checks (16–255 characters); it applies at once, not on deploy, and is never part of the version history. Until you set one, requests are signed with a secret ThunderPhone made, which nobody can read |
call_setup_webhook_signing_secret_set | boolean | Read-only. Whether the agent has a signing secret |
call_setup_webhook_variables | array of string | Read-only. The variables this agent's settings, unpublished changes included, use with no default: what its call setup webhook must fill in. It reads the prompt and attached reusable instructions, step instructions and lines, the acknowledgement prompt, the voicemail message, the consent announcement, and {{variable}} transfer numbers |
reusable_instruction_ids | array | UUIDs of the organization's reusable instructions attached to this agent. Each attached instruction is appended to the end of the system prompt under a ## <name> heading at call start, in creation order. Writes replace the complete list; responses embed the attached rows as reusable_instructions (the prompt field itself is unchanged). |
extraction_blocks_completion | string | When extraction may hold customer completion and legacy webhook delivery: except_transfers (default; a return to your contact center counts as a transfer), always, or never. Billing settlement and reservation release never wait. In a blocking mode, completion normally waits at most the 75-second extraction budget. If the worker process is lost, the production finalization drain (every five minutes) releases a past-deadline completion before starting another extraction attempt; a later success emits call.data_extracted. |
integrations | array | Linked Integration objects |
knowledge_bases | array | Attached knowledge bases (full objects) |
knowledge_documents | array | Individually attached knowledge documents |
mcp_servers | array | Attached MCP servers (full objects) |
widget_enabled | boolean | Whether the agent is reachable via the embeddable web widget |
split_testing_enabled | boolean | Whether calls are split across A/B variants |
warnings | array | Read-only configuration warnings for the draft the builder and test calls use: tool, handoff, time zone and outbound setting problems. Never blocks a save. Default [] |
tool_collision_warnings | array | Deprecated: read warnings. The same list without timezone_not_set and the outbound setting codes. |
total_calls | integer | null | Read-only. How many calls the agent has taken of all time, leaving out test calls and calls from or to your organization's test numbers. Set on List agents; null on a single agent's responses. |
steps | object | null | Splits the agent into steps. null (default) is a single-prompt agent. When set, prompt holds the shared instructions that apply in every step |
handoffs | array | Other agents in the organization this agent can hand the call to. Default [] |
words | array of object | How the agent says specific words: up to 200 entries, each with a read-only support. Default [] |
created_at, updated_at | timestamp | ISO 8601 UTC |
Draft fields
Every configurable field above has a draft_* mirror in the response
(draft_name, draft_prompt, draft_voice, draft_primary_language,
draft_additional_languages, draft_native_voice_switching, draft_language_voices, draft_language_switching, draft_audio_tier, draft_endpointing, draft_speech_detection, draft_voice_speed, draft_intelligence, draft_product, draft_background_track,
draft_thinking_level, draft_acknowledgement_prompt_mode,
draft_acknowledgement_prompt, draft_acknowledgement_feedback_mode,
draft_inbound_speak_order, draft_outbound_speak_order,
draft_voicemail_action, draft_voicemail_message,
draft_silence_interval_seconds, draft_silence_max_checkins,
draft_silence_checkins_enabled, draft_silence_hangup_seconds, draft_silence_final_action,
draft_silence_transfer_destination, draft_silence_final_message, draft_max_call_duration_seconds, draft_ring_duration_seconds, draft_max_hold_seconds, draft_connect_tone_enabled,
draft_typing_sounds_enabled, draft_typing_sound, draft_filler_phrases_enabled, draft_pronunciation_dicts, draft_tool_start_line, draft_play_sound_asset,
draft_intro_clip, draft_intro_clip_artifact_path, draft_intro_clip_sha256, draft_intro_ring_count,
draft_speak_uninterruptible_enabled, draft_send_email_enabled,
draft_send_email_recipient, draft_calculator_enabled, draft_do_not_call_detection_enabled, draft_faster_replies_enabled, draft_call_setup_webhook_url, draft_system_tool_settings,
draft_send_sms_enabled, draft_sms_from_number, draft_sms_allow_other_recipients,
draft_sms_allowed_recipients, draft_transfer_destinations,
draft_warm_transfer_style, draft_warm_transfer_briefing,
draft_sms_followup_enabled, draft_sms_followup_template,
draft_consent_announcement_enabled, draft_consent_announcement_text, draft_disclosure_voice, draft_disclosure_style, draft_disclosure_ring_count,
draft_audio_context_mode, draft_watchdog_enabled, draft_additional_audio_context,
draft_extraction_fields, draft_extraction_blocks_completion, draft_call_summary_enabled, draft_call_review_enabled, draft_end_of_call_tool, draft_outcome_labels, draft_report_instructions, draft_attention_reasons, draft_summary_language, draft_phi_processing_override, draft_timezone, draft_business_hours, draft_reusable_instruction_ids,
draft_widget_enabled, draft_split_testing_enabled, draft_steps, draft_handoffs, draft_words), plus draft id
lists for attachments (draft_integration_ids,
draft_knowledge_base_ids, draft_knowledge_document_ids,
draft_mcp_server_ids) and read-only markers:
| Field | Type | Description |
|---|---|---|
draft_<field> | same as field | null | null = no pending change for that field; non-null = the value staged for the next deploy |
draft_updated_at | timestamp | null | When the draft was last edited |
has_draft | boolean | True when any draft field is set |
deep_hearing_available | boolean | Whether this agent's organization can use Max hearing (audio_tier max), which is not generally available. Read-only |
premium_surcharge_lock_cents | integer | null | The per-minute premium voice and language surcharge this agent keeps from before the current price, in cents. null means the agent pays the current premium rate. Applies only to accounts still on their earlier pricing (until December 1, 2026); on the new pricing the voice is billed at its provider's list price and this is ignored. Read-only |
effective_phone_consent_announcement | boolean | Whether this agent's phone calls, inbound and outbound, play the consent announcement, as decided when each call starts. It can be true while consent_announcement_enabled is false: the announcement comes back when the consent attestation that turned it off is suspended, revoked or for a statement version that is no longer accepted. false while call recording is off. Read-only |
billing_overrides | object | Billing overrides ThunderPhone has set on this agent, each true or false: discount (a per-minute discount applies to the agent's calls as it is deployed, today or from a scheduled later date before the discount ends) and price_lock (the agent keeps the per-minute price it had before the current price). A discount's amount is on your call receipts. Neither applies on the new pricing. Read-only |
effective_phi_mode | string | phi or no_phi: whether calls with this agent's current settings (its draft, when it has one) are handled as processing protected health information, after phi_processing_override and the organization's setting. ElevenLabs voices can't be used while it is phi. Read-only |
face | string | Which drawing the app shows for the agent; "" is the plain one. Changes nothing on a call. Read-only here: people pick it in the app |
summary | string | A few sentences on what the agent is for, written from its deployed prompt. "" until one has been written for the current prompt. Read-only |
pinned_versions | array | Earlier versions of this agent that phone numbers are pinned to: each {revision, numbers, call_setup_webhook_variables}, so a call setup webhook can fill in the variables every reachable version uses. [] when none. Read-only |
pinned_fields | object | Settings Zeus, the app's assistant, won't change, keyed by field name (voice, prompt, …). Each entry says who pinned it (name, null for ThunderPhone staff; staff; is_you) and when (at). Read-only: people pin and unpin settings in the app. It only stops Zeus; your own API writes are not affected. {} when nothing is pinned. |
draft_max_call_duration_seconds is read-only: null means unchanged, and
0 means a pending removal of the cap. Stage removal by sending
"max_call_duration_seconds": null; deployment restores the live value to null.
draft_ring_duration_seconds follows the same read-only draft convention: null
means unchanged and 0 stages clearing the setting. Write "ring_duration_seconds": null
to restore platform defaults on deployment. Public writes must be null or 5–120.
draft_max_hold_seconds works the same way: write "max_hold_seconds": null to restore
the default on deployment.
draft_silence_interval_seconds uses 0 the same way: write
"silence_interval_seconds": null to stage ThunderPhone's own check-in pacing.
To turn a stepped agent back into a single-prompt agent, send "steps": null.
While that change is pending the response shows "draft_steps": {}, which means
"no steps on deploy". Send the text from
steps/flatten as prompt in the same request
to keep the steps' instructions.
To restore the organization's business hours, send "business_hours": null.
When this clears an existing override, the response shows
"draft_business_hours": {"__inherit__": true} until deployment. That marker
means "inherit on deploy"; it is not a weekday schedule. Send
"timezone": "" too to go back to the automatic time zone.
Production call paths (inbound, outbound, widget) always read the deployed fields. Mic sessions and simulations read the draft with fallback to the deployed value.
Transfer numbers
transfer_destinations lists the numbers the agent may transfer calls to.
The prompt refers to each entry by name; the model sees the names and never
the numbers. See Transfer calls for prompting and
runtime behavior.
| Field | Type | Description |
|---|---|---|
name | string | Required. 1–60 characters after NFKC normalization and trimming, unique on the agent ignoring case. No line breaks, control characters, or invisible characters |
number | string | Required, except on a return. A phone number, exactly one {{variable}} with no default, or a sip: or sips: address. Numbers without a country code are read as US numbers and are stored in E.164. A variable is filled from the call's variables when the call starts. A SIP address is stored as written (scheme in lowercase) and works only on calls to a SIP address and on numbers on a manual SIP connection; see Transfer to a SIP address |
action | string | Optional. "return" hands the call back to the contact center it came from: the agent says goodbye and hangs up, and headers go on the SIP BYE. A return has no number: leave number out, or send "" from a typed SDK, which requires the field (responses show it as ""). It works only on calls to a SIP address and on numbers on a manual SIP connection; see Return the call to your contact center. Omitted for every other entry |
headers | object | Optional. Up to 10 SIP headers sent on the REFER of a cold transfer, as {"X-Name": "value"}. Names start with X- (not X-TP-) or are User-to-User. Values are at most 256 bytes, no line breaks, and can use {{variables}}, filled when the call starts (a missing one is left empty). On a return they go on the BYE, and only X-RouteType, X-RouteValue, X-RouteReason, X-CustomMetaData and User-to-User are allowed (matched ignoring case). On a SIP address or a return, {{handoff_summary}}, {{handoff_intent}} and {{handoff_id}} are filled at the transfer instead: see Pass context to your contact center. Omitted from responses when the entry has none. On an update, an entry sent without a headers key keeps the headers saved on the entry with exactly the same number (a return: the return with the same name); send {} or null to remove them |
headers_in_uri | boolean | Optional, SIP addresses only. true sends headers inside the transfer address (the REFER's Refer-To, sip:queue@host?User-to-User=…&X-Name=value, values escaped) instead of as separate headers, for contact centers such as Twilio, Genesys Cloud and Talkdesk that read only the address. The address is kept to 254 characters: User-to-User goes first and is cut to fit rather than left out, then the other headers go in alphabetical order, and one that doesn't fit is left out whole. The transfer still happens. Refused with a ?User-to-User= written into the address. See Headers inside the transfer address. Omitted unless true |
uui_encoding | string | Optional, SIP addresses and returns. "hex" sends User-to-User hex-encoded with ;encoding=hex: write the value as plain text and it is encoded at the transfer, cut first so the encoded value fits 256 bytes. Omitted unless set. On an update, an entry sent without headers_in_uri or uui_encoding keeps the saved value, like headers; send false or null to remove it |
warm_only | boolean | Optional, phone numbers and variables. true makes every transfer to this entry a warm transfer, whatever mode the agent asks for, and a warm transfer here that the person or line doesn't take (no answer, busy, voicemail, hung up, declined, the person not available) is not retried on that call, warm or cold. A warm call that fails on our or the carrier's side (status failed) lets the agent transfer there again, cold. Warm transfers need a number that can place outbound calls; on a call without one, on a full-duplex agent, for the silence final action, and when only the call's own carrier can reach the number, a transfer here is made cold. See Warm only. Omitted unless true |
answerer | string | Optional, phone numbers and variables. The name of the person a warm transfer here is for, up to 60 characters, such as "Matthew Ray". With the agent's warm_transfer_style set to ask_first, the agent first asks whoever answers whether they are that person and says nothing about the caller until they confirm. Ignored with introduce and whisper. No line breaks, control or invisible characters, or { }. See Confirm who answers. Omitted unless set. On an update, an entry sent without warm_only or answerer keeps the value saved on the entry with the same number and name (a renamed entry, or a new one sharing another's number, starts without them); send false, null or "" to remove it |
backup_numbers | string[] | Optional, phone numbers and variables. Up to 3 fixed phone numbers (E.164 on output) that a cold transfer here rings next, in order, when the one before is busy, declines or doesn't answer within ring_seconds. The last rings as long as a normal transfer. Anything that answers, a voicemail included, ends the sequence. ThunderPhone dials each call itself, so this needs a number that can place outbound calls; the connected time is billed like a bridged transfer, at the rate of the number that answered. On a call that can't, on a call that came in on your own carrier without outbound calling of its own, and on warm transfers, only the entry's own number rings. Each must be a valid number the organization may save, not repeated and not the entry's own number. See Backup numbers. Omitted unless set; on an update an entry sent without it keeps the saved list (same number and name), and [] or null removes it |
ring_seconds | integer | Optional, with backup_numbers only. How long each number except the last rings before the next one, 5 to 120 seconds; 20 when left out, and never longer than the last number's ring time (the agent's ring_duration_seconds, or 45 seconds). Dropped when the entry has no backup numbers |
platform_ok | boolean | null | Read-only; ignored on write. true when calls on ThunderPhone numbers can transfer here (a US number that is not premium-rate or another special-service number). false means the number works only on transfers your own carrier carries (see Transfer calls); always false for a SIP address and a return. null for a variable entry, which is checked on each call |
Writes replace the whole list. Sending null is rejected; send [] to remove
every entry. The same validation runs on create, update, deploy, and every
other write path:
- At most 50 entries.
- Only
name,number,action,headers,headers_in_uri,uui_encoding,warm_only,answerer,backup_numbersandring_secondsare allowed. Other keys returnUnknown field(s): …on that entry. The onlyactionis"return", and a return sent with a number is refused. - A number must be a valid phone number without an extension. Numbers in the fictional range 555-0100 through 555-0199 are refused.
- If the organization has no number on its own carrier, a number that a ThunderPhone number can't reach (a country ThunderPhone numbers can't call, premium-rate, shared-cost, personal-number, and similar types) is refused with a message that says why.
- A variable must be one placeholder on its own, such as
{{rep_phone}}.{{rep_phone|+14155552671}}and text around the placeholder are refused. - A SIP address is at most 255 characters and needs a host. Spaces, line
breaks, quotes, commas, angle brackets, non-ASCII characters and
{{variables}}are refused. The only header it can embed is?User-to-User=, and its value can't contain@. - Header names and values that break the rules above are refused on the
entry's
headersfield. headers_in_uri: trueon a phone number, a variable or a return, anduui_encodingon a phone number or a variable, are refused on that field. So arewarm_only: trueandanswereron a SIP address or a return, which never get a warm transfer, andbackup_numbersandring_secondsthere, which never ring a phone number.false,nulland""are accepted anywhere and mean not set.
Entry errors come back as a list with one object per submitted entry, in
order, and {} for entries that passed:
{
"transfer_destinations": [
{},
{"number": ["(415) 555-0134 is a fictional number: 555-0100 through 555-0199 are reserved for examples. Enter a real number."]},
{"number": ["+44 909 879 0000 is a premium-rate number, and calls on ThunderPhone numbers can't transfer to it. To transfer there, connect your own carrier under Phone Numbers."]}
]
}Deploying re-checks the deployed list against the organization, so a non-US entry saved while the organization had a number on its own carrier blocks the deploy once it has none.
Words
words tells the agent how to say names, places and terms it gets wrong, such
as a building called Quayside or a caller named Siobhan. Put pronunciations
here rather than respelling them in the prompt: the prompt keeps the real
spelling, and the agent's speech swaps in yours.
| Field | Type | Description |
|---|---|---|
term | string | Required. The word or phrase as the agent writes it, 1–80 characters. Matched as a whole word, longest first. Unique per language, ignoring case unless both entries set case_sensitive |
say_as | string | How to say it, respelled in plain words of the language's own script, such as "Kee side". Up to 80 characters. Required unless hear is true |
ipa | string | Optional IPA, such as ˈkiːsaɪd, without slashes or brackets. Up to 80 characters. Needs say_as |
language | string | Language code, such as en. Defaults to the agent's primary language when the entry is saved. The entry applies only when the agent speaks that language |
case_sensitive | boolean | Match only this capitalization, for acronyms that are also words (US). Default false |
speak_with | string | auto (default): the IPA on voices where it is proven to work, otherwise the respelling. ipa: the IPA wherever the voice can take it. say_as: always the respelling. Preview both and keep what sounds better |
hear | boolean | Also listen for this word in what the caller says, so it is transcribed as written. With a step, it is listened for on every turn of that step; without one, on turns where the agent itself says the word. hear_when and hear_always add turns. Default false |
step | string | null | With hear: listen for the word in this step, on every turn of it, so a long list such as insurer names stays out of the rest of the call. null (default): no step. Speech uses the entry in every step either way. A step the agent doesn't have is kept and reported in support, and the word is then listened for only where hear_when matches |
hear_always | boolean | Listen for the word on every turn, such as your company name. Needs hear, and no step or hear_when; at most 3 per agent. Default false |
hear_when | array | null | With hear: also listen for the word on turns where the agent's line contains one of these phrases. For an insurer list, ["insurance"] brings every insurer in when the agent asks "Who's your insurance with?", a question that names none. 1–5 phrases of up to 40 characters, each with at least one letter or digit, matched as whole words, ignoring case. With a step too, the word is listened for in either case. null (default) or []: none. On an edit, an entry sent without hear_when keeps the word's current phrases; send null or [] to clear them |
checked | object | null | The last time someone listened to the entry: {voice, model, result, by, at}, where result is right, wrong or unsure, by is zeus or person, and at is an ISO 8601 date or time. Kept for your records; never affects the call |
support | object | Read-only; ignored on write. How well the agent's voice can follow this entry. See below |
On a turn, the words the agent's line says go first, then hear_always words, then the words hear_when brings in
(in list order), then the rest of the step's words. Each turn carries only the first 15 to 20 of them, so put the
most likely answers first.
On turns where a Bolt agent with audio_tier plus or max takes extra care hearing the caller, every
hear word is listed for the whole call, whatever its step or hear_when.
support is computed for the agent's current voice and languages.
draft_words uses the draft's voice, languages and steps, but it is only
present when the word list itself is staged: after staging only a new voice,
words still shows support for the published voice.
level | Meaning |
|---|---|
phonetic | The voice gets the IPA. Voices usually follow it, but not always |
respelling | The voice says say_as in place of the word. Close, but stress and vowels may be off |
not_supported | The agent doesn't speak the entry's language, so it never applies |
hear_only | No say_as: the entry is only for listening, and the agent says the word as written |
support also has reason (a sentence on why) and step_missing (true
when step names a step the agent doesn't have). No level means exact:
preview a word before relying on it.
Writes replace the whole list, except that an entry sent without hear_when keeps
that word's current phrases. Sending null is rejected; send [] to remove
every entry. Unknown keys are refused by name, except support, which is
dropped so you can send back what you read. Errors are keyed by the entry's
position, then the field:
{"words": {"1": {"ipa": ["Write the IPA without slashes or brackets."]}}}To copy one agent's words to another, read words from the first and send
them as words to the second.
Configuration warnings
warnings flags settings worth a second look. Every entry has a code and a
human-readable message; other keys depend on the code. Create, update and
retrieve responses all carry it. The older tool_collision_warnings field
carries the same entries except timezone_not_set and the two outbound setting codes; it is deprecated.
code | Extra keys | Meaning |
|---|---|---|
tool_has_no_inputs | tool_name, integration_id | An attached integration declares no inputs in spec.function.parameters.properties, so the agent may call it with no arguments. Add the fields your endpoint expects. Ignore this only if the endpoint really takes no data. When the last analysis of the prompt finds the tool, this is replaced by tool_arguments_not_declared, or dropped when the prompt lists no arguments for it. |
tool_arguments_not_declared | tool_name, integration_id, arguments | The prompt tells the agent to send arguments to this tool, but its spec.function.parameters.properties doesn't declare them. The agent sends only declared inputs reliably. |
api_mcp_tool_name_collision | tool_name, mcp_server_id, mcp_server_name | An integration and an MCP tool share a name; the integration wins and the MCP tool is left out. |
handoff_target_missing, handoff_graph_truncated, handoff_tool_name_collision | see handoffs | Handoff problems. |
timezone_not_set | suggested_timezone, source | The agent has no timezone. suggested_timezone is the zone its calls use now and source says why (phone_number, organization or default). Set timezone to the zone its callers are in. |
voicemail_hangup_on_outbound | field | voicemail_action is hangup. Outbound calls that reach voicemail leave nothing. A short message usually works better: people call back numbers that leave one, and callbacks help the number's standing with carriers, so more calls get picked up. |
ring_duration_below_outbound_floor | field | ring_duration_seconds is under 14. Outbound calls ring for at least 14 seconds anyway, so the setting applies only to transfers. |
do_not_call_detection_off_without_attestation | field | do_not_call_detection_enabled is false, but the organization has no active do-not-call detection attestation, so calls still detect stop-calling requests. |
call_setup_webhook_needed | field, variables | The agent answers a phone number and its settings use variables with no default, but it has no call_setup_webhook_url to fill them in. Saving is allowed; deploying a new such variable is refused. Add a call setup webhook, or give each variable a default like {{first_name|there}}. |
Reading the agent never runs a prompt analysis. tool_arguments_not_declared
comes from the last analysis of the current prompt, by
the dashboard builder or by POST /v1/agents/{id}/prompt-analysis. To get it
after changing a prompt over the API, call that endpoint with the agent's
draft_prompt (or prompt when there is no draft) exactly as the agent
response returns it, then read the agent again. A prompt that differs by so
much as a trailing newline is analyzed separately.
"warnings": [
{
"code": "tool_has_no_inputs",
"tool_name": "create_ticket",
"integration_id": "6f1c2a9e-1b7d-4c55-9a0e-3f2d8b7c4e10",
"message": "The tool 'create_ticket' declares no inputs, so the agent may call it without the data your endpoint needs. Add the fields it expects to spec.function.parameters.properties. Ignore this only if the endpoint really needs no data."
}
]Product values
Every agent runs one setup, bolt; tune it with intelligence, audio_tier,
endpointing and acknowledgement_feedback_mode
(see Deployed fields). The older values spark,
storm-base, storm-base-with-ack, storm-extra and storm-extra-with-ack
are still accepted on every write, so existing integrations keep working.
Full duplex
product: "full-duplex" runs the whole call as one speech-to-speech
conversation: the agent listens and talks at the same time, for the most
natural, human-sounding calls. It follows scripts loosely, each tool lookup
adds a pause, and data capture is most reliable after the call. Any
organization can select it. The rules a write must meet:
voiceis one of the Full duplex voices:marin(the default),cedar,alloy,ash,coralorverse. These voices work only on Full duplex, and catalog voices don't work on it.- The agent speaks every language in its one voice, so turning on
native_voice_switchingor settinglanguage_voicesis refused. - The instructions (prompt, steps, reusable instructions and fields to collect) must fit the model's limit; a prompt that is too long is refused on save.
- It runs phone, web and test calls, not Realtime sessions, and can't be an A/B variant yet. Warm transfers are made cold.
Steps and handoffs
Split an agent into steps when its calls move through phases, such as
greeting, identity checks and booking. Each step has its own instructions,
tools, an optional word-for-word line and values to collect. The agent moves
on by calling the built-in go_to_step tool, or when a code-checked condition
on the collected values holds. When steps is set, prompt holds the shared
instructions that apply in every step.
A handoff passes the call to another agent in the same organization. That agent brings its own prompt, steps, tools and voice, and the transcript carries over. Every other call setting (product, languages, speaking order, voicemail, consent) comes from the agent the call started on.
Agents without steps or handoffs ("steps": null, "handoffs": []) work
exactly as before.
steps
{
"start_step": "greet",
"steps": [
{
"id": "greet",
"name": "Greeting",
"instructions": "Greet the caller and ask how you can help.",
"say": "Thanks for calling Acme Dental, this is Ava.",
"transitions": [
{"to": "verify", "when": "The caller wants to book, move or cancel an appointment"}
]
},
{
"id": "verify",
"name": "Verify identity",
"instructions": "Ask for the caller's full name and date of birth.",
"tools": ["lookup_patient"],
"collect": [
{"name": "full_name", "type": "string", "description": "Caller's full name"},
{"name": "dob", "type": "date", "description": "Date of birth"}
],
"transitions": [
{"to": "minor", "condition": {"value": "age", "op": "lt", "target": 18}},
{"to": "book", "when": "Identity is confirmed"}
]
},
{"id": "minor", "name": "Minor", "instructions": "Ask for a parent or guardian."},
{"id": "book", "name": "Book", "instructions": "Offer open slots and book one."},
{
"id": "billing",
"name": "Billing questions",
"instructions": "Answer questions about bills and payments.",
"global_when": "The caller asks about a bill or payment",
"transitions": [{"to": "__previous__", "always": true}]
}
]
}start_step names the step the call begins in. Each step takes:
| Field | Type | Description |
|---|---|---|
id | string | Required. Matches [a-z][a-z0-9_]{0,39}, unique within the agent |
name | string | Required display name, 1–80 characters |
instructions | string | Required, up to 20,000 characters. Supports {{variables}} like prompt |
say | string | null | Line spoken word for word when the step is entered, up to 1,000 characters. Supports {{variables}} |
tools | array | null | null (default) offers every agent tool. A list offers only the named agent tools in this step. Built-in tools such as ending or transferring the call follow the agent's settings in every step |
collect | array | Up to 20 values to gather: name (same pattern as id, unique in the step), type (string, number, boolean or date as YYYY-MM-DD), optional description (up to 500 characters) and required (default true) |
on_enter_tool | string | null | An agent tool called automatically when the step is entered. Its result is stored as the value <tool>_result: status is the tool's HTTP status code and response is the response body |
transitions | array | Ordered moves out of the step, up to 40. Each has to and exactly one trigger: when (the model decides, up to 1,000 characters), condition (code decides) or "always": true. to is a step id, or "__previous__" to return to the step that was active before a global step. A step with no transitions is the last one |
global_when | string | null | Makes the step reachable from any step when this holds (the model decides) |
voice | string | null | Voice for this step. Ignored when the call uses a custom voice_config |
A condition is {"value", "op", "target"}. value names a collected value
or a dotted path into a tool result, such as lookup_patient_result.response.found
(a field of the response body) or lookup_patient_result.status (its HTTP status code).
op is one of eq, ne, lt, lte, gt, gte, in, not_in, exists
or missing:
eqandnetake a string, number or boolean;inandnot_intake a list of 1–50 of them. Strings compare case-insensitively after trimming.lt,lte,gtandgtetake a number or aYYYY-MM-DDdate.existsandmissingtake notarget.
A value that was never collected makes every op false except missing.
Conditions are checked in order when the agent moves on, and the first match
wins.
Limits: 100 steps and 200 KB of JSON per agent. Step tools and
on_enter_tool must name tools the agent has when you save. On an agent with
steps or handoffs, no tool may be named go_to_step or hand_off.
handoffs
[{"agent_id": 13, "when": "The caller asks about billing or a refund"}]Up to 8 entries. agent_id must be another agent in the same organization;
when (1–1,000 characters) tells the agent when to hand off. A call includes
at most 8 agents, counted breadth-first from the agent it started on. The
agent's warnings lists handoff_graph_truncated when
handoffs further out are left out, handoff_target_missing when a handoff
names an agent that no longer exists (calls skip it), and
handoff_tool_name_collision when a handed-to agent has a different tool with
the same name as an earlier agent's (that tool is left out of the call).
Validation errors
Invalid steps or handoffs return 400 with one key per field path:
{
"steps.steps[1].transitions[0].to": ["Unknown step id \"booking\"."],
"handoffs[0].agent_id": ["No agent with this id in the organization."]
}Example
Stage steps and a handoff on the draft, then deploy:
curl -X PATCH https://api.thunderphone.com/v1/agents/12 \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "You are Ava, the front desk for Acme Dental. Be brief and friendly.",
"steps": {
"start_step": "greet",
"steps": [
{
"id": "greet",
"name": "Greeting",
"instructions": "Ask how you can help.",
"transitions": [{"to": "book", "when": "The caller wants an appointment"}]
},
{"id": "book", "name": "Book", "instructions": "Offer open slots and book one."}
]
},
"handoffs": [{"agent_id": 13, "when": "The caller asks about billing"}]
}'
curl -X POST https://api.thunderphone.com/v1/agents/12/deploy \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"List agents
curl https://api.thunderphone.com/v1/agents \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"agents = requests.get(
"https://api.thunderphone.com/v1/agents",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
).json()const agents = await fetch("https://api.thunderphone.com/v1/agents", {
headers: { Authorization: `Bearer ${process.env.THUNDERPHONE_API_KEY}` },
}).then((r) => r.json());Returns an array of Agent objects, sorted by created_at descending. Each carries total_calls, its calls of all time.
Create an agent
curl -X POST https://api.thunderphone.com/v1/agents \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Support Agent",
"prompt": "You are a helpful support agent for Acme Ops…",
"voice": "john",
"product": "bolt",
"widget_enabled": true
}'agent = requests.post(
"https://api.thunderphone.com/v1/agents",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
json={
"name": "Customer Support Agent",
"prompt": "You are a helpful support agent for Acme Ops…",
"voice": "john",
"product": "bolt",
"widget_enabled": True,
},
).json()| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1–255 chars |
prompt | string | yes | System prompt |
voice | string | yes | Voice name from /v1/voices (e.g. john). Entitled organizations can also pass custom:<public_id> for a ready custom voice, an agent that does not process PHI can pass an ElevenLabs voice (elevenlabs:<voice_id>), and any voice from /v1/voices/library works by its name; anything else is rejected with "Unsupported voice option." |
primary_language | string | no | Defaults to en |
additional_languages | array of string | no | ISO 639 (es) or BCP-47 (es-ES) codes |
native_voice_switching | boolean | no | Use a native catalog voice, matched by gender, after switching to an additional language. Default false |
language_voices | object | no | Language code to voice, for calls that start in that language. See Deployed fields |
language_switching | string | no | ask_first (default) or follow_caller. See Deployed fields |
endpointing | string | no | faster, fast, normal (default) or patient. Bolt v2 only. See Deployed fields |
speech_detection | string | no | standard (default) or enhanced. See Deployed fields |
voice_speed | number | no | 0.8 to 1.3; 1.0 (default) is the normal pace. See Deployed fields |
intelligence | string | no | core or pro (default); the older lite and standard are still accepted. Bolt v2 only. See Deployed fields |
faster_replies_enabled | boolean | no | Speed boost. Default true. Bolt v2 only: replies start a little sooner, for a little more. |
product | string | no | Send bolt, or full-duplex for a Full duplex agent. Omitted, it is bolt |
audio_tier | string | no | Bolt only. lite, standard (default), plus or max (not generally available); the older lean, hearing and deep_hearing are still accepted. See Deployed fields |
thinking_level | string | no | Ignored on older storm-* product values (set from product) |
background_track | string | no | Track name or "NONE" |
extraction_fields | array | no | Complete replacement list of structured fields to extract after each retained call. See Deployed fields for the item schema |
extraction_blocks_completion | string | no | except_transfers (default), always, or never; controls customer completion delivery only |
outcome_labels | array | no | Complete replacement list of call-report outcome labels; [] restores Success / Failure. See Deployed fields |
report_instructions | string | no | Instructions for the call report's prose fields |
summary_language | string | no | Language code for this agent's call summaries; "" follows the organization's. See Deployed fields |
timezone | string | no | The agent's time zone; see Deployed fields. Optional, but an agent without one lists timezone_not_set in warnings |
business_hours | object | null | no | This agent's reporting hours; see Deployed fields |
acknowledgement_prompt_mode | string | no | auto or manual. Only meaningful on older -with-ack product values |
acknowledgement_prompt | string | no | Required if acknowledgement_prompt_mode="manual" |
acknowledgement_feedback_mode | string | no | acknowledgement (default), tick or none (silence) |
inbound_speak_order | string | no | Defaults to agent_first |
outbound_speak_order | string | no | Defaults to caller_first |
voicemail_action | string | no | prompt (default), hangup, or message |
voicemail_message | string | no | ≤ 2000 chars |
silence_interval_seconds | integer or null | no | 10–120, default 15; null for ThunderPhone's context-aware pacing (6, 10, 15 s before the caller speaks; 10, 15, 15 s of ordinary quiet; at least 60 s after a request to wait) |
silence_max_checkins | integer | no | 1–10, default 3 |
silence_checkins_enabled | boolean | no | Default true |
silence_hangup_seconds | integer | no | 60–3600, default 600; used when check-ins are disabled |
silence_final_action | string | no | hang_up (default) or transfer |
silence_transfer_destination | string | no | A transfer_destinations name; required with transfer. Create and deploy refuse a name the agent's transfer numbers don't include |
silence_final_message | string | no | ≤ 300 chars; "" uses the default line |
max_call_duration_seconds | integer or null | no | 60–21600. Omit it to use the organization's new-agent default (3600, one hour); send null for no per-agent limit. Every call still ends after 6 hours |
ring_duration_seconds | integer or null | no | Ringing time for outbound and transferred calls, in seconds. 5–120; null uses platform defaults (60s outbound, 45s warm transfer, provider default for cold transfer). Outbound calls ring for at least 14 seconds; a shorter value applies to transfers only. Does not affect inbound ringing. |
max_hold_seconds | integer or null | no | Outbound hold timeout in seconds. 10–900; null uses the default (900) |
connect_tone_enabled | boolean | no | Default false |
typing_sounds_enabled | boolean | no | Play a soft keyboard sound while a custom tool runs. Default false |
typing_sound | string | no | keys_and_mouse, mechanical, desktop, laptop, office, or quiet_room. Default keys_and_mouse |
filler_phrases_enabled | boolean | no | Long-wait updates on slow tools and replies. false stays quiet after the tool-start line. Default true |
pronunciation_dicts | boolean | no | ThunderPhone's pronunciation dictionary for Cartesia speech (ThunderPhone's own Cartesia voices only). Default false |
tool_start_line | string | no | always, only_if_slow, or never. Default always |
play_sound_asset | string | no | "" (none), chime, ding, or beep |
speak_uninterruptible_enabled | boolean | no | Legacy compatibility field with no current runtime effect. Default false |
send_email_enabled | boolean | no | Offer the built-in email tool when a recipient is configured. Default false |
send_email_recipient | string | no | Fixed email recipient chosen by the agent owner; the model cannot change it |
calculator_enabled | boolean | no | Offer the built-in calculate tool for exact arithmetic. Default false |
do_not_call_detection_enabled | boolean | no | Add the number to your opt-out list when the person on an outbound call asks not to be called again. Default true. false returns 400 (unless the agent already has it off) until your organization has recorded the do-not-call detection attestation |
send_sms_enabled | boolean | no | Offer send_sms when an eligible customer-connected sender is available. Default false |
sms_from_number | string | no | E.164 fallback sender owned by the organization and confirmed SMS-capable by Twilio or Telnyx |
sms_allowed_recipients | array of object | no | Up to 10 {number, label} contacts. Numbers are unique E.164 values. Labels are NFKC-normalized, unique case-insensitively, 1–60 visible characters, cannot look like phone numbers, and are caller-visible public metadata. Only labels are shown to the model. A configured contact enables real sends in widget, realtime, mic, and simulation sessions without broad recipient permission |
sms_allow_other_recipients | boolean | no | Permit any valid E.164 recipient beyond the current telephone party and configured contacts. Default false. When enabled, the agent can text any number a caller dictates |
transfer_destinations | array of object | no | Up to 50 {name, number} transfer numbers (or {name, action: "return"}), each with optional headers. Default []: the agent can't transfer calls |
words | array of object | no | Up to 200 words the agent says your way. An entry without language takes the agent's primary_language. Default [] |
sms_followup_enabled | boolean | no | Send one eligible post-call SMS. Default false |
sms_followup_template | string | no | Plain-text post-call template, up to 1600 characters |
consent_announcement_enabled | boolean | no | Defaults to true. New agents must be created with it enabled; disabling later requires the attestation workflow where applicable |
consent_announcement_text | string | no | Non-blank call-start announcement text |
disclosure_voice | string | no | female (default) or male: the voice the announcement plays in |
disclosure_style | string | no | clean (default) or phone: the version of the announcement |
disclosure_ring_count | integer | no | 0 (default) to 2: US rings after the announcement on inbound and browser calls, before the agent speaks |
audio_context_mode | string | no | full (default) or reduced |
watchdog_enabled | boolean | no | Default false |
additional_audio_context | boolean | null | no | Override whether the last few caller-audio turns are included. null keeps the direction-based default |
widget_enabled | boolean | no | Defaults to true |
split_testing_enabled | boolean | no | Default false |
integration_ids | array of UUID | no | Link reusable integrations by id. Tool names must be unique on the agent: two integrations with the same spec.function.name (or one that matches an attached MCP server's tool) return 400 naming the tool. Integrations of other agents may share a name |
knowledge_base_ids | array of UUID | no | Attach knowledge bases |
knowledge_document_ids | array of UUID | no | Attach individual knowledge documents |
mcp_server_ids | array of UUID | no | Attach MCP servers |
reusable_instruction_ids | array of UUID | no | Attach reusable instructions |
call_summary_enabled | boolean | no | Generate a post-call summary. Default false |
call_review_enabled | boolean | no | Call review after each call (outcomes, flags, summary, extraction). Default true. See Deployed fields |
end_of_call_tool | object | no | {"tool", "when", "skip_if_called"}: a tool called after every call ends; {} turns it off. See Deployed fields |
attention_reasons | object | no | {reason: true | false} switches for what can flag a call as needing attention; {} follows the organization. See Deployed fields |
phi_processing_override | string | no | inherit (default), phi or no_phi. See Deployed fields |
call_setup_webhook_url | string | no | Call setup webhook URL. Default "" (none) |
call_setup_webhook_signing_secret | string | no | Its signing secret (write-only). Set one to verify requests |
Returns 201 Created with the new Agent object. A
create deploys immediately (there is no draft yet) and records revision
1 in the version history.
Retrieve an agent
curl https://api.thunderphone.com/v1/agents/12 \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"agent = requests.get(
f"https://api.thunderphone.com/v1/agents/{agent_id}",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
).json()Returns 200 OK with an Agent object, or 404 if not found.
Update an agent (writes the draft)
PATCH and PUT do not modify the deployed configuration.
Every field you send is staged into the corresponding draft_* column;
production calls keep using the deployed values until you
deploy. Sending a value identical to the deployed
value clears that field's draft (so manually reverting an edit
removes the pending change).
curl -X PATCH https://api.thunderphone.com/v1/agents/12 \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "You are a refined support agent…"}'agent = requests.patch(
f"https://api.thunderphone.com/v1/agents/{agent_id}",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
json={"prompt": "You are a refined support agent…"},
).json()Accepts the same fields as create, including the
integration_ids / knowledge_base_ids / knowledge_document_ids /
mcp_server_ids / reusable_instruction_ids lists (staged as draft
attachment lists). Returns
200 OK with the Agent object — inspect the
draft_* fields and has_draft to see what is pending.
Optimistic concurrency
To safely make edits from a UI, include if_updated_at (or
updated_at) with the last updated_at you observed:
{
"prompt": "Newer prompt",
"if_updated_at": "2026-04-20T18:24:10.113Z"
}If the server-side updated_at differs, the API returns 409 Conflict
with {"detail": "Agent was modified by another user. Please refresh and try again."}
so you can refresh and retry.
Deploy the draft
Promotes every pending draft_* value to the deployed configuration,
clears the draft, and records a new revision in the
version history.
curl -X POST https://api.thunderphone.com/v1/agents/12/deploy \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"agent = requests.post(
f"https://api.thunderphone.com/v1/agents/{agent_id}/deploy",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
).json()Returns 200 OK with the updated Agent object
(has_draft is now false). Deploying with no pending draft is a
no-op that still returns 200 with the current agent.
| Body field | Type | Description |
|---|---|---|
updated_at | string | Optional. The agent's updated_at from your last read; the deploy is refused with 409 if the agent changed since |
confirm_price_change | boolean | Optional, default false. Send true only after the person paying for the agent agreed to the higher per-minute price this deploy brings |
Deploys that raise the price
A deploy that raises the agent's per-minute price needs an explicit
confirmation. It applies when the draft changes a pricing setting
(intelligence, audio_tier, endpointing, speech_detection, voice,
acknowledgement_feedback_mode or the setup) to one that costs more, when
a longer prompt alone raises it by more than a quarter of a cent a minute,
when the change ends the price the agent kept from before the current price
list, or when the deployed setup leaves the one the agent's discount covers
(ends_discount; on usage-based billing its calls then bill their full
usage). Without confirm_price_change: true, such a deploy deploys nothing
and returns 409:
{
"code": "price_change_needs_confirmation",
"detail": "Deploying changes reply speed to Fast. Front Desk goes from 8.00¢ to 10.94¢ a minute. Its price lock ends for good: switching back later does not bring the kept price back. Nothing was deployed. To deploy at the new price, send the request again with confirm_price_change: true.",
"next_step": "Tell the user the price per minute before and after, and only after they agree send the deploy again with confirm_price_change: true.",
"price_change": {
"raises_price": true,
"ends_price_lock": true,
"ends_discount": false,
"current_per_minute_cents": 8.0,
"new_per_minute_cents": 10.94,
"changes": [
{"field": "endpointing", "name": "reply speed", "from": "normal", "to": "fast", "from_label": "Normal", "to_label": "Fast"}
],
"message": "Deploying changes reply speed to Fast. Front Desk goes from 8.00¢ to 10.94¢ a minute. Its price lock ends for good: switching back later does not bring the kept price back."
}
}Show the person both prices, and only after they agree send the deploy again with the flag:
curl -X POST https://api.thunderphone.com/v1/agents/12/deploy \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"confirm_price_change": true}'Deploys that do not raise the price are unchanged and need no flag.
These include small prompt edits and other non-pricing changes, and a
cheaper setting. A version restore with deploy takes
the same flag. The MCP deploy_agent tool does not take it yet: deploy a
change that raises the price through this endpoint or the dashboard.
Discard the draft
Clears every pending draft field, reverting the editor state to the deployed configuration.
curl -X POST https://api.thunderphone.com/v1/agents/12/discard-draft \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"Returns 200 OK with the Agent object.
Relabel past calls
A call is judged against the outcome labels the agent had when the call started, so a new label list reaches only calls placed after it is deployed. This route puts the agent's older calls on its current deployed labels: for each call it re-picks the outcome label, and a one-sentence reason, from the call report written when the call ended and the call's transcript. Nothing else changes: the grade, the report's summary and needs-attention fields, and the call itself stay as they are, and no webhooks are sent. A later regrade of a relabeled call judges it against the same labels.
It covers the agent's calls with a judged outcome (not No conversation) whose labels differ from the
current list, started before the dry run, newest first, up to 5,000 calls a run. A call whose grade is still
being worked out is left for a later run, and so is every call once the agent's labels change while the run
is going. A run already going for the agent is returned instead of a second one, and while one agent's run
is going, starting another agent's in the same organization is refused (409, organization_busy). Any
member of the organization may start one.
A run starts in two steps. First, a dry run counts the calls, prices the run and returns a quote_id, good
for 30 minutes. Then you start the run with that quote_id. The run covers only the calls the quote
counted that still need relabeling, never others. A quote starts one run only. It's refused (409) once
used or expired, or after the agent's labels change. Then run a new dry run. A run stops, and ends failed,
once what it has spent passes 125% of estimated_cost_usd.
| Field | Type | Required | Description |
|---|---|---|---|
dry_run | boolean | no | true counts and prices the run and returns a quote, without changing anything |
quote_id | string | to start a run | The dry run's quote_id |
since | string | no | Dry run only: only calls from this ISO 8601 date or time on |
until | string | no | Dry run only: only calls before this ISO 8601 date or time |
include_transcript | boolean | no | Dry run only: false judges each call from its report alone. Default true |
curl -X POST https://api.thunderphone.com/v1/agents/12/relabel-calls \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dry_run": true}'A dry run returns 200 OK:
{
"dry_run": true,
"calls": 412,
"total_calls": 412,
"capped": false,
"max_calls": 5000,
"model_calls": 412,
"estimated_cost_usd": 3.1,
"max_cost_usd": 18.4,
"quote_id": "5d0c7b0e-0d43-4f3e-9a51-0c6b1a7f2e90",
"expires_at": "2026-10-30T18:32:11Z",
"job": null
}calls is how many calls the run covers (total_calls need it in all; capped when that is more than
max_calls), and model_calls how many of them need a model request (a change of colours only, or a
return to the default Success / Failure pair, which follows each call's grade, needs none).
max_cost_usd is the most the run can cost, with every request retried and at its longest answer.
quote_id is null when no call needs relabeling. Then start it:
curl -X POST https://api.thunderphone.com/v1/agents/12/relabel-calls \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"quote_id": "5d0c7b0e-0d43-4f3e-9a51-0c6b1a7f2e90"}'The run is queued and the response is 202 Accepted (200 OK with the run already going):
{
"created": true,
"job": {
"id": "9b6f0c2e-4f1a-4c55-9d43-2b7f1d0c6a11",
"status": "queued",
"progress": {},
"created_at": "2026-10-30T18:02:11Z",
"updated_at": "2026-10-30T18:02:11Z",
"error": null
}
}GET returns the agent's current labels and its latest run (job, or null). A run's status is
queued, running, succeeded or failed. progress counts total, done, relabeled, unchanged
(the label stayed the same), skipped_grading (a grade was in progress), failed and not_started calls.
stopped is labels_changed when the labels changed mid-run. A run whose calls failed is retried by
itself and picks up only the calls left.
Intro clip
GET /v1/agents/{agent_id}/intro-clip ·
POST /v1/agents/{agent_id}/intro-clip ·
DELETE /v1/agents/{agent_id}/intro-clip
Manage the agent's custom intro clip (intro_clip: "custom"). Like every
agent edit, an upload or removal changes the draft; it reaches live calls
when you deploy.
Upload with a multipart audio field. The file must be a PCM WAV,
48,000 Hz, mono, 16-bit, 0.5–15 seconds long and at most 2 MB; anything
else is refused with 400 and an audio error. (The dashboard converts any
file or browser recording to this format for you.) The upload sets
draft_intro_clip to custom along with draft_intro_clip_artifact_path and
draft_intro_clip_sha256.
curl -X POST https://api.thunderphone.com/v1/agents/12/intro-clip \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-F "audio=@intro.wav;type=audio/wav"Returns 201 Created:
{
"artifact_path": "agents/intro-clips/7/12/3f5a…c9.wav",
"sha256": "3f5a…c9",
"duration_seconds": 4.2,
"updated_at": "2026-10-13T18:02:11.482913Z"
}updated_at is the agent's new value, for
optimistic concurrency.
Download returns the clip the draft would play (the draft's clip if one is
staged, otherwise the deployed one) as audio/wav, or 404 when there is
none.
Remove stages removal of the custom clip; if intro_clip was custom,
the draft also switches it to none. Returns 200 OK with the draft's
resulting intro_clip and updated_at:
{ "intro_clip": "none", "updated_at": "2026-10-13T18:05:40.120004Z" }Generate (POST /v1/agents/{agent_id}/intro-clip/generate) says your own
words once in one of the platform's voices and stages the result as the
custom clip, exactly as an upload does. Send JSON with voice (a voice name
from GET /v1/voices, or one of your custom voices),
text (at most 200 characters, and no more than 15 seconds of speech) and
optionally language (default: the agent's primary language; the voice must
speak it). It costs the same as a voice sample, from your prepaid balance, and
counts toward the same limit of 30 samples an hour. ElevenLabs voices can't
generate one yet.
curl -X POST https://api.thunderphone.com/v1/agents/12/intro-clip/generate \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"voice": "jacqueline", "text": "This call may be monitored or recorded."}'Returns 201 Created with the upload's fields plus charged_cents. A refusal
charges nothing and returns code and detail: 400 invalid_arguments (no
voice or text, or a language the voice doesn't speak), 422 preview_unavailable_voice (a voice that can't generate one), 422 notice_unusable (longer than 15 seconds), 402 insufficient_balance, 429 preview_rate_limited or 502 preview_failed.
Consent attestations
GET /v1/agents/{agent_id}/consent-attestations ·
POST /v1/agents/{agent_id}/consent-attestations
Every agent plays a call-start consent announcement (recording and AI
disclosure) by default. Disabling it on a non-grandfathered agent requires
an active attestation: an admin's recorded affirmation that your
organization will provide any legally required notice and obtain any
legally required consent for its calls while the announcement stays off
(see the call recording consent laws
guide for what that involves). Without one, staging or deploying
consent_announcement_enabled: false returns 400.
Attestations are single-use per disable cycle: re-enabling the
announcement retires the active attestation (recorded with
status_reason: "superseded-by-reenable"), so the next disable needs a
fresh affirmation. ThunderPhone may also suspend or revoke attestations,
which restores the announcement at runtime. New attestations are recorded
only under the current attestation_text_version, but an active
attestation recorded under an earlier accepted version stays valid — a
statement-copy revision never re-prompts an organization that already
attested.
GET lists the agent's attestations (newest first) and returns the
current attestation_text_version and the server-owned canonical
statement package — statement_text, its statement_sha256, and the
statement_locale it resolved for your ?locale= (English until a locale
is registered). Display statement_text verbatim to the admin, then
POST with affirmed: true, the exact version, your locale, and
assent to the package: echo statement_sha256, or send the displayed
text as rendered_text (it must hash to the canonical value). The server
stores its canonical hash — blank or mismatched statement evidence is
rejected.
Step 1 — fetch the canonical statement:
curl https://api.thunderphone.com/v1/agents/12/consent-attestations?locale=en \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"{
"attestation_text_version": "consent-disable-v4-2026-08-03",
"statement_locale": "en",
"statement_text": "Turn off the call-recording announcement?\n…",
"statement_sha256": "7a284954b61b6610d1f9fb43ec05e82e6aec4362956fa5409deb3375cfc99035",
"results": []
}Step 2 — display the statement, collect the affirmation, and record it:
curl -X POST https://api.thunderphone.com/v1/agents/12/consent-attestations \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"affirmed": true, "attestation_text_version": "consent-disable-v4-2026-08-03", "statement_sha256": "7a284954b61b6610d1f9fb43ec05e82e6aec4362956fa5409deb3375cfc99035", "locale": "en"}'{
"id": 91,
"organization_id": 7,
"agent_id": 12,
"user_id": 3,
"attestation_text_version": "consent-disable-v4-2026-08-03",
"status": "active",
"attested_at": "2026-08-03T23:02:11.480Z",
"status_updated_at": null,
"affirmed": true,
"attestation_text_sha256": "7a284954b61b6610d1f9fb43ec05e82e6aec4362956fa5409deb3375cfc99035",
"locale": "en",
"user_role": "admin",
"status_reason": ""
}| Status | Condition |
|---|---|
201 | Attestation recorded (POST) |
400 | affirmed was not true, attestation_text_version does not match the current version, locale is blank, or the statement evidence (statement_sha256/rendered_text) is blank or does not match the canonical package |
403 | Caller is not an org admin |
PHI designation attestation
GET /v1/phi-designation-attestation?agent_id={agent_id} ·
POST /v1/phi-designation-attestation
Only organizations whose BAA includes the PHI designation clause
(baa_status: "executed_with_designation") use this endpoint. In such an
organization every agent processes PHI by default. Before an agent's
phi_processing_override can be set to no_phi, an organization admin
must record an attestation for that agent; without one, saving or deploying
the override returns 400.
GET returns the current text_version, the canonical English statement
(statement_en) and its statement_sha256, the organization's
baa_status and phi_processing, and designation_available. With
agent_id, it also reports whether that agent has an active attestation
(attested, attestation).
POST takes agent_id, accepted: true, the text_version and the
statement_sha256 from GET, and an optional display locale (default
en; the English statement governs). It returns 201 with the
attestation, or 200 with the existing one if the agent already has an
active attestation.
curl "https://api.thunderphone.com/v1/phi-designation-attestation?agent_id=12" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"{
"text_version": "phi-designation-no-phi-v1-2026-09-24",
"statement_en": "I am authorized to designate this agent as not processing protected health information (PHI). …",
"statement_sha256": "7776b7852f41e777eac228bfd5abdc4df5c958752b39ea032c86f14b02a892da",
"baa_status": "executed_with_designation",
"phi_processing": "phi",
"designation_available": true,
"attested": false,
"attestation": null
}| Status | Condition |
|---|---|
201 | Attestation recorded (POST) |
200 | The agent already has an active attestation (POST) |
400 | Unknown agent_id, accepted was not true, locale is blank, text_version is not accepted, or statement_sha256 does not match the canonical statement |
403 | API key, or caller is not an org admin (POST) |
409 | The organization's BAA has no designation clause, so there is nothing to attest |
Delete an agent
curl -X DELETE https://api.thunderphone.com/v1/agents/12 \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"requests.delete(
f"https://api.thunderphone.com/v1/agents/{agent_id}",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
)Returns 204 No Content. Requires an admin or owner. Phone numbers that
reference the deleted agent have their inbound/outbound assignment cleared,
and its SIP addresses and widget keys lose their agent, so nothing reaches it:
it answers no calls, and every endpoint treats it as gone (404).
An admin can restore a deleted agent for 30 days, with its settings and version history, from the dashboard's Settings. After that it is deleted for good. In an organization that may hold protected health information (a signed BAA, a PHI designation, or an agent set to process PHI), a delete is permanent at once and cannot be restored. Each delete and restore is recorded in the organization's change log with who made it.
An agent that other agents hand off to, in their
deployed or draft handoffs, cannot be deleted. The request returns
409 Conflict with "code": "agent_is_handoff_target" and the referencing
agents in agents ([{"id", "name"}]). Remove those handoffs first. An agent
a campaign uses cannot be deleted either: 409 with
"code": "agent_has_campaigns" and the campaigns in campaigns.
Duplicate an agent
Creates a new agent in the same org with everything configured for the
source agent: all settings, both deployed and pending drafts, the same
attached integrations, knowledge bases/documents, MCP servers and reusable
instructions, and new copies of its agent-scoped webhook endpoints (same URL,
events and signing secret), calendar/CRM connections, split-testing variants,
test scenarios and suites (with schedules), and client portal listings. The
name defaults to <name> (Copy) and can be overridden. If the source has a
pending draft, the copy has one too (has_draft: true), and deploying it
ships those edits.
A few settings are reset rather than copied:
- A consent announcement turned off by attestation stays off, and the copy gets its own attestation record carrying the original's. A copy of an agent exempted without an attestation starts with the announcement on.
- A live-processing disclosure set to off goes back to the org default.
- A PHI override the org doesn't allow goes back to the org default.
Phone numbers, SIP addresses, widget publishable keys, campaigns and call history stay with the source agent. Move a number to the copy separately. Steps and handoffs are copied as they are, so the copy hands off to the same agents.
curl -X POST https://api.thunderphone.com/v1/agents/12/duplicate \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Customer Support Agent (clone)"}'clone = requests.post(
f"https://api.thunderphone.com/v1/agents/{agent_id}/duplicate",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
json={"name": "Customer Support Agent (clone)"},
).json()| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | Defaults to "<original name> (Copy)" |
Returns 201 Created with the new Agent object.
Export an agent
Downloads everything about one agent as a zip: its settings, its instructions, its knowledge files, the phone numbers that route to it and its webhook endpoints. The files are plain JSON, Markdown and your own documents, so you can keep them or rebuild the agent somewhere else. The zip is built for the request and is not stored.
curl https://api.thunderphone.com/v1/agents/12/export \
-H "Authorization: Bearer $THUNDERPHONE_API_KEY" \
-o agent-12.zipimport os
response = requests.get(
f"https://api.thunderphone.com/v1/agents/{agent_id}/export",
headers={"Authorization": f"Bearer {os.environ['THUNDERPHONE_API_KEY']}"},
)
response.raise_for_status()
with open(f"agent-{agent_id}.zip", "wb") as archive:
archive.write(response.content)| Param | Required | Description |
|---|---|---|
include_url_paths | no | true keeps the path of each URL (https://api.example.com/v1/book). Default false: URLs are cut to scheme and host. See What is removed, and what is not |
Returns 200 OK with Content-Type: application/zip and
Content-Disposition: attachment; filename="thunderphone-agent-<name>-<YYYYMMDD>.zip".
Returns 404 when the agent is not in your organization, and 429 past 30
exports a minute.
What the zip holds
| File | Contents |
|---|---|
manifest.json | format (thunderphone.agent-export/v1), exported_at, the agent's id and name, files (every path in the zip) and omitted (anything left out, each with what and why) |
agent.json | The Agent object, as Retrieve an agent returns it: every setting, tools, steps, handoffs and any pending draft |
prompt.md | The deployed prompt |
knowledge/index.json | The knowledge bases and documents attached to the deployed agent. Each document has its type, its source (file, text or url), its path in the zip and its size |
knowledge/files/ | Each document: the original file where one is stored, otherwise the text extracted from it |
numbers.json | The phone numbers that route to the agent, each with its directions (inbound, outbound) and any pinned version |
webhooks.json | The webhook endpoints scoped to the agent, with their URLs and events |
README.md | The same list in plain English, with where to get what the export leaves out |
A knowledge file over 25 MB is left out, and so is every file after the
export reaches 100 MB of knowledge files. The index lists each one under
left_out with the reason (too_large, export_too_large, size_unknown,
no_original_kept, original_unavailable, no_text) and the endpoint that
still serves it, such as
Download the original file.
What is removed, and what is not
ThunderPhone removes every credential it stores as a credential: header
values, signing secrets, API keys, tokens and passwords. A removed value
reads [removed], and a header keeps its name. Set the values again from
your own records where you rebuild the agent.
URLs are cut to scheme and host by default, because a path or a query string
can carry a key (https://hooks.example.com/[removed]).
include_url_paths=true keeps the path. Sign-ins, query strings and
fragments are removed either way.
Your own content is not checked or changed. The instructions and the knowledge files are copied exactly as you wrote or uploaded them, so a key or a password you put in a prompt or a document is in the export. Check them before you share the zip.
What your credential can read
Any credential that can retrieve the agent can export it. Knowledge, numbers
and webhooks are included only when the same credential can read them through
their own endpoints. A part it cannot read is left out of the zip and listed
under omitted in the manifest:
- An OAuth token needs
knowledge:readfor knowledge,numbers:readfor numbers andintegrations:readfor webhooks. - Webhook endpoints need the
adminorownerrole.
Not in the export
- Call history: Export calls, up to
1,000 calls per request. Page through it with
start_dateandend_date. - Recordings: Get recording audio, one call at a time.
- Earlier revisions: Version history.
- Agents this one hands off to: export each one.
Transfer an agent to another org
Copy or move an agent to a different organization. admin+ role is required
on both orgs.
An sk_live_ API key is limited to its own organization: with a key,
target_org_id must be the key's organization, and any other target
returns 403. Copy or move between organizations from a signed-in session
(Authorization: Token <session-token> plus X-ThunderPhone-Org for the
source org), as below.
curl -X POST https://api.thunderphone.com/v1/agents/12/transfer \
-H "Authorization: Token YOUR_SESSION_TOKEN" \
-H "X-ThunderPhone-Org: 42" \
-H "Content-Type: application/json" \
-d '{
"target_org_id": 77,
"mode": "copy"
}'result = requests.post(
f"https://api.thunderphone.com/v1/agents/{agent_id}/transfer",
headers={"Authorization": "Token YOUR_SESSION_TOKEN", "X-ThunderPhone-Org": "42"},
json={"target_org_id": 77, "mode": "copy"},
).json()| Field | Type | Required | Description |
|---|---|---|---|
target_org_id | integer | yes | For mode="move" it must differ from the source org id |
mode | string | no | copy (default — keep source intact) or move (re-home the agent) |
name | string | no | Override the new agent's name |
copy makes the same copy as Duplicate, with the
target org's rules applied: integrations, knowledge, MCP servers and reusable
instructions attach only if the same record belongs to the target org;
webhook endpoints, calendar/CRM connections, client portal listings, legacy
inline tools, and test scenarios created from real calls are not copied and
are named in not_copied; copied test-suite schedules start disabled; SMS
sending is off until the target org picks one of its own numbers; transfer
numbers the target org could not save (numbers a ThunderPhone number can't
reach, when the target org has no number on its own carrier) are left behind
and reported as transfer_destinations in not_copied; and the consent
announcement starts on, because another org's attestation does not
cover the target org.
Returns 201 Created for copy (with not_copied, a list such as
["webhook_endpoints"]) / 200 OK for move:
{
"mode": "move",
"source_org_id": 42,
"target_org_id": 77,
"agent": { /* Agent object in the target org */ },
"detached": {
"publishable_keys": 1,
"webhook_endpoints": 0,
"provider_connections": 1,
"client_portals": 0,
"transfer_destinations": 0
}
}Version history
Deploys (and creates/duplicates/transfers) record an
AgentConfigVersion snapshot of the deployed configuration.
Draft autosaves are not versioned — the history reflects what
actually shipped to production.
curl 'https://api.thunderphone.com/v1/agents/12/versions?limit=20' \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"versions = requests.get(
f"https://api.thunderphone.com/v1/agents/{agent_id}/versions",
params={"limit": 20},
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
).json()| Query param | Default | Description |
|---|---|---|
limit | 20 | Max results. Values outside 1–100 are clamped |
Response:
{
"count": 3,
"results": [
{
"id": 501,
"revision": 3,
"created_by_id": 7,
"created_by_name": "Dana Ruiz",
"created_by_staff": false,
"source": "api",
"restored_from_revision": null,
"created_at": "2026-04-20T18:24:10.113Z",
"snapshot": { /* Deployed agent config at this revision */ },
"changed_fields": ["prompt", "voice"]
}
]
}| Field | Type | Description |
|---|---|---|
id | integer | Version row id |
revision | integer | 1-based, increments per deploy |
created_by_id | integer | null | User id that deployed the revision |
created_by_name | string | null | That user's name. null when nobody is on record, and for ThunderPhone support staff (then created_by_staff is true) |
created_by_staff | boolean | Deployed by ThunderPhone support |
source | string | null | Where the deploy came from: dashboard (the old view), zeus (a person's own edit in the app), zeus_chat (Zeus's chat, asked by a person), copilot (the old view's assistant), api, or baseline (what was live before the agent's first saved version, recorded so that publish can be undone). null for revisions recorded before October 2026 and for imports |
restored_from_revision | integer | null | The revision this one put back, when it was a restore |
snapshot | object | Full deployed config at this revision |
changed_fields | array of string | Fields that differ from the previous revision |
Restore a revision
Puts the agent back to an earlier deployed revision. The revision's
configuration is saved to the draft the same way a PATCH is, then
deployed when you ask for it and your role allows it.
curl -X POST https://api.thunderphone.com/v1/agents/12/versions/2/restore \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"deploy": true}'| Body field | Default | Description |
|---|---|---|
deploy | true | Deploy the restored configuration. Deploying needs an admin or owner; for a member the restore is saved as a draft |
if_updated_at | none | The agent's updated_at as you last read it. If the agent changed since, the restore is refused with 409 and nothing changes |
if_live_revision | none | The latest revision as you last read it. If a newer revision was deployed since, the restore is refused with 409, so an undo never also discards someone else's deploy |
discard_drafts | false | Go ahead even though someone else has draft changes, not yet deployed, that the revision would overwrite. Without it, that restore is refused with 409 (below) and nothing changes |
confirm_price_change | false | With deploy: the person agreed to the higher per-minute price the restored revision brings. Without it, such a restore is refused with 409 price_change_needs_confirmation, as a deploy is |
Response:
{
"status": "deployed",
"restored_revision": 2,
"revision": 4,
"kept": [{"field": "consent_announcement_enabled", "reason": "needs_attestation"}],
"also_published": [],
"discarded": [],
"agent": { /* The agent, as GET /v1/agents/{agent_id} returns it */ }
}| Field | Description |
|---|---|
status | deployed, draft_saved (a member, or deploy: false) or no_change (the agent already matches the revision) |
revision | The new revision the deploy recorded, or null |
kept | Settings left as they are now. needs_attestation: the revision had the consent announcement or live-processing disclosure off, and turning it off again needs a new attestation. not_allowed: your organization's BAA no longer allows the revision's PHI setting. deleted_since: some attachments were deleted; the rest are restored. published_only: the name, on a restore saved as a draft |
also_published | Draft fields someone had saved that the revision does not cover. A deploy publishes them too, as the deploy endpoint would |
discarded | Other people's draft fields the restore wrote over. Only ever non-empty with discard_drafts: true |
When the revision would overwrite draft changes that someone else saved and
has not deployed, the restore is refused with 409 and nothing changes. The
body has the same shape as the optimistic concurrency
conflict, with reason set to unpublished_drafts:
{
"detail": "Agent was modified by another user. Please refresh and try again.",
"conflict": {
"reason": "unpublished_drafts",
"updated_at": "2026-10-17T18:02:11.204Z",
"changed_at": "2026-10-17T18:02:11.204000+00:00",
"action": "draft",
"editors": [{"name": "Sam Lee", "staff": false, "is_you": false}],
"fields": ["prompt"]
}
}Ask the person, then send the same request with discard_drafts: true to go
ahead. Your own draft changes never block a restore.
A restore saved as a draft (a member, or deploy: false) leaves the agent's
name as it is, listed in kept with reason published_only: renames take
effect immediately, so the name changes when an admin deploys the revision.
The intro clip's audio file is not restored: the agent keeps the clip it has now.
Prompt helpers
These endpoints are convenience wrappers that call the same underlying models we use in the dashboard. All of them take and return JSON; none change your agents or any other resource you manage.
Detect prompt language
curl -X POST https://api.thunderphone.com/v1/agents/prompt-language-check \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Hola, gracias por llamar..."}'{
"detected_language_code": "es",
"detected_language_name": "Spanish",
"mismatch": true,
"provider": "<provider id>"
}Translate prompt
curl -X POST https://api.thunderphone.com/v1/agents/translate-prompt \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Hola, gracias por llamar…",
"target_locale": "en-US"
}'{
"translated_prompt": "Hello, thank you for calling…",
"source_language_code": "es",
"source_language_name": "Spanish",
"provider": "<provider id>",
"used_fallback": false
}Generate acknowledgement prompt
Produces a short "filler while thinking" phrase for an agent's acknowledgements.
curl -X POST https://api.thunderphone.com/v1/agents/generate-acknowledgement-prompt \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "You are a friendly receptionist for a dental office.",
"target_locale": "en-US"
}'{
"acknowledgement_prompt": "Sure, let me take a quick look…",
"provider": "<provider id>",
"used_fallback": false
}Render steps as one prompt
Returns the shared instructions and steps as one prompt, in the form a
stepped agent falls back to when steps cannot run. Use it to turn a stepped
agent back into a single-prompt agent: send the result as prompt together
with "steps": null. steps is checked for shape only, and nothing is saved.
With "steps": null, prompt comes back unchanged.
curl -X POST https://api.thunderphone.com/v1/agents/steps/flatten \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "You are Ava, the front desk for Acme Dental.",
"steps": {
"start_step": "greet",
"steps": [
{
"id": "greet",
"name": "Greeting",
"instructions": "Ask how you can help.",
"transitions": [{"to": "book", "when": "The caller wants an appointment"}]
},
{"id": "book", "name": "Book", "instructions": "Offer open slots and book one."}
]
}
}'{
"prompt": "You are Ava, the front desk for Acme Dental.\n\n## Conversation flow\n1. Greeting (start here): Ask how you can help.\n - If The caller wants an appointment → go to Book\n2. Book: Offer open slots and book one.\n"
}Analyze a prompt
Runs the same advisory checks the agent builder shows under the prompt
editor. A model extracts facts from the prompt text (languages, tools it
mentions, escalation and consent guidance), and the API compares them
with the agent's configuration. Nothing is saved to the agent, so you can
send an unsaved draft. Requires the member role or higher.
curl -X POST https://api.thunderphone.com/v1/agents/123/prompt-analysis \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Eres la recepcionista de una clínica dental. Usa book_appointment para agendar citas.",
"primary_language": "en",
"additional_languages": [],
"voice": "john",
"integration_ids": [],
"mcp_server_ids": []
}'| Field | Type | Description |
|---|---|---|
prompt | string | Required. The prompt text to analyze. May be empty. Max 100,000 characters. |
primary_language | string | Language code to check against. |
additional_languages | string[] | Additional language codes to check against. |
voice | string | Voice to check language coverage against. |
integration_ids | integer[] | Integrations to treat as connected. |
mcp_server_ids | integer[] | MCP servers to treat as connected. |
integration_public_ids | string[] | The same as integration_ids, by the integration id the agent and integration endpoints return. Ignored when integration_ids is sent. |
mcp_server_public_ids | string[] | The same as mcp_server_ids, by the MCP server id. Ignored when mcp_server_ids is sent. |
Every field except prompt is optional. An omitted field uses the
agent's draft value, or the deployed value when the draft has none, so
the findings depend on the agent unless you send every field, as the
example does.
{
"facts": {
"languages": {
"declared": [],
"written_in": [{"code": "es", "share": 1.0}]
},
"tools": {
"referenced": [
{"name": "book_appointment", "kind": "identifier", "evidence": "Usa book_appointment para agendar citas"}
]
},
"escalation": {"present": false, "kind": "none", "evidence": ""},
"compliance": {"present": false, "evidence": ""}
},
"findings": [
{
"id": "languages-not-configured",
"severity": "warning",
"params": {"languages": [{"code": "es", "supported_by_voice": true}]}
},
{
"id": "primary-language-mismatch",
"severity": "warning",
"params": {"detected": "es", "primary": "en"}
},
{
"id": "tool-actions-without-tools",
"severity": "warning",
"params": {"tools": ["book_appointment"]}
},
{"id": "missing-escalation-guidance", "severity": "warning", "params": {}},
{"id": "missing-consent-or-privacy-guidance", "severity": "info", "params": {}}
]
}Finding id | Severity | Meaning |
|---|---|---|
languages-not-configured | warning | The prompt declares a language, or has at least 20% of its text in one, that the agent isn't configured for. params.languages lists each code and whether the voice supports it. |
primary-language-mismatch | warning | At least 60% of the prompt is written in params.detected, not the primary language params.primary. |
tool-actions-without-tools | warning or info | The prompt promises actions that need an external system, but no integration or MCP server is connected. warning when it names a tool identifier, info when it only describes an action. params.tools lists up to five. |
tool-arguments-not-declared | warning | The prompt tells the agent to send arguments that a connected integration does not declare in spec.function.parameters.properties. params.undeclared lists up to five tools as {name, arguments}. |
missing-escalation-guidance | warning | The prompt gives no path to a human, transfer or callback. |
missing-consent-or-privacy-guidance | info | The prompt has no consent, recording-notice, privacy or disclosure guidance. |
facts is what the model extracted; findings are computed from the
facts and the configuration on every request. New finding ids and fact
keys may be added, so ignore ones you don't recognize.
The analysis is advisory and never fails the request because the model did:
- If the model is unavailable or returns something unusable, you get
200with{"findings": [], "facts": null, "error": "unavailable"}. - Facts are cached per agent and prompt text. Repeating a prompt returns instantly, with findings recomputed against the current configuration.
- Uncached requests are throttled per agent. A new model request starts
no sooner than two seconds after the previous one started, and while
one is still running it holds a 20-second lease. A request inside
either window returns the last good result with
"stale": trueandretry_after_ms. If there is no earlier result it returns202with onlyretry_after_ms. Either way, retry after that many milliseconds.
Review a prompt
Reviews a prompt against ThunderPhone's voice-agent prompt style guide. MCP
clients can read the guide as the resource thunderphone://guides/prompt-style.
A model reads the prompt and the API checks its answer: every quote and edit
is an exact passage of the prompt, and an edit that would not apply is left
out. Nothing about the agent changes; the rule inventory is saved with the
agent's prompt revision for that text, so later reviews keep its ids.
Requires the member role or higher and the agent iteration toolkit, which
is enabled per organization while it is in beta: without it the response is
403 with code: "feature_not_enabled" and a next_step. An OAuth token
needs the agents:write scope, for a dry run too, since a review saves the
prompt's rule inventory and spends credits.
# 1. Quote it.
curl -X POST https://api.thunderphone.com/v1/agents/123/prompt-review \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dry_run": true}'
# 2. Run it with the quote_id the dry run returned, capped at the amount you approve.
curl -X POST https://api.thunderphone.com/v1/agents/123/prompt-review \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"quote_id": "<quote_id from step 1>", "max_cost_cents": 30}'The review is paid, so it is quoted first. A dry_run returns
estimated_cost_cents (the likely cost), worst_case_cost_cents (the most
it can cost: every input token uncached and the model's full output
allowance) and a quote_id. The quote is signed and valid for 15 minutes,
and it is bound to the agent and to these exact inputs (prompt,
previous_prompt, previous_inventory, language) and to the model and
its prices. A run that calls the model sends it back with max_cost_cents
and is held to the lower of the two. It is refused before anything is spent,
with 400, a code and a next_step, when the quote is missing
(quote_required), is not one the API issued, has expired, was issued for
other inputs or prices (quote_invalid, quote_expired, quote_mismatch),
was already used (quote_used: a quote pays for one run), or when the run
would now cost more than quoted (quote_outdated). Without
max_cost_cents the response is 400 with code: "max_cost_required", and
the quote is not used up. The quote is used up just before the model is
called, so a run stopped before that (for example by a max_cost_cents
below the call's bound) leaves it usable. From then on it stays used, so a
run that fails after the call was sent needs a new dry run before you repeat
it, and its error's next_step says so. A review of text this agent already
had reviewed with the same inputs comes from cache, costs nothing and needs
neither.
| Field | Type | Description |
|---|---|---|
prompt | string | The text to review. Omitted, the agent's draft prompt, or its deployed prompt when there is no draft. Max 100,000 characters. |
previous_prompt | string | The prompt before the edit you are checking. Findings then focus on the passages that changed, and behaviors that are still there keep their inventory ids. |
previous_inventory | object[] | rule_inventory from an earlier review. Without it, the inventory stored for previous_prompt is used when there is one, else the newest inventory saved for another version of the agent's prompt. |
language | string | Language code the prompt is written in. Defaults to the agent's primary language. |
quote_id | string | The quote_id of a dry run with the same inputs. Required unless dry_run is set or the review comes from cache. |
max_cost_cents | number | The most this run may cost, in US cents. Required with quote_id. |
dry_run | boolean | Return only the quote (estimated_cost_cents, worst_case_cost_cents, steps and quote_id), without calling the model. |
{
"agent_id": 123,
"prompt_source": "draft",
"prompt_sha256": "9c1f…",
"findings": [
{
"guideline_id": "S1",
"guideline_title": "One question per turn, and the question ends the turn",
"quote": "Ask for their name and their phone number, then tell them we will call back.",
"problem": "Two questions in one turn, with a statement after them that talks over the caller's answer.",
"severity": "major",
"suggested_edit": {
"find": "Ask for their name and their phone number, then tell them we will call back.",
"replace": "Tell them we will call back, then ask for their name. Once they answer, ask for their phone number."
}
}
],
"prompt_edits": [
{
"find": "Ask for their name and their phone number, then tell them we will call back.",
"replace": "Tell them we will call back, then ask for their name. Once they answer, ask for their phone number."
}
],
"rule_inventory": [
{
"id": "b4d1e09a2",
"behavior": "Ask for the caller's name and phone number to arrange a callback.",
"quote": "Ask for their name and their phone number",
"quotes": ["Ask for their name and their phone number"]
}
],
"overlaps": [],
"misplaced": [],
"greeting": "Thanks for calling Northside Plumbing, how can I help?",
"refactor_suggested": false,
"refactor_reasons": [],
"refactor_facts": {"behaviors": 14, "rules_added_since_refactor": null, "repeated": 0, "duplicates": 0, "conflicts": 0, "misplaced": 0},
"model": "thunderphone-reviewer",
"cached": false,
"usage": [
{"step": "review", "model": "thunderphone-reviewer", "input_tokens": 4810, "cached_input_tokens": 0, "output_tokens": 1630, "reasoning_tokens": 420, "cost_cents": 3.16}
],
"cost_cents": 3.16,
"validation": {"findings_dropped": 0, "quotes_repaired": 0, "edits_dropped": 0, "edits_repaired": 0, "inventory_dropped": 0, "inventory_ids_reassigned": 0, "inventory_quotes_missing": 0}
}| Field | Meaning |
|---|---|
findings | Up to 25, most important first. guideline_id names a guideline of the style guide, quote is an exact passage of the prompt, problem is one sentence in English, and severity is major (it changes what the agent does or how a caller hears it) or minor. suggested_edit is null when the fix is larger than one edit. With previous_prompt, each finding also has in_changed_passage. |
prompt_edits | The findings' edits that apply together, in order. Each find occurs exactly once in the prompt. Apply them in order and send the result as the agent's prompt. |
rule_inventory | The behaviors the prompt asks of the agent, each with an id, one sentence, and in quotes every passage that asks for it (quote is the first). A behavior the prompt states in more than one place has more than one quote. A behavior the model names without a passage of the prompt is left out (counted in validation.inventory_dropped), and a carried-over id left out that way counts as removed. Ids carry over between reviews of successive versions, and a new behavior gets a new id; a behavior an older version asked for that comes back takes its old id. meaning stays the same while a behavior asks for the same thing, however it is worded, so two inventories differ in meaning exactly where their meaning tokens differ. |
inventory_changes | Only with a previous inventory: where it came from (previous_inventory: supplied, stored for previous_prompt's, or agent for the agent's newest), the ids added and removed since it, changed, the carried-over ids whose behavior now asks the agent for something different, and added_back, the added ids an older version of the prompt had. |
conversations | Only when reviewing the agent's own prompt and the agent has test conversations: how many are active, how many were written for a prompt whose behaviors differ from this one (with_behavior_changes, plus unknown when that prompt was never reviewed), refresh_suggested, and a next_step naming refresh_conversations. |
overlaps, misplaced | Separate behaviors that contradict each other (conflict) or ask for much the same thing (duplicate), and rules that sit far from the part of the call they govern. |
greeting | The line the prompt tells the agent to open with word for word, or null. |
refactor_suggested, refactor_reasons | Whether the prompt is due a refactor: two or more behaviors stated in more than one place, two or more overlaps, three or more misplaced rules, or five or more behaviors added since the last refactor when that is known. Each reason has a code, a count and a sentence. refactor_facts.rules_added_since_refactor counts the behaviors whose ids are not in the inventory of the agent's last verified refactor, once the agent's prompt has been that refactor's text, and is null when there is no such refactor. |
cost_cents, usage | What the model call cost. A review of text that was already reviewed comes from cache ("cached": true) and costs nothing. model here and in each usage row is the ThunderPhone label thunderphone-reviewer, not the name of an AI model. |
validation | How many of the model's items the API dropped or repaired because they did not match the prompt. |
If the model is unavailable, the response is 503 with a code and a
next_step, and nothing about the agent changes. A model deployment with no
price on record is refused (503, model_unpriced), since its cost could not
be capped. A call the provider answers without reporting its usage, or that
times out after it was sent, is counted at its worst case. Prompts in any
language can be reviewed: findings are written in English, and quotes stay
in the prompt's language. Reviews are limited to 60 an hour per user.
The inventory of the agent's current prompt is saved with that prompt revision. The inventory of other text (a candidate you send, or a rewrite not applied yet) and each review's result are cached for this agent only: reviews for 7 days and inventories for 90 days, each under the inventory its ids were carried over from, so two lines of edits never overwrite each other. Deleting the agent, or its organization, deletes these cached entries.
Refactor a prompt
Rewrites a prompt into the style guide's shape, keeping what it asks the
agent to do, and maps every behavior of its inventory onto the new text.
Use it when a review reports refactor_suggested. The rewrite is returned,
not saved: apply it with Update an agent,
test the draft, and deploy only when the tests pass. Requires the member
role or higher and the agent iteration toolkit (see Review a prompt).
curl -X POST https://api.thunderphone.com/v1/agents/123/prompt-refactor \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"instructions": "Keep the Spanish section at the end.", "dry_run": true}'
curl -X POST https://api.thunderphone.com/v1/agents/123/prompt-refactor \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"instructions": "Keep the Spanish section at the end.", "quote_id": "<quote_id>", "max_cost_cents": 90}'A refactor makes up to three paid model calls: a review of the current
prompt when none is on record, the rewrite, and the verification. Quote it
with dry_run first: steps lists each call with its estimated_cost_cents
and worst_case_cost_cents, and the quote_id binds the run to these exact
inputs (prompt, inventory, instructions, language, verify) and the
quoted total, as for a review. Send it back with
max_cost_cents; a max_cost_cents of the total worst_case_cost_cents
lets every step run. Each call is checked against what is left of the lower
of the two before it is sent, using its worst case. When no review of the
text is on record, the quote counts the longest inventory a review can
return, so its worst case is far above the estimate; review the prompt first
for a closer quote.
The whole request also has one time limit (200 seconds); each call gets only
the time that is left.
When the cap or the time limit leaves no room for the review or the rewrite,
that call is not sent: the response is an error (400 with
max_cost_too_low, or 503 with deadline_reached) that names the stage
and carries what is already done (inventory, greeting, and cost_cents
for any call already made). When the review was sent, the run has used up
its quote_id: send a dry run with that inventory for a new quote, then
repeat with it, and the review is not paid for again. When nothing was sent,
the quote is still usable. When only the verification no longer fits, the rewrite
is returned with verification set to skipped_cost or skipped_deadline.
| Field | Type | Description |
|---|---|---|
prompt | string | The text to refactor. Omitted, the agent's draft prompt, or its deployed prompt when there is no draft. |
inventory | object[] | rule_inventory from a review of this exact text. Without it, the stored inventory is used, or the API reviews the prompt first (a second model call, included in cost_cents). |
instructions | string | Anything else the rewrite should do, up to 4,000 characters. |
language | string | Language code the prompt is written in. Defaults to the agent's primary language. |
verify | boolean | Default true. Re-read the new prompt to find behaviors the rewrite added, removed or changed (one more review call, included in cost_cents). |
quote_id | string | The quote_id of a dry run with the same inputs. Required unless dry_run is set. |
max_cost_cents | number | The most this run may cost, in US cents, across all its calls. Required with quote_id. |
dry_run | boolean | Return only the quote: estimated_cost_cents, worst_case_cost_cents, steps and quote_id, including the review and the verification when they would run. |
{
"agent_id": 123,
"prompt_source": "draft",
"prompt": "You answer the phone for Northside Plumbing…",
"summary": "Moved the callback rules into the part of the call where they apply and merged two repeated rules about short answers.",
"has_dropped_behaviors": false,
"dropped_behaviors": [],
"behavior_preserved": false,
"behavior_changes": {
"added": [
{
"id": "bc248a9ea",
"behavior": "Ask one question at a time and end each turn with the question.",
"quote": "Ask one question at a time, and end the turn with the question."
}
],
"removed": [],
"changed": []
},
"verification": "done",
"new_findings": null,
"new_inventory": [{"id": "b4d1e09a2", "behavior": "Ask for the caller's name, then their phone number.", "quote": "ask for their name", "quotes": ["ask for their name"]}],
"unlocated_behaviors": [],
"behavior_map": [
{
"id": "b4d1e09a2",
"behavior": "Ask for the caller's name and phone number to arrange a callback.",
"status": "reworded",
"new_quote": "ask for their name",
"located": true,
"note": "Split into one question per turn."
},
{
"id": "b77c0f1e3",
"behavior": "Keep answers short.",
"status": "merged",
"into_id": "b0a9d4c61",
"new_quote": "Keep each turn to one or two short sentences",
"located": true,
"note": "It repeated the paragraph on how to speak."
}
],
"greeting": "Thanks for calling Northside Plumbing, how can I help?",
"diff": "--- current\n+++ refactored\n@@ …",
"prompt_edits": [{"find": "<the whole current prompt>", "replace": "<the whole new prompt>"}],
"inventory_source": "review",
"model": "thunderphone-reviewer",
"cost_cents": 9.8
}Every behavior of the inventory appears in behavior_map exactly once, as
kept, reworded, merged (with into_id) or dropped. A behavior the
rewrite did not account for is unaccounted. Both dropped and
unaccounted behaviors are listed in dropped_behaviors, so check
has_dropped_behaviors before you apply the rewrite. unlocated_behaviors
lists behaviors the map says were kept whose passage could not be found in
the new text.
The map is the rewrite's own account. With verify on (the default), a
separate review then reads the new prompt with the old inventory, so each
behavior keeps its id, and reports what it finds in behavior_changes:
added (a behavior the old prompt did not ask for), removed (an old
behavior the new prompt no longer asks for, with the refactor_status the
map gave it), and changed (the same behavior, before and after, where
the new text asks the agent for something different). behavior_preserved
is true only when all three are empty; review the changes before you apply
a rewrite where it is false. The review only reads the new text's rules,
so new_findings is null (run review_prompt on the new text for
findings); new_inventory is its inventory, which later reviews of the new
prompt reuse. Once the agent's prompt is the new text, that inventory is
the baseline for rules_added_since_refactor in later reviews. If the
verification cannot run, verification is failed (or skipped_cost or
skipped_deadline, see above), behavior_preserved is null, and the
rewrite is still returned. With verify: false, verification is off.
The API rejects a rewrite with 502, a code and a next_step when it
comes back empty, cut off or far shorter than the prompt, when it changes a
{{variable}} placeholder in any way other than moving it (each one has to
come back exactly as written, default included, as many times as before:
refactor_changed_placeholders), or when it changes the line the agent
opens with word for word (refactor_changed_greeting), with verify on or
off. That line is the one the review of the current prompt found, never the
rewrite's own account of it; when no review of this exact text is on record,
the refactor runs one first. Change the greeting with an edit instead. A rejected rewrite still reports its cost_cents. If the model
is unavailable, the response is 503. Refactors are limited to 20 an hour
per user.
Voices
List the supported voices and languages — or browse the voice gallery with playable samples:
curl 'https://api.thunderphone.com/v1/voices?languages=en,es' \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"{
"voices": [
{
"name": "john",
"display_name": "John",
"gender": "male",
"category": "multilingual",
"accent": "american",
"languages": ["en", "es", "fr", "…"],
"sample_url": "https://…/john.mp3?v=3"
}
],
"languages": [ /* language catalog entries */ ],
"elevenlabs": {
"provider": "ElevenLabs",
"model": "eleven_v4_turbo",
"model_label": "Eleven v4 Turbo",
"surcharge_cents": 5,
"hipaa_eligible": false,
"available": true,
"unavailable_reason": null,
"languages": ["ar", "bn", "…"],
"voices": [
{
"name": "elevenlabs:UgBBYS2sOqTuMpoF3BR0",
"display_name": "Mark",
"tagline": "Natural Conversations",
"description": "A casual, young-adult speaking in a natural manner. Perfect for Conversational AI.",
"gender": "male",
"age": "young",
"accent": "american",
"native_language": "en",
"use_case": "conversational",
"sample_url": "https://api.thunderphone.com/v1/voices/library/sample?voice=elevenlabs%3AUgBBYS2sOqTuMpoF3BR0&sig=…"
}
]
}
}| Query param | Description |
|---|---|
languages | Comma-separated codes — only voices supporting all of them are returned |
category | Filter by voice category |
gender | Filter by voice gender |
The name is what you set on an agent's voice field.
The list also includes the free Australian voices from the full voice library, such as platform:tessa. Their category is their accent (australian), and they speak English only.
ElevenLabs voices
The elevenlabs block lists voices from ElevenLabs under ElevenLabs' own names,
on the Eleven v4 Turbo model. Every voice speaks every code in its languages,
which is the whole language catalog. On the pricing existing accounts keep
until December 1, 2026, they cost surcharge_cents per minute in every
language, in place of any language or premium-voice surcharge. On the
new pricing there is no surcharge: the voice is billed at
ElevenLabs' list price, plus our margin, and surcharge_cents does not apply. The
gender filter applies to this block too; languages and category keep it
only when every requested language is covered or the category is elevenlabs.
Each voice's sample_url is a short line in the voice, made on the model your
calls use, so it sounds the way the voice sounds on a call. It needs no
Authorization header (the link is signed for 7 days), so an <audio> element
can play it. The first play of a voice can take a few seconds while the sample
is made. When it can't be made right then, the link redirects to ElevenLabs' own
preview, which was recorded on another model and can sound different.
ElevenLabs voices are not HIPAA eligible yet (hipaa_eligible: false):
- An agent, draft, step, split-test variant or realtime session whose PHI
designation resolves to PHI cannot select one. The request fails with
"ElevenLabs voices are not HIPAA eligible yet. Ask us to enable HIPAA for them, or pick another voice.", as does switching an agent that uses one to processing PHI. availableisfalsewithunavailable_reason: "phi"when your whole organization resolves to PHI. Individual agents may still be designated as not processing PHI; the check above is per agent.- If a call to an agent with an ElevenLabs voice runs as a PHI call anyway, it uses a standard voice for the call language and carries no ElevenLabs charge.
Every voice
GET /v1/voices lists the featured voices. GET /v1/voices/library searches
every voice from every voice vendor we use, many thousands in all:
curl 'https://api.thunderphone.com/v1/voices/library?q=warm+australian&language=en&limit=2' \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"{
"voices": [
{
"name": "platform:cooper",
"display_name": "Cooper",
"tagline": "",
"description": "Casual, warm Australian male voice, ideal for lifestyle content, travel, and casual narration.",
"gender": "male",
"accent": "australian",
"age": null,
"use_case": "conversational",
"languages": ["en"],
"native_language": "en",
"group": "platform",
"surcharge_cents": 0,
"hipaa_eligible": true,
"sample_url": "https://api.thunderphone.com/v1/voices/library/sample?voice=platform%3Acooper&sig=…"
}
],
"total": 14,
"offset": 0,
"limit": 2
}| Query param | Description |
|---|---|
q | Words that must each start a word of the voice's name, description, accent or style (male does not match female) |
group | platform (ThunderPhone platform voices), cartesia or elevenlabs |
language | Only voices that speak this language code. Several codes separated by commas (es,en) keep voices that speak every one |
gender | female or male |
accent | Words of the accent, e.g. australian |
age | young, middle_aged or old |
use_case | conversational, narrative_story, informative_educational, social_media, advertisement, characters_animation or entertainment_tv |
hipaa | true for voices an agent that processes PHI may use |
price | included keeps voices with no per-minute add-on (surcharge_cents of 0); paid keeps the ones with one |
like | Words that rank rather than filter: voices whose name, description, accent or style has more of them come first, and none is left out (warm calm not too fast). Up to 12 words count |
compact | true for browsing: without q or accent, leaves out platform voices in languages other platform voices already cover |
exclude_featured | true leaves out the ElevenLabs voices GET /v1/voices already lists |
names | Comma-separated voice names to look up (up to 50) instead of searching |
limit, offset | Page size (1–200, default 50) and start; total counts every match |
Set an agent's voice (or a step's, a variant's or a realtime session's) to a
voice's name:
platform:<id>andcartesia-library:<id>voices speak the codes in theirlanguages. An agent whose primary or additional languages they don't speak is refused, and native voice switching does not apply to them. They are HIPAA eligible.elevenlabs:<id>voices follow the ElevenLabs rules: every language, not HIPAA eligible yet.surcharge_centsis added to the per-minute price, as for featured voices, on the pricing existing accounts keep until December 1, 2026. An agent's grandfathered premium-voice rate applies to them too. On the new pricing the voice is billed at its provider's list price instead, andsurcharge_centsdoes not apply.sample_urlplays without anAuthorizationheader. Platform and Cartesia samples are made the first time anyone plays them, so the first play can take a few seconds; the URL works for seven days.
Related
Match API fields to the dashboard controls.
Configure platform-run actions and their limits.
Set cold and screened warm-transfer routing.
Assign agents to inbound/outbound directions on phone numbers.
Organization-wide prompt sections attached via reusable_instruction_ids.
Ground the agent in your documents.
A/B test prompt and voice variants on live traffic.
Regression-test the agent before deploying.