@omnidim-ai/mcp-server 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -35
- package/build/flat-args.d.ts +15 -0
- package/build/flat-args.js +57 -0
- package/build/flat-args.js.map +1 -0
- package/build/helpers.js +3 -4
- package/build/helpers.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +395 -285
- package/build/index.js.map +1 -1
- package/build/playbooks.generated.d.ts +23 -0
- package/build/playbooks.generated.js +420 -0
- package/build/playbooks.generated.js.map +1 -0
- package/build/procedures.d.ts +11 -7
- package/build/procedures.js +45 -843
- package/build/procedures.js.map +1 -1
- package/build/tool-annotations.js +1 -0
- package/build/tool-annotations.js.map +1 -1
- package/build/tool-marks.js +14 -14
- package/build/tool-marks.js.map +1 -1
- package/package.json +1 -1
- package/src/flat-args.ts +57 -0
- package/src/helpers.ts +3 -4
- package/src/index.ts +394 -285
- package/src/playbooks.generated.ts +419 -0
- package/src/procedures.ts +52 -862
- package/src/tool-annotations.ts +1 -0
- package/src/tool-marks.ts +14 -14
package/src/index.ts
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
import { readApiKey } from "./credentials.js";
|
|
6
6
|
import { isInteractive, printInteractiveHelp, requestIdNote, startupBanner, trimLargeResponse, USER_AGENT } from "./helpers.js";
|
|
7
7
|
import { beginSession, emitSessionCrash, emitSessionEnd, endSession, recordToolError, recordToolResult } from "./telemetry.js";
|
|
8
|
-
import { registerProcedures } from "./procedures.js";
|
|
8
|
+
import { READ_GUIDE_INSTRUCTION, addGuideTool, callGuideTool, isGuideTool, registerProcedures } from "./procedures.js";
|
|
9
9
|
import { keepReadOnlyTools, readOnlyMode, toolAnnotations } from "./tool-annotations.js";
|
|
10
10
|
import { addShowWorkflow, toolMeta } from "./workflow-canvas.js";
|
|
11
11
|
import { addDocsTools, callDocsTool, isDocsTool } from "./docs-tools.js";
|
|
12
|
+
import { flatInputSchema, nestBodyArgs } from "./flat-args.js";
|
|
12
13
|
import { notifyUpdates } from "./update_notifier.js";
|
|
13
14
|
|
|
14
15
|
|
|
@@ -51,7 +52,7 @@ interface McpToolDefinition {
|
|
|
51
52
|
* Server configuration
|
|
52
53
|
*/
|
|
53
54
|
export const SERVER_NAME = "OmniDimension";
|
|
54
|
-
export const SERVER_VERSION = "0.
|
|
55
|
+
export const SERVER_VERSION = "0.21.0"; // x-release-please-version
|
|
55
56
|
// Base URL for the API. Pinned to production; not env-overridable.
|
|
56
57
|
export const API_BASE_URL = "https://omnidim.io/api/v1";
|
|
57
58
|
|
|
@@ -73,7 +74,9 @@ Conventions:
|
|
|
73
74
|
- For details on one item, call get<Resource>(id) after listing.
|
|
74
75
|
- Dispatching calls: run listPhoneNumbers first. If the account has numbers, pass the chosen one as from_number_id. If it has none, omit from_number_id and the platform's default number is used. Never guess a from_number_id.
|
|
75
76
|
- Configure OMNIDIM_API_KEY in your MCP client config to authenticate.
|
|
76
|
-
- API reference: https://docs.omnidim.io
|
|
77
|
+
- API reference: https://docs.omnidim.io
|
|
78
|
+
|
|
79
|
+
${READ_GUIDE_INSTRUCTION}`;
|
|
77
80
|
|
|
78
81
|
const server = new Server(
|
|
79
82
|
{ name: SERVER_NAME, version: SERVER_VERSION },
|
|
@@ -90,18 +93,15 @@ const toolDefinitionMap: Map<string, McpToolDefinition> = new Map([
|
|
|
90
93
|
|
|
91
94
|
["createSession", {
|
|
92
95
|
name: "createSession",
|
|
93
|
-
description: `Create a voice
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
safe to hand out because it is single-use and expires. For how to
|
|
103
|
-
connect and talk, see "Connect the client and talk" below the
|
|
104
|
-
request details.
|
|
96
|
+
description: `Create a short-lived voice session and get a \`ws_url\` for one conversation.
|
|
97
|
+
|
|
98
|
+
This is step 1 of 2. Creating the session starts no audio. The client then
|
|
99
|
+
connects to \`ws_url\` over WebSocket to talk.
|
|
100
|
+
|
|
101
|
+
Call this endpoint from your server with your API key. Return only \`ws_url\`
|
|
102
|
+
to your client, and never the API key. The \`ws_url\` is single-use and
|
|
103
|
+
expires, so it is safe to hand to your client. For how to connect and talk,
|
|
104
|
+
see "Connect the client and talk" below the request details.
|
|
105
105
|
|
|
106
106
|
(Tags: Sessions)`,
|
|
107
107
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["agent_id","type"],"properties":{"agent_id":{"type":"number","description":"ID of the agent the session talks to."},"type":{"type":"string","default":"voice","enum":["voice"],"description":"The session type. Only `voice` is supported."},"custom_variables":{"type":"object","additionalProperties":true,"description":"Per-session variables that personalize the conversation.\nSet server-side, so visitors cannot tamper with them.\nTwo reserved keys are read as instructions for this session\nand never reach the agent: `__languages` and\n`__post_call_actions`.\n","properties":{"__languages":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"Languages this session runs in, replacing the agent's\nconfigured list. The first entry is the language the\nvisitor is greeted in. Send an array, or a pipe-separated\nstring such as `Hindi|English`.\n"},"__post_call_actions":{"allOf":[{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"}],"description":"Post-call actions for this session only, in the same shape\nas `post_call_actions` on agent create. Email and webhook\nonly. They replace the agent's own post-call actions for\nthis session. Items that cannot be used are skipped and\nlisted in `post_call_actions_ignored`.\n"}}},"metadata":{"type":"object","additionalProperties":true,"description":"Key-value pairs stored on the session for your own\ntracking (e.g. CRM or lead IDs). Not shared with the\nagent; echoed back as `metadata` in the post-call\nwebhook so you can correlate results with your records.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -128,23 +128,19 @@ request details.
|
|
|
128
128
|
}],
|
|
129
129
|
["createAgent", {
|
|
130
130
|
name: "createAgent",
|
|
131
|
-
description: `Create
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
ambient background track, initial ringing
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
> **Voicemail detection is an access-gated feature** that we turn on per
|
|
145
|
-
account. If it isn't enabled for yours yet,
|
|
146
|
-
[request access](https://omnidim.io/contact-us?reason=product&lock=1)
|
|
147
|
-
before configuring the \`voicemail\` object.
|
|
131
|
+
description: `Create an agent from a name and a context. Every other setting is optional.
|
|
132
|
+
|
|
133
|
+
Optional settings: transcriber, model, voice, web search, transfer,
|
|
134
|
+
end-call conditions, post-call actions (email, webhook, Omni CRM, Cloud
|
|
135
|
+
WhatsApp, or a workflow), ambient background track, initial ringing
|
|
136
|
+
sound and multilingual support.
|
|
137
|
+
|
|
138
|
+
Leave out \`model\`, \`transcriber\` and \`voice\` to get your organization's
|
|
139
|
+
defaults, which always work. To pick one, use the LLM, STT or TTS provider
|
|
140
|
+
list: it shows only the models your organization can use. Any other model is
|
|
141
|
+
refused, and the error names the default to use.
|
|
142
|
+
|
|
143
|
+
> **Voicemail detection is access-gated** and turned on per account. If it is off for yours, [request access](https://omnidim.io/contact-us?reason=product&lock=1) before you configure the \`voicemail\` object.
|
|
148
144
|
|
|
149
145
|
(Tags: Agents)`,
|
|
150
146
|
inputSchema: {"type":"object","properties":{"Idempotency-Key":{"type":"string","maxLength":255,"description":"Your own unique key for this agent, for example a fresh UUID.\nSend the same key when you retry. If the first request already\ncreated the agent, you get that agent back instead of a second\none, so a request that timed out is safe to repeat. The same key\nwith a different request body is refused. Keys are kept for 24\nhours.\n"},"requestBody":{"allOf":[{"type":"object","description":"Agent configuration.","properties":{"name":{"type":"string","description":"Name for the agent.","example":"Customer Support Agent"},"welcome_message":{"type":"string","description":"Initial message the agent will say when answering a call.","example":"Hello! How can I help you today?"},"is_welcome_message_dynamic":{"type":"boolean","description":"When true, the welcome message is treated as a directive the agent uses to generate a tailored greeting for each call, rather than being spoken word for word. When false, the welcome message is spoken exactly as written."},"is_welcome_message_interruption":{"type":"boolean","description":"Allow the caller to interrupt the welcome message. When false, the agent finishes speaking the welcome before listening."},"is_interruption_allowed":{"type":"boolean","description":"Global toggle for whether the caller can interrupt the agent mid-sentence at any point in the call."},"dynamic_variables":{"type":"object","description":"Key/value map used to substitute placeholders in the agent's\nprompt and welcome message at call time. Reference a variable\nin your prompt with `{{variable_name}}`. Useful for\npersonalising the same agent across many calls.\n","additionalProperties":{"type":"string"},"example":{"customer_name":"Jane Doe","order_id":"ORD-12345"}},"context_breakdown":{"type":"array","description":"List of context breakdowns, each containing `title`, `body`, and optional `is_enabled`.","items":{"type":"object","required":["title","body"],"properties":{"title":{"type":"string","description":"Title of the breakdown.","example":"Purpose"},"body":{"type":"string","description":"Body of the breakdown, the detailed prompt content.","example":"This agent helps customers with product inquiries and support issues."},"is_enabled":{"type":"boolean","default":true,"description":"Whether this section is included in the prompt."}}}},"call_type":{"type":"string","enum":["Incoming","Outgoing"],"description":"Call type of the assistant."},"timezone":{"type":"string","description":"IANA timezone for this agent, for example `Asia/Kolkata`. Sets the local date and time the agent works with during calls. If not set, the account timezone is used as fallback. Pass an empty string to clear it.","example":"America/New_York"},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","description":"The speech-to-text provider to use: a `name` from the STT providers list, which returns the ones your organization can use. Leave it out to use your organization's default transcriber.","example":"deepgram_stream"},"model":{"type":"string","description":"Transcription model for the selected provider. For\n`deepgram_stream` this is `nova-3` or `nova-2`; other\nproviders take their own model identifiers.\n","example":"nova-3"},"language":{"type":"string","description":"Language code for the transcriber. Format and supported\nvalues depend on the provider (e.g. `en-US` for Deepgram,\n`hi-IN` for Sarvam). Applies regardless of which\n`provider` is selected.\n","example":"en-US"},"silence_timeout_ms":{"type":"integer","description":"Silence timeout in milliseconds.","example":400},"should_apply_noise_reduction":{"type":"boolean","description":"Reduce background noise on the inbound audio stream before transcription."},"interruption_min_words":{"type":"integer","minimum":1,"description":"Minimum number of words the caller must say before their speech is treated as an interruption.","example":2},"max_call_duration_in_sec":{"type":"integer","minimum":1,"description":"Hard upper bound on call length in seconds. The agent will end the call once this is reached.","example":600},"first_ideal_message":{"type":"string","description":"First nudge spoken when the caller goes silent past the\nidle threshold. Set `is_first_ideal_message_dynamic` to\n`true` to have the LLM regenerate this each time.\n"},"is_first_ideal_message_dynamic":{"type":"boolean","description":"When true, `first_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"second_ideal_message":{"type":"string","description":"Second nudge spoken if silence continues after the first."},"is_second_ideal_message_dynamic":{"type":"boolean","description":"When true, `second_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"numerals":{"type":"boolean","description":"Convert numbers from words to digits."},"punctuate":{"type":"boolean","description":"Add punctuation to the transcript."},"smart_format":{"type":"boolean","description":"Apply smart formatting to the transcript."},"diarize":{"type":"boolean","description":"Identify different speakers in the transcript."}}},"model":{"type":"object","description":"Configuration for the language model.","properties":{"model":{"type":"string","description":"The language model to use: a `name` from the LLM providers list, which returns exactly the models your organization can use. Leave it out to use your organization's default model.","example":"gpt-4.1-mini"},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Controls randomness in the model's output (0.0 to 1.0).","example":0.7}}},"voice":{"type":"object","description":"Configuration for the text-to-speech voice. `provider` and `voice_id` identify the voice together, so send both to change it. `provider` on its own is not accepted, and a `voice_id` on its own leaves the voice as it was. The other fields here apply independently. Leave out `provider` and `voice_id` to use your organization's default voice.","dependentRequired":{"provider":["voice_id"]},"properties":{"provider":{"type":"string","description":"The voice provider to use: the `service` of a voice from the voices list, which returns only voices your organization can use. Send `voice_id` alongside it. We recommend OmniDimension voices (list them with `provider=featured`) and Cartesia voices. An agent created without `voice` gets the platform default, a Cartesia voice, which every account can use.","example":"cartesia"},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`). Takes effect when `provider` is sent alongside it.","example":"faf0731e-dfb9-4cfc-8119-259a79b27e12"},"speech_speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"Playback speed multiplier for the agent's voice. 1.0 is normal speed."}}},"web_search":{"type":"object","description":"Configuration for web search capabilities.","properties":{"enabled":{"type":"boolean","description":"Enable or disable web search functionality."},"provider":{"type":"string","enum":["DuckDuckGo","openAI"],"description":"The search provider to use.","example":"DuckDuckGo"}}},"post_call_actions":{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"},"transfer":{"type":"object","description":"Conditional call transfer to a human agent or another number.","properties":{"enabled":{"type":"boolean"},"transfer_options":{"type":"array","description":"Where to transfer the call and under what condition. The first matching condition wins. In an agent update, sending this list replaces all saved options. Omit it to keep them unchanged, or send an empty array to clear them.","items":{"type":"object","required":["number","transfer_condition","transfer_message"],"properties":{"number":{"type":"string","description":"Primary phone number to transfer to. Include country code with leading `+`.","example":"+15551234567"},"type":{"type":"string","enum":["static","dynamic"],"default":"static","description":"`static` transfers to `number`. `dynamic` lets the agent\npick a number at runtime based on the conversation.\n"},"backup_numbers":{"type":"array","description":"Fallback numbers tried if the primary is unreachable.","items":{"type":"string"}},"transfer_condition":{"type":"string","description":"Natural-language condition that triggers this transfer option.","example":"Transfer if the customer asks to speak with a human."},"transfer_message":{"type":"string","description":"Message the agent says to the caller before executing the transfer.","example":"Please hold while I connect you to one of our agents."}}}}}},"end_call":{"type":"object","description":"Hang up automatically when a condition is met.","properties":{"enabled":{"type":"boolean"},"condition":{"type":"string","description":"Natural-language condition that triggers ending the call. Only evaluated when `enabled` is true.","example":"End the call once the customer's issue is resolved."},"message":{"type":"string","description":"What the agent says before hanging up.","example":"Thank you for contacting us. Have a great day!"},"message_type":{"type":"string","enum":["static","prompt"],"description":"`static` speaks `message` verbatim. `prompt` treats\n`message_prompt` as an LLM instruction and generates a\nfresh closing line each call (useful for matching the\ncaller's language and tone).\n"},"message_prompt":{"type":"string","description":"LLM prompt used to generate the closing line when `message_type` is `prompt`.","example":"End the call politely in the same language the user is speaking."}}},"background_track":{"type":"object","description":"Ambient background noise that plays under the agent's voice.","properties":{"enabled":{"type":"boolean","description":"Whether to mix the ambient track under the agent's audio."},"name":{"type":"string","enum":["call_center","filler","office","office_1","restaurant"],"description":"Ambient track to mix under the agent."},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.2,"description":"Volume level on a 0–1 scale. Default 0.2."},"tts_volume_reduction":{"type":"number","minimum":0,"maximum":1,"description":"Amount to drop the agent's TTS volume while the ambient track plays, on a 0–1 scale. Helps the voice cut through without raising the overall mix."}}},"initial_ringing_sound_enabled":{"type":"boolean","description":"Plays a ringing tone after the call is picked up, until the agent starts speaking."},"voicemail":{"type":"object","description":"Voicemail / answering-machine handling for outbound calls. Set this with the nested object shown here; the agent object returns these values as the flat fields `voicemail_enabled` and `voicemail_message`. Voicemail detection is an access-gated feature. If it isn't enabled for your account, [request access](https://omnidim.io/contact-us?reason=product&lock=1).","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and leave your message instead of speaking to a machine."},"message":{"type":"string","description":"Message to leave when voicemail is detected."}}},"languages":{"type":"array","description":"Languages the agent should support. Pass each language as a display-name string exactly as it appears in the dashboard's language picker. Unrecognized names are skipped.","items":{"type":"string"},"example":["English (India)","Hindi"]}}},{"type":"object","required":["name","context_breakdown"]}],"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -158,7 +154,12 @@ before configuring the \`voicemail\` object.
|
|
|
158
154
|
}],
|
|
159
155
|
["getAgent", {
|
|
160
156
|
name: "getAgent",
|
|
161
|
-
description: `Get
|
|
157
|
+
description: `Get one agent by ID.
|
|
158
|
+
|
|
159
|
+
The response includes \`can_publish\`: whether [version
|
|
160
|
+
history](/docs/api-reference/agents/listAgentVersions) is on for the agent's
|
|
161
|
+
organization.
|
|
162
|
+
|
|
162
163
|
(Tags: Agents)`,
|
|
163
164
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."}},"required":["agent_id"]},
|
|
164
165
|
method: "get",
|
|
@@ -171,11 +172,12 @@ before configuring the \`voicemail\` object.
|
|
|
171
172
|
}],
|
|
172
173
|
["updateAgent", {
|
|
173
174
|
name: "updateAgent",
|
|
174
|
-
description: `Update an
|
|
175
|
+
description: `Update an agent. Send only the fields you want to change.
|
|
175
176
|
|
|
176
|
-
\`post_call_actions\` replaces the agent's email, webhook, Omni CRM, Cloud WhatsApp and workflow actions as one set, but only
|
|
177
|
+
\`post_call_actions\` replaces the agent's email, webhook, Omni CRM, Cloud WhatsApp and workflow actions as one set, but only if you send at least one of those types. Google Sheets, Slack, Salesforce, HubSpot and Zoho Bigin actions are replaced only when you send their key. Other actions are kept. If a sent action gives a variable key a new prompt, kept actions with the same key take that prompt too. To change one action alone, use \`/agents/{agent_id}/post-call-actions\`.
|
|
178
|
+
|
|
179
|
+
> **Voicemail detection is access-gated** and turned on per account. If it is off for yours, [request access](https://omnidim.io/contact-us?reason=product&lock=1) before you configure the \`voicemail\` object.
|
|
177
180
|
|
|
178
|
-
> **Voicemail detection is an access-gated feature** that we turn on per account. If it isn't enabled for yours yet, [request access](https://omnidim.io/contact-us?reason=product&lock=1) before configuring the \`voicemail\` object below.
|
|
179
181
|
(Tags: Agents)`,
|
|
180
182
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"requestBody":{"type":"object","description":"Agent configuration.","properties":{"name":{"type":"string","description":"Name for the agent."},"welcome_message":{"type":"string","description":"Initial message the agent will say when answering a call."},"is_welcome_message_dynamic":{"type":"boolean","description":"When true, the welcome message is treated as a directive the agent uses to generate a tailored greeting for each call, rather than being spoken word for word. When false, the welcome message is spoken exactly as written."},"is_welcome_message_interruption":{"type":"boolean","description":"Allow the caller to interrupt the welcome message. When false, the agent finishes speaking the welcome before listening."},"is_interruption_allowed":{"type":"boolean","description":"Global toggle for whether the caller can interrupt the agent mid-sentence at any point in the call."},"dynamic_variables":{"type":"object","description":"Key/value map used to substitute placeholders in the agent's\nprompt and welcome message at call time. Reference a variable\nin your prompt with `{{variable_name}}`. Useful for\npersonalising the same agent across many calls.\n","additionalProperties":{"type":"string"}},"context_breakdown":{"type":"array","description":"List of context breakdowns, each containing `title`, `body`, and optional `is_enabled`.","items":{"type":"object","required":["title","body"],"properties":{"title":{"type":"string","description":"Title of the breakdown."},"body":{"type":"string","description":"Body of the breakdown, the detailed prompt content."},"is_enabled":{"type":"boolean","default":true,"description":"Whether this section is included in the prompt."}}}},"call_type":{"type":"string","enum":["Incoming","Outgoing"],"description":"Call type of the assistant."},"timezone":{"type":"string","description":"IANA timezone for this agent, for example `Asia/Kolkata`. Sets the local date and time the agent works with during calls. If not set, the account timezone is used as fallback. Pass an empty string to clear it."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","description":"The speech-to-text provider to use: a `name` from the STT providers list, which returns the ones your organization can use. Leave it out to use your organization's default transcriber."},"model":{"type":"string","description":"Transcription model for the selected provider. For\n`deepgram_stream` this is `nova-3` or `nova-2`; other\nproviders take their own model identifiers.\n"},"language":{"type":"string","description":"Language code for the transcriber. Format and supported\nvalues depend on the provider (e.g. `en-US` for Deepgram,\n`hi-IN` for Sarvam). Applies regardless of which\n`provider` is selected.\n"},"silence_timeout_ms":{"type":"number","description":"Silence timeout in milliseconds."},"should_apply_noise_reduction":{"type":"boolean","description":"Reduce background noise on the inbound audio stream before transcription."},"interruption_min_words":{"type":"number","minimum":1,"description":"Minimum number of words the caller must say before their speech is treated as an interruption."},"max_call_duration_in_sec":{"type":"number","minimum":1,"description":"Hard upper bound on call length in seconds. The agent will end the call once this is reached."},"first_ideal_message":{"type":"string","description":"First nudge spoken when the caller goes silent past the\nidle threshold. Set `is_first_ideal_message_dynamic` to\n`true` to have the LLM regenerate this each time.\n"},"is_first_ideal_message_dynamic":{"type":"boolean","description":"When true, `first_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"second_ideal_message":{"type":"string","description":"Second nudge spoken if silence continues after the first."},"is_second_ideal_message_dynamic":{"type":"boolean","description":"When true, `second_ideal_message` is treated as a prompt and the LLM generates a fresh nudge each call."},"numerals":{"type":"boolean","description":"Convert numbers from words to digits."},"punctuate":{"type":"boolean","description":"Add punctuation to the transcript."},"smart_format":{"type":"boolean","description":"Apply smart formatting to the transcript."},"diarize":{"type":"boolean","description":"Identify different speakers in the transcript."}}},"model":{"type":"object","description":"Configuration for the language model.","properties":{"model":{"type":"string","description":"The language model to use: a `name` from the LLM providers list, which returns exactly the models your organization can use. Leave it out to use your organization's default model."},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Controls randomness in the model's output (0.0 to 1.0)."}}},"voice":{"type":"object","description":"Configuration for the text-to-speech voice. `provider` and `voice_id` identify the voice together, so send both to change it. `provider` on its own is not accepted, and a `voice_id` on its own leaves the voice as it was. The other fields here apply independently. Leave out `provider` and `voice_id` to use your organization's default voice.","dependentRequired":{"provider":["voice_id"]},"properties":{"provider":{"type":"string","description":"The voice provider to use: the `service` of a voice from the voices list, which returns only voices your organization can use. Send `voice_id` alongside it. We recommend OmniDimension voices (list them with `provider=featured`) and Cartesia voices. An agent created without `voice` gets the platform default, a Cartesia voice, which every account can use."},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`). Takes effect when `provider` is sent alongside it."},"speech_speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"Playback speed multiplier for the agent's voice. 1.0 is normal speed."}}},"web_search":{"type":"object","description":"Configuration for web search capabilities.","properties":{"enabled":{"type":"boolean","description":"Enable or disable web search functionality."},"provider":{"type":"string","enum":["DuckDuckGo","openAI"],"description":"The search provider to use."}}},"post_call_actions":{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"},"transfer":{"type":"object","description":"Conditional call transfer to a human agent or another number.","properties":{"enabled":{"type":"boolean"},"transfer_options":{"type":"array","description":"Where to transfer the call and under what condition. The first matching condition wins. In an agent update, sending this list replaces all saved options. Omit it to keep them unchanged, or send an empty array to clear them.","items":{"type":"object","required":["number","transfer_condition","transfer_message"],"properties":{"number":{"type":"string","description":"Primary phone number to transfer to. Include country code with leading `+`."},"type":{"type":"string","enum":["static","dynamic"],"default":"static","description":"`static` transfers to `number`. `dynamic` lets the agent\npick a number at runtime based on the conversation.\n"},"backup_numbers":{"type":"array","description":"Fallback numbers tried if the primary is unreachable.","items":{"type":"string"}},"transfer_condition":{"type":"string","description":"Natural-language condition that triggers this transfer option."},"transfer_message":{"type":"string","description":"Message the agent says to the caller before executing the transfer."}}}}}},"end_call":{"type":"object","description":"Hang up automatically when a condition is met.","properties":{"enabled":{"type":"boolean"},"condition":{"type":"string","description":"Natural-language condition that triggers ending the call. Only evaluated when `enabled` is true."},"message":{"type":"string","description":"What the agent says before hanging up."},"message_type":{"type":"string","enum":["static","prompt"],"description":"`static` speaks `message` verbatim. `prompt` treats\n`message_prompt` as an LLM instruction and generates a\nfresh closing line each call (useful for matching the\ncaller's language and tone).\n"},"message_prompt":{"type":"string","description":"LLM prompt used to generate the closing line when `message_type` is `prompt`."}}},"background_track":{"type":"object","description":"Ambient background noise that plays under the agent's voice.","properties":{"enabled":{"type":"boolean","description":"Whether to mix the ambient track under the agent's audio."},"name":{"type":"string","enum":["call_center","filler","office","office_1","restaurant"],"description":"Ambient track to mix under the agent."},"volume":{"type":"number","minimum":0,"maximum":1,"default":0.2,"description":"Volume level on a 0–1 scale. Default 0.2."},"tts_volume_reduction":{"type":"number","minimum":0,"maximum":1,"description":"Amount to drop the agent's TTS volume while the ambient track plays, on a 0–1 scale. Helps the voice cut through without raising the overall mix."}}},"initial_ringing_sound_enabled":{"type":"boolean","description":"Plays a ringing tone after the call is picked up, until the agent starts speaking."},"voicemail":{"type":"object","description":"Voicemail / answering-machine handling for outbound calls. Set this with the nested object shown here; the agent object returns these values as the flat fields `voicemail_enabled` and `voicemail_message`. Voicemail detection is an access-gated feature. If it isn't enabled for your account, [request access](https://omnidim.io/contact-us?reason=product&lock=1).","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and leave your message instead of speaking to a machine."},"message":{"type":"string","description":"Message to leave when voicemail is detected."}}},"languages":{"type":"array","description":"Languages the agent should support. Pass each language as a display-name string exactly as it appears in the dashboard's language picker. Unrecognized names are skipped.","items":{"type":"string"}}}}},"required":["agent_id","requestBody"]},
|
|
181
183
|
method: "put",
|
|
@@ -214,7 +216,12 @@ before configuring the \`voicemail\` object.
|
|
|
214
216
|
}],
|
|
215
217
|
["addPostCallAction", {
|
|
216
218
|
name: "addPostCallAction",
|
|
217
|
-
description: `Add one post-call action to
|
|
219
|
+
description: `Add one post-call action to an agent.
|
|
220
|
+
|
|
221
|
+
The agent's other actions stay as they are. Send an \`Idempotency-Key\` header
|
|
222
|
+
to retry safely: the same key and body return the action the first request
|
|
223
|
+
added.
|
|
224
|
+
|
|
218
225
|
(Tags: Agents)`,
|
|
219
226
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"Idempotency-Key":{"type":"string","description":"Any unique string. A retry with the same key and body adds nothing new."},"requestBody":{"allOf":[{"type":"object","description":"One post-call action. `type` picks the channel; send the fields of\nthat channel plus any of the shared ones. `type` is required when\nadding an action; an update sends only the fields it changes.\n","properties":{"type":{"type":"string","enum":["email","webhook","omni_crm","cloud_whatsapp","workflow","google_sheets","slack","salesforce","hubspot","zoho_bigin"],"description":"The channel. It cannot change after the action is created:\ndelete it and add a new one. `google_sheets`, `slack`,\n`salesforce`, `hubspot` and `zoho_bigin` deliver through an\naccount connected in the dashboard: pass its id as\n`integration_id` (see List integrations).\n"},"integration_id":{"type":"integer","description":"`google_sheets`, `slack`, `salesforce`, `hubspot`, `zoho_bigin`\nonly, required: the id of your integration of that type.\n"},"spreadsheet_id":{"type":"string","description":"`google_sheets` only, required: the id in the sheet's URL, the\npart after `/d/`.\n","example":"1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"},"spreadsheet_name":{"type":"string","description":"`google_sheets` only: the sheet's name, for display."},"worksheet_name":{"type":"string","description":"`google_sheets` only: the tab to append to. Defaults to `Sheet1`.","example":"Calls"},"channel_id":{"type":"string","description":"`slack` only: the channel id. Send this or `channel_name`.","example":"C08RTQ1NY81"},"channel_name":{"type":"string","description":"`slack` only: the channel name. Send this or `channel_id`.","example":"sales"},"object_name":{"type":"string","description":"`salesforce`: `Lead` (default), `Contact`, `Account`,\n`Opportunity`, `Case`, `Task` or `Product`. `hubspot`, required:\n`contact`, `company`, `deal` or `ticket`. Both send a fixed set of\nfields for the chosen object, so they take no `extracted_variables`.\n"},"create_call_log":{"type":"boolean","description":"`zoho_bigin` only: log the call in Zoho Bigin. Defaults to true."},"update_contact":{"type":"boolean","description":"`zoho_bigin` only: update a matching contact with what the call captured. Defaults to true."},"create_contact":{"type":"boolean","description":"`zoho_bigin` only: create a contact when no contact matches. Defaults to true."},"action":{"type":"string","enum":["create","upsert"],"description":"`salesforce` only: `upsert` finds the record by the caller's number\nand updates it or creates it. `create` creates a new record every\ncall. Defaults to `create`.\n"},"match_field":{"type":"string","description":"`salesforce` only, with `upsert`: the phone field the caller's number is looked up in. Defaults to `Phone`.","example":"Phone"},"log_call":{"type":"boolean","description":"`salesforce` only: log the call on the record, with the summary and recording link. Defaults to false."},"add_note":{"type":"boolean","description":"`salesforce` only: add the call summary as a note on the record. Defaults to false."},"recipients":{"type":"array","description":"`email` only, required: the addresses to notify.","items":{"type":"string","format":"email"},"example":["support@acme-corp.io"]},"url":{"type":"string","format":"uri","description":"`webhook` only, required: the endpoint that receives a POST with the call payload.","example":"https://crm.acme-corp.io/omnidim-callback"},"phone_number_id":{"type":"integer","description":"`cloud_whatsapp` only, required: your Cloud WhatsApp number the message is sent from. Also send `template_id` or `templates`, or nothing is sent."},"template_id":{"type":"integer","description":"`cloud_whatsapp` only: an approved template on that number."},"template_variables":{"type":"array","description":"`cloud_whatsapp` only: which extracted variable fills each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The key of the extracted variable whose value fills this placeholder.","example":"customer_name"}}}},"templates":{"type":"array","description":"`cloud_whatsapp` only: one or more templates to send.","items":{"type":"object","description":"One Cloud WhatsApp template to send after the call.","properties":{"template_id":{"type":"integer","description":"An approved template on the chosen number."},"usage_description":{"type":"string","description":"When this template should be sent. After the call, the model reads\nthese descriptions to choose which templates fit the conversation.\n","example":"Send when the caller books an appointment."},"always_send":{"type":"boolean","description":"Send this template after every call, whichever templates the model chooses."},"variable_mappings":{"type":"array","description":"How to fill each template placeholder.","items":{"type":"object","properties":{"index":{"type":"string","description":"The placeholder number, as a string.","example":"1"},"extracted_var":{"type":"string","description":"The extracted variable whose value fills this placeholder."},"static_value":{"type":"string","description":"A fixed value for this placeholder. When set, it is used\ninstead of the extracted variable.\n"},"mode":{"type":"string","enum":["variable","static"],"description":"Which input the dashboard shows for this placeholder. It\ndoes not change the value sent: a `static_value` is used\nfirst, then the extracted variable, then `fallback_value`.\n"},"fallback_value":{"type":"string","description":"The value to use when the variable is not extracted."}}}}}}},"workflow_id":{"type":"integer","description":"`workflow` only, required: the workflow to run. It must have a published version, or the action is skipped."},"include":{"type":"array","description":"Which sections to include.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation. A key\nalready used by another action on this agent must have the same\nprompt, or the request is refused with `400`. Other actions are\nnever changed to match.\n","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload.","example":"customer_issue"},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation.","example":"Identify the main issue the customer is experiencing."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that fire this action. Omit to use the default\n(`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no-answer","busy","canceled"]}}}},{"required":["type"]}],"description":"The JSON request body."}},"required":["agent_id","requestBody"]},
|
|
220
227
|
method: "post",
|
|
@@ -253,7 +260,15 @@ before configuring the \`voicemail\` object.
|
|
|
253
260
|
}],
|
|
254
261
|
["listIntegrations", {
|
|
255
262
|
name: "listIntegrations",
|
|
256
|
-
description: `List
|
|
263
|
+
description: `List your workspace integrations, with each one's \`id\` and
|
|
264
|
+
\`integration_type\`.
|
|
265
|
+
|
|
266
|
+
Stored credentials (tokens, secrets, passwords, API keys, and the values of
|
|
267
|
+
a custom API's headers and parameters) are never returned. They read
|
|
268
|
+
\`********\`. When you create an integration, send the real values: \`********\`
|
|
269
|
+
is refused. Accounts that sign in with OAuth (Google Sheets, Slack, HubSpot,
|
|
270
|
+
Salesforce, Zoho Bigin) are connected in the dashboard.
|
|
271
|
+
|
|
257
272
|
(Tags: Integrations)`,
|
|
258
273
|
inputSchema: {"type":"object","properties":{}},
|
|
259
274
|
method: "get",
|
|
@@ -266,7 +281,13 @@ before configuring the \`voicemail\` object.
|
|
|
266
281
|
}],
|
|
267
282
|
["createCustomApiIntegration", {
|
|
268
283
|
name: "createCustomApiIntegration",
|
|
269
|
-
description: `Save a call to your own HTTP endpoint as an integration.
|
|
284
|
+
description: `Save a call to your own HTTP endpoint as an integration.
|
|
285
|
+
|
|
286
|
+
Attach it to an agent with \`attachAgentIntegration\`. The agent calls the
|
|
287
|
+
endpoint during a call when the conversation needs it, then uses the
|
|
288
|
+
response in its reply. The agent fills parameters marked \`isLLMGenerated\`
|
|
289
|
+
from the conversation.
|
|
290
|
+
|
|
270
291
|
(Tags: Integrations)`,
|
|
271
292
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["name","url","method"],"properties":{"name":{"type":"string","description":"A name for the integration."},"description":{"type":"string","description":"What the endpoint does. The agent reads this to decide\nwhen to call it, so say what it returns and when it is useful.\n"},"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"headers":{"type":"array","description":"Fixed headers sent on every request.","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"query_params":{"type":"array","description":"Query string parameters.","items":{"type":"object","description":"One query or body parameter of a custom API. With `isLLMGenerated`\ntrue the agent fills the value from the conversation, guided by\n`description`. With it false, the text in `description` is sent as a\nfixed value.\n","required":["key"],"properties":{"key":{"type":"string","description":"The parameter name your endpoint expects."},"description":{"type":"string","description":"What the agent should put here, or the fixed value when `isLLMGenerated` is false."},"type":{"type":"string","enum":["string","number","boolean","object","array"],"default":"string"},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"isLLMGenerated":{"type":"boolean","default":true,"description":"Let the agent fill this value from the conversation."},"children":{"type":"array","description":"Nested fields of an `object` or `array` body parameter. Query parameters have no children.","items":{"type":"object"}}}}},"body_params":{"type":"array","description":"Request body fields, sent as JSON. A GET request sends no\nbody. Every request with a body also carries the call's\n`from_number`, `to_number` and `call_sid`.\n","items":{"type":"object","description":"One query or body parameter of a custom API. With `isLLMGenerated`\ntrue the agent fills the value from the conversation, guided by\n`description`. With it false, the text in `description` is sent as a\nfixed value.\n","required":["key"],"properties":{"key":{"type":"string","description":"The parameter name your endpoint expects."},"description":{"type":"string","description":"What the agent should put here, or the fixed value when `isLLMGenerated` is false."},"type":{"type":"string","enum":["string","number","boolean","object","array"],"default":"string"},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"isLLMGenerated":{"type":"boolean","default":true,"description":"Let the agent fill this value from the conversation."},"children":{"type":"array","description":"Nested fields of an `object` or `array` body parameter. Query parameters have no children.","items":{"type":"object"}}}}},"request_timeout":{"type":"number","default":10,"description":"Seconds to wait for your endpoint before the agent moves on."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
272
293
|
method: "post",
|
|
@@ -292,7 +313,11 @@ before configuring the \`voicemail\` object.
|
|
|
292
313
|
}],
|
|
293
314
|
["attachAgentIntegration", {
|
|
294
315
|
name: "attachAgentIntegration",
|
|
295
|
-
description: `Attach
|
|
316
|
+
description: `Attach an integration to an agent.
|
|
317
|
+
|
|
318
|
+
The agent can use it on its next call. Integrations already attached stay as
|
|
319
|
+
they are.
|
|
320
|
+
|
|
296
321
|
(Tags: Integrations)`,
|
|
297
322
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"requestBody":{"type":"object","required":["integration_id"],"properties":{"integration_id":{"type":"number","description":"The integration's id, from `listIntegrations` or a create response."}},"description":"The JSON request body."}},"required":["agent_id","requestBody"]},
|
|
298
323
|
method: "post",
|
|
@@ -370,7 +395,13 @@ before configuring the \`voicemail\` object.
|
|
|
370
395
|
}],
|
|
371
396
|
["diffAgentVersion", {
|
|
372
397
|
name: "diffAgentVersion",
|
|
373
|
-
description: `Get a record-level diff for
|
|
398
|
+
description: `Get a record-level diff for one agent version.
|
|
399
|
+
|
|
400
|
+
By default it compares this version with the one before it. Use
|
|
401
|
+
\`against=current\` to compare with the live config, which shows what
|
|
402
|
+
restoring this version would change. Use \`against=<number>\` to compare with
|
|
403
|
+
another version.
|
|
404
|
+
|
|
374
405
|
(Tags: Agents)`,
|
|
375
406
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"version_number":{"type":"number","description":"The version number, as returned in `version_number` from the list or save endpoints."},"against":{"type":"string","description":"What to compare against. Omit or `previous` for the version before this one (the default). `current` for the agent's live config. A version number to compare with that version."}},"required":["agent_id","version_number"]},
|
|
376
407
|
method: "get",
|
|
@@ -383,7 +414,13 @@ before configuring the \`voicemail\` object.
|
|
|
383
414
|
}],
|
|
384
415
|
["restoreAgentVersion", {
|
|
385
416
|
name: "restoreAgentVersion",
|
|
386
|
-
description: `Restore a version onto the live agent.
|
|
417
|
+
description: `Restore a version onto the live agent.
|
|
418
|
+
|
|
419
|
+
Your current setup is saved first as a backup version, so restoring is
|
|
420
|
+
undoable. Configuration comes back. Knowledge files or integrations deleted
|
|
421
|
+
since this version was saved can't be re-linked. They are reported in
|
|
422
|
+
\`skipped\`.
|
|
423
|
+
|
|
387
424
|
(Tags: Agents)`,
|
|
388
425
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"version_number":{"type":"number","description":"The version number, as returned in `version_number` from the list or save endpoints."},"requestBody":{"type":"object","properties":{},"description":"The JSON request body."}},"required":["agent_id","version_number"]},
|
|
389
426
|
method: "post",
|
|
@@ -396,8 +433,9 @@ before configuring the \`voicemail\` object.
|
|
|
396
433
|
}],
|
|
397
434
|
["dispatchCall", {
|
|
398
435
|
name: "dispatchCall",
|
|
399
|
-
description: `
|
|
400
|
-
|
|
436
|
+
description: `Start a call to a phone number with an agent.
|
|
437
|
+
|
|
438
|
+
The phone number must include a country code with a leading plus.
|
|
401
439
|
|
|
402
440
|
(Tags: Calls)`,
|
|
403
441
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["agent_id","to_number"],"properties":{"agent_id":{"type":"number","description":"The ID of the agent that will handle the call."},"to_number":{"type":"string","description":"The phone number to call. Must include country code (e.g., +15551234567)."},"from_number_id":{"type":"number","description":"Id of a phone number on your account to place the call from (see the phone number list endpoint). Omit to use the platform's default number."},"call_context":{"type":"object","description":"Optional context information as key-value pairs to be passed to the agent during the call. Can contain any custom fields relevant to your use case.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"Key-value pairs stored on the call for your own tracking\n(e.g. CRM or lead IDs). Not shared with the agent; echoed\nback as `metadata` in the post-call webhook so you can\ncorrelate results with your records.\n"},"__languages":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"Languages this call runs in, replacing the agent's configured\nlist for this call only. The first entry is the language the\ncall opens in. Send an array, or a pipe-separated string such\nas `Hindi|English`. Names the platform does not recognize are\nskipped and listed in `languages_ignored`.\n"},"__post_call_actions":{"allOf":[{"type":"object","additionalProperties":true,"description":"Post-call actions: email, webhook, Omni CRM, WhatsApp, workflow, Google Sheets, Slack, Salesforce, HubSpot or Zoho Bigin. On an agent, add them one at a time with addPostCallAction instead. Full shape: https://docs.omnidim.io/docs/per-call-post-call-actions"}],"description":"Post-call actions for this call only, in the same shape as\n`post_call_actions` on agent create. Email and webhook only.\nThey replace the agent's own post-call actions for this call;\nthe agent is not changed. Items that cannot be used are\nskipped and listed in `post_call_actions_ignored`, and the\ncall still goes out. Can also be sent inside `call_context`.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -450,15 +488,15 @@ phone number must include a country code with a leading plus.
|
|
|
450
488
|
}],
|
|
451
489
|
["createBulkCall", {
|
|
452
490
|
name: "createBulkCall",
|
|
453
|
-
description: `Create a
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
491
|
+
description: `Create a bulk-call campaign.
|
|
492
|
+
|
|
493
|
+
Only \`name\`, \`phone_number_id\` and a \`contact_list\` are needed to dial a
|
|
494
|
+
list now. Every other field adds one behavior: drafts, rotation, filtering,
|
|
495
|
+
scheduling, retries or dynamic feeding.
|
|
457
496
|
|
|
458
|
-
The guide below the field reference
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
operate a campaign once it runs.
|
|
497
|
+
The guide below the field reference shows each behavior with a working
|
|
498
|
+
request, every refusal message with its fix, and the endpoints that operate
|
|
499
|
+
a running campaign.
|
|
462
500
|
|
|
463
501
|
(Tags: Bulk calls)`,
|
|
464
502
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["name","phone_number_id"],"properties":{"name":{"type":"string","description":"Name of the bulk call campaign."},"phone_number_id":{"type":"string","description":"The number this campaign calls from. With a `rotation`, the\nrotation numbers dial instead and this one is the standby.\n"},"bot_id":{"type":"number","description":"Agent to run the campaign. Defaults to the agent attached\nto `phone_number_id`; required when the number has none.\n"},"save_as_draft":{"type":"boolean","default":false,"description":"Store the campaign without dialing; start it later with the\nstart endpoint. See Drafts in the guide below.\n"},"call_conditions":{"type":"array","description":"Dial only the contacts that match every condition; the rest\nare kept as `Skipped`. See Filtering in the guide below.\n","items":{"type":"object","required":["column","operator","value"],"properties":{"column":{"type":"string","description":"Key on the contact row to test."},"operator":{"type":"string","default":"equals","enum":["equals","not_equals","contains","greater_than","less_than"],"description":"`contains` is case-insensitive. `greater_than` and\n`less_than` compare numerically, and a row whose value\nis not a number fails the condition rather than\nerroring.\n"},"value":{"type":"string"}}}},"rotation":{"type":"object","description":"Rotate the campaign across several of your numbers, so no\nsingle number burns out. See Rotation in the guide below.\n","required":["numbers"],"properties":{"numbers":{"type":"array","minItems":1,"description":"The numbers to rotate across; each must be yours and\nlisted once.\n","items":{"type":"object","required":["phone_number_id"],"properties":{"phone_number_id":{"type":"number","description":"One of your numbers, from List phone numbers."},"sequence":{"type":"number","default":10,"description":"Rotation order. Lowest dials first."}}}},"strategy":{"type":"string","default":"fixed_count","enum":["fixed_count","cpr_threshold","both","none"],"description":"When to move to the next number: every\n`calls_per_number` calls, on low health score, both, or\nnever.\n"},"calls_per_number":{"type":"number","default":50,"description":"Calls before moving on. Used by `fixed_count` and `both`."},"health_threshold":{"type":"number","default":30,"description":"Health score below which a number is rotated away from.\nUsed by `cpr_threshold` and `both`.\n"},"fallback":{"type":"string","default":"pause","enum":["pause","continue_best"],"description":"When every number is unhealthy: `pause` the campaign,\nor `continue_best` with the healthiest one.\n"},"call_back_from_different_number":{"type":"boolean","default":false,"description":"When on, a repeat call to the same person goes out from\na different number than the one that called them last.\nNeeds two or more numbers in the pool.\n"}}},"skip_known_invalid_numbers":{"type":"boolean","default":false,"description":"When on, a contact is not dialed if the carrier said its\nnumber does not exist, in any campaign of your organization\nin the last 14 days. That contact shows as a failed call\nwith the reason `Invalid number` and is never retried.\n"},"is_dynamic":{"type":"boolean","default":false,"description":"A dynamic campaign stays alive accepting contacts via the\nadd-contact webhooks, and `contact_list` becomes optional.\n"},"contact_list":{"type":"array","description":"Who to call. Each row needs `phone_number`; any other key\nreaches the agent as context for that one call.\n","items":{"type":"object","required":["phone_number"],"properties":{"phone_number":{"type":"string","description":"Phone number in international format (e.g., +15551234567)."}},"additionalProperties":true}},"is_scheduled":{"type":"boolean","default":false,"description":"Whether the campaign should be scheduled for future execution."},"scheduled_datetime":{"type":"string","description":"Scheduled execution time in format `YYYY-MM-DD HH:MM:SS` (required if `is_scheduled` is true)."},"timezone":{"type":"string","default":"UTC","description":"Timezone for scheduled execution."},"concurrent_call_limit":{"type":"number","default":1,"minimum":1,"description":"Maximum number of concurrent calls allowed."},"enabled_reschedule_call":{"type":"boolean","default":false,"description":"Enable automatic call rescheduling. When enabled the system can reschedule unreachable calls."},"retry_config":{"type":"object","description":"Auto-retry configuration object containing retry settings.","properties":{"auto_retry":{"type":"boolean","default":false},"auto_retry_schedule":{"type":"string","enum":["immediately","next_day","scheduled_time"],"description":"When to retry failed calls."},"retry_schedule_days":{"type":"number","default":0,"minimum":0,"description":"Days to wait before a scheduled retry."},"retry_schedule_hours":{"type":"number","default":0,"minimum":0,"description":"Hours to wait before a scheduled retry."},"retry_limit":{"type":"number","default":1,"minimum":1,"maximum":10,"description":"Retry attempts, 1 to 10. To disable retries omit it and\nleave `auto_retry` false; never send `0`. Ignored when\n`retry_steps` is set.\n"},"retry_steps":{"type":"array","minItems":1,"maxItems":10,"description":"A different delay for each retry, in order: retry 1\nwaits for the first step, retry 2 for the second, and\nso on. When set, it replaces `auto_retry_schedule`,\n`retry_schedule_days`, `retry_schedule_hours` and\n`retry_limit`: a contact gets one retry per step. Each\ndelay is at most 30 days. A retry that falls outside\nthe campaign's daily calling hours waits until they\nopen again.\n\nA `days` step can also name a time of day with `at`:\n`{\"delay\": 1, \"unit\": \"days\", \"at\": \"10:00\"}` is 10:00\nthe next day, and `{\"delay\": 0, \"unit\": \"days\", \"at\":\n\"16:00\"}` the same day at 16:00. The date and time are\nread in the calling window's timezone,\n`daily_stop_timezone`; a campaign without a window\n(`enable_daily_hard_stop` off) uses its `timezone`.\nEach retry counts from the try before it; a time that\nhas already passed moves to the next day.\n","items":{"type":"object","required":["delay","unit"],"properties":{"delay":{"type":"number","minimum":0,"description":"How long to wait, in `unit`. `0` retries right away."},"unit":{"type":"string","enum":["minutes","hours","days"]},"at":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"Time of day, `HH:MM` (24-hour) in\n`daily_stop_timezone`, or in `timezone` when\n`enable_daily_hard_stop` is off. Only on a\n`days` step; `delay: 0` means the same day.\n"}}}},"retry_unanswered":{"type":"string","enum":["off","no_reply","no_reply_or_short","model"],"default":"off","description":"Also retry calls that connected but got no conversation.\n`no_reply`: the contact never spoke. `no_reply_or_short`:\nthe contact never spoke, or the call lasted at most\n`retry_unanswered_max_seconds`. `model`: the contact\nnever spoke, or post-call analysis read the transcript\nand found no real conversation. Retries follow the same\nschedule or steps as failed calls.\n"},"retry_unanswered_max_seconds":{"type":"number","default":10,"minimum":1,"maximum":120,"description":"Under `no_reply_or_short`, a call this long or shorter\n(in seconds) counts as unanswered.\n"}}}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -472,13 +510,12 @@ operate a campaign once it runs.
|
|
|
472
510
|
}],
|
|
473
511
|
["addBulkCallContact", {
|
|
474
512
|
name: "addBulkCallContact",
|
|
475
|
-
description: `Push
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
operating hours.
|
|
513
|
+
description: `Push one contact into a dynamic bulk-call campaign.
|
|
514
|
+
|
|
515
|
+
Dynamic campaigns are created from the dashboard (Bulk Call > Create New
|
|
516
|
+
Campaign > Dynamic Campaign) and wait for contacts. Use this webhook to feed
|
|
517
|
+
them from a CRM, form or automation platform. The contact is queued at once.
|
|
518
|
+
The campaign calls it as soon as it is within operating hours.
|
|
482
519
|
|
|
483
520
|
(Tags: Bulk calls)`,
|
|
484
521
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"ID of the dynamic campaign to add the contact to."},"requestBody":{"type":"object","required":["to_number"],"properties":{"to_number":{"type":"string","description":"Contact phone number in international format (e.g., +15551234567)."},"custom_variables":{"type":"object","description":"Key-value pairs passed to the agent as context for this\ncall, so the agent can reference them during the\nconversation (e.g. the contact's name or reason for the\ncall). Match these keys to the variables used in your\nagent's welcome message or prompt.\n","additionalProperties":true},"metadata":{"type":"object","description":"Key-value pairs stored on the contact for your own\ntracking (e.g. CRM or lead IDs). Not shared with the\nagent.\n","additionalProperties":true},"previous_from_number":{"type":"string","description":"The number that called this person last. With\n`call_back_from_different_number` on, the call goes out\nfrom another number in the pool.\n"}},"description":"The JSON request body."}},"required":["campaign_id","requestBody"]},
|
|
@@ -531,13 +568,17 @@ operating hours.
|
|
|
531
568
|
}],
|
|
532
569
|
["listBulkCallLines", {
|
|
533
570
|
name: "listBulkCallLines",
|
|
534
|
-
description: `
|
|
535
|
-
|
|
571
|
+
description: `List per-contact results for a campaign.
|
|
572
|
+
|
|
573
|
+
Each row has what happened on the call, the variables you sent, and
|
|
574
|
+
\`call.recording_id\`.
|
|
536
575
|
|
|
537
576
|
## Paging
|
|
538
577
|
|
|
539
|
-
|
|
540
|
-
\`
|
|
578
|
+
Call with no \`cursor\`. Then pass back the \`next_cursor\` you were given until
|
|
579
|
+
it is \`null\`. Rows come oldest first. \`pagesize\` defaults to 30 and goes up
|
|
580
|
+
to 150. Cursors are opaque, so never build one. No contact is skipped or
|
|
581
|
+
returned twice, even while the campaign dials.
|
|
541
582
|
|
|
542
583
|
\`\`\`
|
|
543
584
|
cursor = None
|
|
@@ -548,17 +589,10 @@ while True:
|
|
|
548
589
|
if not cursor: break
|
|
549
590
|
\`\`\`
|
|
550
591
|
|
|
551
|
-
Each call returns a page of rows, oldest first: \`pagesize\` goes up to
|
|
552
|
-
150 and defaults to 30. Cursors are opaque, so pass back the string you
|
|
553
|
-
were given and never build one. No contact is skipped or returned
|
|
554
|
-
twice, even while the campaign is still dialing.
|
|
555
|
-
|
|
556
592
|
## Transcripts are not in the row
|
|
557
593
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
megabytes. Fetch the one you want from
|
|
561
|
-
\`GET /calls/logs/{recording_id}\`.
|
|
594
|
+
Transcripts reach 212 KB, so rows carry only \`call.recording_id\`. Fetch the
|
|
595
|
+
transcript from \`GET /calls/logs/{recording_id}\`.
|
|
562
596
|
|
|
563
597
|
(Tags: Bulk calls)`,
|
|
564
598
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"cursor":{"type":"string","description":"The `next_cursor` from your previous response. Omit it on the first\nrequest. Opaque: pass it back unchanged.\n"},"pagesize":{"type":"integer","minimum":1,"default":30,"maximum":150,"description":"Rows per page. Above 150 the request is refused."},"call_status":{"type":"string","enum":["Pending","In Progress","completed","voicemail_detected","no-answer","busy","Failed","Skipped","retry_scheduled","cancelled"],"description":"Return only contacts in this state."},"interaction_status":{"type":"string","description":"Return only contacts with this interaction outcome."},"search":{"type":"string","description":"An exact phone number, matched against the contact's number and the\nnumber that called it. Not a substring search.\n"},"include_total":{"type":"boolean","default":false,"description":"Add `total_records` to the response. It costs a count over the whole\nfiltered campaign, so it is off unless you ask. Ask for it once to\nfill a header, not on every page of a walk.\n"}},"required":["bulk_call_id"]},
|
|
@@ -590,13 +624,14 @@ the number's lifetime total across every cycle.
|
|
|
590
624
|
}],
|
|
591
625
|
["addBulkCallNumber", {
|
|
592
626
|
name: "addBulkCallNumber",
|
|
593
|
-
description: `Add one of your numbers to the campaign's rotation pool.
|
|
594
|
-
|
|
595
|
-
|
|
627
|
+
description: `Add one of your numbers to the campaign's rotation pool.
|
|
628
|
+
|
|
629
|
+
It works while the campaign runs, so use it to bring in a fresh number when
|
|
630
|
+
healthy ones run low.
|
|
596
631
|
|
|
597
|
-
The number must
|
|
598
|
-
|
|
599
|
-
|
|
632
|
+
The number must be yours and not already in the pool. A number with no agent
|
|
633
|
+
gets this campaign's agent attached. A number attached to a **different**
|
|
634
|
+
agent is refused.
|
|
600
635
|
|
|
601
636
|
(Tags: Bulk calls)`,
|
|
602
637
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","required":["phone_number_id"],"properties":{"phone_number_id":{"type":"number","description":"One of your numbers, from List phone numbers."}},"description":"The JSON request body."}},"required":["bulk_call_id","requestBody"]},
|
|
@@ -612,16 +647,13 @@ automatically; a number attached to a **different** agent is refused.
|
|
|
612
647
|
name: "setBulkCallNumberActive",
|
|
613
648
|
description: `Stop or resume dialing from one number in the pool.
|
|
614
649
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
cannot be paused, since the campaign would have nothing to dial from.
|
|
650
|
+
Pause a number that goes bad mid-campaign. Dialing moves to the next number,
|
|
651
|
+
and the paused number keeps its history and counters. You cannot pause the
|
|
652
|
+
last active number of a running campaign.
|
|
619
653
|
|
|
620
|
-
Send the state you want
|
|
621
|
-
request is harmless.
|
|
654
|
+
Send the state you want, not a toggle, so a retry is harmless.
|
|
622
655
|
|
|
623
|
-
\`assignment_id\` is the number's id **within this campaign's pool**, from
|
|
624
|
-
List rotation pool. It is not the \`phone_number_id\`.
|
|
656
|
+
\`assignment_id\` is the number's id **within this campaign's pool**, from List rotation pool. It is not the \`phone_number_id\`.
|
|
625
657
|
|
|
626
658
|
(Tags: Bulk calls)`,
|
|
627
659
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"assignment_id":{"type":"number","description":"The `assignment_id` from List rotation pool."},"requestBody":{"type":"object","required":["is_active"],"properties":{"is_active":{"type":"boolean","description":"`false` pauses the number, `true` resumes it."}},"description":"The JSON request body."}},"required":["bulk_call_id","assignment_id","requestBody"]},
|
|
@@ -638,18 +670,14 @@ List rotation pool. It is not the \`phone_number_id\`.
|
|
|
638
670
|
description: `Add up to 1000 contacts to a campaign in one request.
|
|
639
671
|
|
|
640
672
|
This is the batch form of Add contact to dynamic campaign. Prefer it
|
|
641
|
-
whenever you have more than a handful
|
|
642
|
-
far cheaper than 500 requests, on your side and ours.
|
|
673
|
+
whenever you have more than a handful of contacts.
|
|
643
674
|
|
|
644
|
-
Repeated numbers are kept, not merged.
|
|
645
|
-
|
|
646
|
-
number usually means two real reasons to call.
|
|
675
|
+
Repeated numbers are kept, not merged. The same number with different
|
|
676
|
+
variables is called twice.
|
|
647
677
|
|
|
648
|
-
Rows that fail validation are reported in \`rejected
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
\`rejected\`; the condition values themselves are not evaluated on this
|
|
652
|
-
route.
|
|
678
|
+
Rows that fail validation are reported in \`rejected\`, and the rest are still
|
|
679
|
+
added. A row missing a column that the campaign's \`call_conditions\` need is
|
|
680
|
+
also rejected. The condition values are not evaluated on this route.
|
|
653
681
|
|
|
654
682
|
(Tags: Bulk calls)`,
|
|
655
683
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","maxItems":1000,"description":"Each row needs `to_number`. Note this differs from the\n`contact_list` on Create bulk call, which uses\n`phone_number` and takes loose keys: here the variables go\nin an explicit `custom_variables` object.\n","items":{"type":"object","required":["to_number"],"properties":{"to_number":{"type":"string","description":"Number to call, in international format."},"custom_variables":{"type":"object","description":"Passed to the agent as context for this call, so it\ncan use them in the conversation.\n","additionalProperties":true},"metadata":{"type":"object","description":"Stored with the contact and returned on its row in\nBulk call results. Not shown to the agent.\n","additionalProperties":true},"previous_from_number":{"type":"string","description":"The number that called this person last. With\n`call_back_from_different_number` on, the call goes\nout from another number in the pool.\n"}}}}},"description":"The JSON request body."}},"required":["campaign_id","requestBody"]},
|
|
@@ -682,11 +710,11 @@ scheduled, or finished cannot be started.
|
|
|
682
710
|
}],
|
|
683
711
|
["setBulkCallConcurrency", {
|
|
684
712
|
name: "setBulkCallConcurrency",
|
|
685
|
-
description: `Change how many calls the campaign places at once,
|
|
686
|
-
running. Raise it to finish sooner, lower it if your team cannot keep up
|
|
687
|
-
with transfers or your numbers are being answered less.
|
|
713
|
+
description: `Change how many calls the campaign places at once, even while it runs.
|
|
688
714
|
|
|
689
|
-
|
|
715
|
+
Raise it to finish sooner. Lower it if your team cannot keep up with
|
|
716
|
+
transfers or fewer calls are answered. The ceiling is your account's
|
|
717
|
+
concurrency limit.
|
|
690
718
|
|
|
691
719
|
(Tags: Bulk calls)`,
|
|
692
720
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","required":["concurrent_call_limit"],"properties":{"concurrent_call_limit":{"type":"number","minimum":1,"description":"Calls to place at once."}},"description":"The JSON request body."}},"required":["bulk_call_id","requestBody"]},
|
|
@@ -700,14 +728,14 @@ The ceiling is your account's concurrency limit.
|
|
|
700
728
|
}],
|
|
701
729
|
["setBulkCallRotation", {
|
|
702
730
|
name: "setBulkCallRotation",
|
|
703
|
-
description: `Change how a campaign uses its number pool.
|
|
704
|
-
|
|
731
|
+
description: `Change how a campaign uses its number pool.
|
|
732
|
+
|
|
733
|
+
Send only the fields you want to change. At least one field is required.
|
|
705
734
|
|
|
706
|
-
|
|
707
|
-
\`
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
endpoints.
|
|
735
|
+
It works while the status is \`draft\`, \`scheduled\`, \`in_progress\`, \`waiting\`,
|
|
736
|
+
\`paused\`, \`auto_paused\` or \`retry_scheduled\`. Any other status is refused
|
|
737
|
+
with \`Cannot edit rotation for status: <status>\`. To change which numbers
|
|
738
|
+
are in the pool, use the numbers endpoints.
|
|
711
739
|
|
|
712
740
|
(Tags: Bulk calls)`,
|
|
713
741
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","properties":{"strategy":{"type":"string","enum":["fixed_count","cpr_threshold","both","none"],"description":"When to move to the next number: every `calls_per_number`\ncalls, on low health score, both, or never.\n"},"calls_per_number":{"type":"number","description":"Calls before moving on. Used by `fixed_count` and `both`."},"health_threshold":{"type":"number","description":"Health score below which a number is rotated away from.\nUsed by `cpr_threshold` and `both`.\n"},"fallback":{"type":"string","enum":["pause","continue_best"],"description":"When every number is unhealthy: `pause` the campaign, or\n`continue_best` with the healthiest one.\n"},"call_back_from_different_number":{"type":"boolean","description":"When on, a repeat call to the same person goes out from a\ndifferent number than the one that called them last. Needs\ntwo or more numbers in the pool. Must be `true` or `false`.\n"},"skip_known_invalid_numbers":{"type":"boolean","description":"When on, a contact is not dialed if the carrier said its\nnumber does not exist, in any campaign of your organization\nin the last 14 days. Must be `true` or `false`.\n"}},"description":"The JSON request body."}},"required":["bulk_call_id","requestBody"]},
|
|
@@ -721,29 +749,22 @@ endpoints.
|
|
|
721
749
|
}],
|
|
722
750
|
["retryBulkCall", {
|
|
723
751
|
name: "retryBulkCall",
|
|
724
|
-
description: `Re-queue contacts that did not connect, without
|
|
752
|
+
description: `Re-queue contacts that did not connect, without a new campaign.
|
|
725
753
|
|
|
726
|
-
Use it after a campaign finishes with more no-answers than
|
|
727
|
-
|
|
728
|
-
having a bad day). Retried contacts keep their original variables.
|
|
754
|
+
Use it after a campaign finishes with more no-answers than expected, or when
|
|
755
|
+
the cause was on your side. Retried contacts keep their original variables.
|
|
729
756
|
|
|
730
757
|
The retry is refused in these cases:
|
|
731
758
|
|
|
732
|
-
- The
|
|
733
|
-
|
|
734
|
-
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
error is \`Invalid failure reason(s)\` and lists the allowed values.
|
|
739
|
-
- No contact matches. The error is \`No failed calls found to retry
|
|
740
|
-
matching criteria\`.
|
|
741
|
-
|
|
742
|
-
Each contact is retried from its latest call only. When the campaign has
|
|
759
|
+
- The status is not \`completed\`. The error is \`Cannot retry calls. Current status: <status>\`.
|
|
760
|
+
- Auto retry is on and some contacts are still \`Pending\` or \`In Progress\`. The error is \`Cannot retry while calls are still in progress and auto retry is enabled\`.
|
|
761
|
+
- A value in \`failure_reasons\` is not an allowed status. The error is \`Invalid failure reason(s)\` and lists the allowed values.
|
|
762
|
+
- No contact matches. The error is \`No failed calls found to retry matching criteria\`.
|
|
763
|
+
|
|
764
|
+
Each contact is retried from its latest call only. With
|
|
743
765
|
\`skip_known_invalid_numbers\` on, contacts whose last call ended with the
|
|
744
|
-
carrier saying the number does not exist are
|
|
745
|
-
|
|
746
|
-
with no conversation.
|
|
766
|
+
carrier saying the number does not exist are skipped. Connected calls with
|
|
767
|
+
no conversation are not retried.
|
|
747
768
|
|
|
748
769
|
(Tags: Bulk calls)`,
|
|
749
770
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","properties":{"retry_strategy":{"type":"string","default":"all","description":"Which contacts to re-queue. `all` takes everything that did\nnot connect. `specific` re-queues only the statuses listed\nin `failure_reasons`.\n"},"failure_reasons":{"type":"array","description":"Statuses to re-queue. Read only when `retry_strategy` is\n`specific`; for example `no-answer` and `busy`. Ignored when\n`retry_strategy` is `all`.\n","items":{"type":"string","enum":["failed","Failed","no-answer","No Answer","busy","Busy","cancelled","canceled","voicemail_detected"]}}},"description":"The JSON request body."}},"required":["bulk_call_id"]},
|
|
@@ -757,9 +778,9 @@ with no conversation.
|
|
|
757
778
|
}],
|
|
758
779
|
["setBulkCallDailyTimeControl", {
|
|
759
780
|
name: "setBulkCallDailyTimeControl",
|
|
760
|
-
description: `
|
|
761
|
-
|
|
762
|
-
|
|
781
|
+
description: `Limit a campaign to a daily calling window in its timezone.
|
|
782
|
+
|
|
783
|
+
Outside the window the campaign holds, then resumes the next day.
|
|
763
784
|
|
|
764
785
|
(Tags: Bulk calls)`,
|
|
765
786
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","required":["enable_daily_hard_stop","enable_daily_auto_start"],"properties":{"enable_daily_hard_stop":{"type":"boolean","description":"Stop dialing at `daily_stop_time` each day."},"daily_stop_time":{"type":"number","description":"Hour of day to stop, 0 to 23. Fractions are allowed, so\n`17.5` is 17:30. Required when the hard stop is on.\n"},"daily_stop_timezone":{"type":"string","description":"Timezone for the stop time."},"enable_daily_auto_start":{"type":"boolean","description":"Resume dialing at `daily_start_time` each day."},"daily_start_time":{"type":"number","description":"Hour of day to resume, 0 to 23. Required when auto start\nis on.\n"},"daily_start_timezone":{"type":"string","description":"Timezone for the start time."}},"description":"The JSON request body."}},"required":["bulk_call_id","requestBody"]},
|
|
@@ -879,15 +900,15 @@ from the OmniDimension number shop or imported your own.
|
|
|
879
900
|
}],
|
|
880
901
|
["searchPhoneNumbers", {
|
|
881
902
|
name: "searchPhoneNumbers",
|
|
882
|
-
description: `Search the OmniDimension number shop for
|
|
883
|
-
in a region. Price and validity are flat per region, so every result
|
|
884
|
-
shows the same \`monthly_rental_usd\` and \`validity_days\`, and that is the
|
|
885
|
-
exact amount a purchase will charge.
|
|
903
|
+
description: `Search the OmniDimension number shop for numbers you can buy in a region.
|
|
886
904
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
905
|
+
Price and validity are flat per region. Every result shows the same
|
|
906
|
+
\`monthly_rental_usd\` and \`validity_days\`, and a purchase charges exactly
|
|
907
|
+
that.
|
|
908
|
+
|
|
909
|
+
A region can have several carriers, each with different number series. Pass
|
|
910
|
+
the \`carrier\` you want. The response names the carrier its results came
|
|
911
|
+
from, and a purchase must pass that carrier.
|
|
891
912
|
|
|
892
913
|
(Tags: Phone numbers)`,
|
|
893
914
|
inputSchema: {"type":"object","properties":{"region":{"type":"string","enum":["IN","US"],"description":"Region to search in. `IN` and `US` both serve numbers. Which\nregions answer is configuration, so a region with no carrier\nenabled returns `404 not_available` rather than an empty list.\n"},"carrier":{"type":"string","description":"Which carrier's stock to search: carriers in a region do not sell\nthe same numbers. Required where a region has more than one\ncarrier; omitting it there returns `409 carrier_required` naming\nthe region's carriers and what each one stocks.\n"},"pattern":{"type":"string","description":"Digits or prefix to match within the number."},"page":{"type":"number","minimum":1,"default":1,"description":"Page of results to return."},"limit":{"type":"number","minimum":1,"maximum":150,"default":20,"description":"Results per page."}},"required":["region"]},
|
|
@@ -901,8 +922,9 @@ to pass.
|
|
|
901
922
|
}],
|
|
902
923
|
["purchasePhoneNumber", {
|
|
903
924
|
name: "purchasePhoneNumber",
|
|
904
|
-
description: `Buy a phone number from the OmniDimension number shop.
|
|
905
|
-
|
|
925
|
+
description: `Buy a phone number from the OmniDimension number shop.
|
|
926
|
+
|
|
927
|
+
The monthly rental comes out of your wallet. The number is added to your
|
|
906
928
|
account, ready to attach to an agent.
|
|
907
929
|
|
|
908
930
|
(Tags: Phone numbers)`,
|
|
@@ -917,9 +939,10 @@ account, ready to attach to an agent.
|
|
|
917
939
|
}],
|
|
918
940
|
["releasePhoneNumber", {
|
|
919
941
|
name: "releasePhoneNumber",
|
|
920
|
-
description: `
|
|
921
|
-
|
|
922
|
-
|
|
942
|
+
description: `Release a phone number and stop its rental.
|
|
943
|
+
|
|
944
|
+
It is not charged at the next renewal. Only a number currently allocated to
|
|
945
|
+
the account can be released.
|
|
923
946
|
|
|
924
947
|
(Tags: Phone numbers)`,
|
|
925
948
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["phone_number"],"properties":{"phone_number":{"type":"string","description":"The number to release."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -933,11 +956,12 @@ released.
|
|
|
933
956
|
}],
|
|
934
957
|
["setPhoneNumberAutoRenew", {
|
|
935
958
|
name: "setPhoneNumberAutoRenew",
|
|
936
|
-
description: `Turn auto-renew
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
the number
|
|
959
|
+
description: `Turn auto-renew on or off for a number bought from the number shop.
|
|
960
|
+
|
|
961
|
+
With auto-renew off, the number is not charged again. It works until the end
|
|
962
|
+
of the period already paid for, then it is released. Turn auto-renew on
|
|
963
|
+
before that date and the number renews as normal. Sending the value the
|
|
964
|
+
number already has changes nothing and still succeeds.
|
|
941
965
|
|
|
942
966
|
(Tags: Phone numbers)`,
|
|
943
967
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["phone_number","auto_renew"],"properties":{"phone_number":{"type":"string","description":"The number to switch."},"auto_renew":{"type":"boolean","description":"`false` stops renewal, `true` turns it back on. Must be a JSON boolean: a string such as `\"false\"`, a number, or a missing value is refused."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -1029,15 +1053,15 @@ the number already has changes nothing and still succeeds.
|
|
|
1029
1053
|
}],
|
|
1030
1054
|
["listVoices", {
|
|
1031
1055
|
name: "listVoices",
|
|
1032
|
-
description: `
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1056
|
+
description: `List the voices your organization can use, with filters and pagination.
|
|
1057
|
+
|
|
1058
|
+
Use \`provider=featured\` for OmniDimension voices in the order the dashboard
|
|
1059
|
+
shows them. They are the recommended start. Cartesia voices are next.
|
|
1036
1060
|
|
|
1037
|
-
Each voice keeps its own \`service\`: save
|
|
1038
|
-
provider
|
|
1039
|
-
|
|
1040
|
-
|
|
1061
|
+
Each voice keeps its own \`service\`: save it as the agent's voice provider. A
|
|
1062
|
+
provider your organization cannot use returns a 400. Cartesia and ElevenLabs
|
|
1063
|
+
support filtering by name, language, accent and gender. Other providers
|
|
1064
|
+
support pagination only.
|
|
1041
1065
|
|
|
1042
1066
|
(Tags: Providers)`,
|
|
1043
1067
|
inputSchema: {"type":"object","properties":{"provider":{"type":"string","description":"Provider to list voices from. Omit to list every voice your organization can use.\n`featured` lists OmniDimension voices and is the recommended choice, followed by\n`cartesia`. A provider your organization cannot use returns a 400.\n"},"search":{"type":"string","description":"Substring match against voice name or description. Cartesia and ElevenLabs."},"language":{"type":"string","description":"ISO language code (e.g. `en`, `hi`, `es`). Cartesia and ElevenLabs."},"accent":{"type":"string","description":"Accent label (e.g. `american`, `british`). Cartesia and ElevenLabs."},"gender":{"type":"string","enum":["male","female"],"description":"Filter voices by gender. Cartesia and ElevenLabs."},"page":{"type":"integer","minimum":1,"default":1,"description":"1-indexed page number."},"page_size":{"type":"integer","minimum":1,"default":30,"maximum":100,"description":"Voices per page. Capped at 100."}}},
|
|
@@ -1103,26 +1127,26 @@ and gender. Other providers support pagination only.
|
|
|
1103
1127
|
}],
|
|
1104
1128
|
["getAccountBalance", {
|
|
1105
1129
|
name: "getAccountBalance",
|
|
1106
|
-
description: `Read your organization's wallet
|
|
1107
|
-
it buys at your rates, your plan, your concurrency headroom, and
|
|
1108
|
-
whether auto-recharge will refill it.
|
|
1130
|
+
description: `Read your organization's wallet balance, plan and auto-recharge state.
|
|
1109
1131
|
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
with \`402 payment_required\`.
|
|
1132
|
+
The response also has the minutes the balance buys at your rates and your
|
|
1133
|
+
concurrency headroom.
|
|
1113
1134
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
read a client's figures through the Reseller endpoints.
|
|
1135
|
+
Call it before a campaign, or on a schedule, so you learn about low credit
|
|
1136
|
+
here and not from a call failing with \`402 payment_required\`.
|
|
1117
1137
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
that flag before treating a zero balance as a stop condition.
|
|
1138
|
+
The response always describes the organization the API key belongs to. There
|
|
1139
|
+
is no parameter for another account. Resellers read a client's figures
|
|
1140
|
+
through the Reseller endpoints.
|
|
1122
1141
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1142
|
+
A balance at or below zero does not always stop calls. An organization on
|
|
1143
|
+
usage-based billing (\`plan.is_usage_based\`) keeps placing calls and is
|
|
1144
|
+
metered to its payment method. Check that flag before treating zero as a
|
|
1145
|
+
stop condition.
|
|
1146
|
+
|
|
1147
|
+
The API key's user needs Billing access in your organization. If you get a
|
|
1148
|
+
\`403\`, an administrator can grant it when Billing is enabled for your
|
|
1149
|
+
organization. When it is not, contact support.
|
|
1126
1150
|
|
|
1127
1151
|
(Tags: Account)`,
|
|
1128
1152
|
inputSchema: {"type":"object","properties":{}},
|
|
@@ -1136,12 +1160,13 @@ enabled for your organization; when it is not, contact support.
|
|
|
1136
1160
|
}],
|
|
1137
1161
|
["listClonedVoices", {
|
|
1138
1162
|
name: "listClonedVoices",
|
|
1139
|
-
description: `
|
|
1140
|
-
|
|
1163
|
+
description: `List your cloned voices, oldest first, one cursor page at a time.
|
|
1164
|
+
|
|
1165
|
+
Call it with no \`cursor\`. Then pass back each \`next_cursor\` until it is
|
|
1141
1166
|
\`null\`.
|
|
1142
1167
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1168
|
+
When a voice is \`ready\`, put its \`voice_id\` in an agent's \`voice.voice_id\`
|
|
1169
|
+
with \`voice.provider: cartesia\`.
|
|
1145
1170
|
|
|
1146
1171
|
(Tags: Voice cloning)`,
|
|
1147
1172
|
inputSchema: {"type":"object","properties":{"limit":{"type":"number","default":20,"maximum":100,"description":"Rows per page. Above 100 the request is refused."},"cursor":{"type":"string","description":"The `next_cursor` from your previous response. Omit it on the first\nrequest. Opaque: pass it back unchanged.\n"}}},
|
|
@@ -1196,9 +1221,11 @@ still \`processing\` cannot be deleted.
|
|
|
1196
1221
|
}],
|
|
1197
1222
|
["getClonedVoiceSample", {
|
|
1198
1223
|
name: "getClonedVoiceSample",
|
|
1199
|
-
description: `Stream the generated mp3 sample of a cloned voice.
|
|
1200
|
-
|
|
1201
|
-
|
|
1224
|
+
description: `Stream the generated mp3 sample of a cloned voice.
|
|
1225
|
+
|
|
1226
|
+
Only the owner can fetch it. Send your API key in the \`Authorization\`
|
|
1227
|
+
header. If no sample exists yet, the call returns \`404\`
|
|
1228
|
+
(\`sample_not_ready\`).
|
|
1202
1229
|
|
|
1203
1230
|
(Tags: Voice cloning)`,
|
|
1204
1231
|
inputSchema: {"type":"object","properties":{"voice_id":{"type":"number","description":"Id of the cloned voice."}},"required":["voice_id"]},
|
|
@@ -1225,7 +1252,11 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1225
1252
|
}],
|
|
1226
1253
|
["listWorkflowNodeTypes", {
|
|
1227
1254
|
name: "listWorkflowNodeTypes",
|
|
1228
|
-
description: `Search the node types a workflow can use
|
|
1255
|
+
description: `Search the node types a workflow can use.
|
|
1256
|
+
|
|
1257
|
+
Examples are \`whatsapp\`, \`voice_ai\` and \`conditional\`. Call it first when
|
|
1258
|
+
you do not know which node to add. Then call \`getWorkflowNodeType\` for one
|
|
1259
|
+
type's settings.
|
|
1229
1260
|
|
|
1230
1261
|
(Tags: Workflows)`,
|
|
1231
1262
|
inputSchema: {"type":"object","properties":{"q":{"type":"string","description":"Words to match against the type, label and description, such as `whatsapp`."},"category":{"type":"string","enum":["triggers","messaging","calls","flow","ai","crm","integrations"],"description":"Only types in this category."}}},
|
|
@@ -1239,7 +1270,11 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1239
1270
|
}],
|
|
1240
1271
|
["getWorkflowNodeType", {
|
|
1241
1272
|
name: "getWorkflowNodeType",
|
|
1242
|
-
description: `
|
|
1273
|
+
description: `Get the settings one node type reads.
|
|
1274
|
+
|
|
1275
|
+
Call it before you add or edit a node. Its \`fields\` are the keys of the
|
|
1276
|
+
node's \`config\`. Use \`detail=full\` only when you need help text and
|
|
1277
|
+
examples.
|
|
1243
1278
|
|
|
1244
1279
|
(Tags: Workflows)`,
|
|
1245
1280
|
inputSchema: {"type":"object","properties":{"node_type":{"type":"string","description":"A node type from `listWorkflowNodeTypes`, such as `whatsapp`."},"detail":{"type":"string","enum":["minimal","full"],"default":"minimal","description":"`full` adds descriptions, examples and `output_example`."}},"required":["node_type"]},
|
|
@@ -1253,7 +1288,11 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1253
1288
|
}],
|
|
1254
1289
|
["listWorkflowFieldOptions", {
|
|
1255
1290
|
name: "listWorkflowFieldOptions",
|
|
1256
|
-
description: `
|
|
1291
|
+
description: `List the choices for one \`ref\` field of a node type.
|
|
1292
|
+
|
|
1293
|
+
Examples are the phone numbers, agents or integrations in your account. Call
|
|
1294
|
+
it for every \`ref\` field and never guess an id. If it returns \`400
|
|
1295
|
+
no_options\`, the field is not a list choice, so ask the user for the value.
|
|
1257
1296
|
|
|
1258
1297
|
(Tags: Workflows)`,
|
|
1259
1298
|
inputSchema: {"type":"object","properties":{"node_type":{"type":"string","description":"A node type from `listWorkflowNodeTypes`, such as `whatsapp`."},"field":{"type":"string","description":"A field name from `getWorkflowNodeType`."},"depends":{"type":"number","description":"The value of the field this one depends on (`depends_on` in the node type), such as the chosen phone number id."}},"required":["node_type","field"]},
|
|
@@ -1267,7 +1306,9 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1267
1306
|
}],
|
|
1268
1307
|
["listWorkflows", {
|
|
1269
1308
|
name: "listWorkflows",
|
|
1270
|
-
description: `
|
|
1309
|
+
description: `List your workflows, oldest first, one cursor page at a time.
|
|
1310
|
+
|
|
1311
|
+
Use it to find a workflow id. Pass back \`next_cursor\` until it is \`null\`.
|
|
1271
1312
|
|
|
1272
1313
|
(Tags: Workflows)`,
|
|
1273
1314
|
inputSchema: {"type":"object","properties":{"limit":{"type":"number","default":20,"minimum":1,"maximum":100,"description":"Rows per page."},"cursor":{"type":"string","description":"The `next_cursor` from the previous page. Omit it on the first request. Pass it back unchanged."}}},
|
|
@@ -1281,7 +1322,11 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1281
1322
|
}],
|
|
1282
1323
|
["createWorkflow", {
|
|
1283
1324
|
name: "createWorkflow",
|
|
1284
|
-
description: `Create a workflow with a draft.
|
|
1325
|
+
description: `Create a workflow with a draft.
|
|
1326
|
+
|
|
1327
|
+
Without \`graph\`, the draft holds one \`trigger\` node, ready for
|
|
1328
|
+
\`editWorkflow\` ops. Pass \`graph\` only to start from a complete graph. The
|
|
1329
|
+
response carries the \`revision\` you need to edit.
|
|
1285
1330
|
|
|
1286
1331
|
(Tags: Workflows)`,
|
|
1287
1332
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"A non-empty name."},"graph":{"type":"object","description":"A complete graph to start a workflow from, in the same shape `getWorkflow`\nreturns under `draft`. A workflow you read can be sent back as a new one.\nIt is built with the same checks as `editWorkflow` ops. Most callers skip it\nand build with `editWorkflow` instead.\n","required":["nodes","edges"],"properties":{"nodes":{"type":"array","items":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string","description":"Lowercase letters, digits and underscores, starting with a letter. Later nodes read this node's output as `{{ context.<id>.<field> }}`."},"type":{"type":"string","description":"A node type from `listWorkflowNodeTypes`."},"label":{"type":"string"},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"config":{"type":"object","additionalProperties":true,"description":"The node's settings. The fields come from `getWorkflowNodeType`."}}}},"edges":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","description":"Id of the node the edge starts at."},"to":{"type":"string","description":"Id of the node the edge ends at."},"handle":{"type":"string","description":"The output of the `from` node. Omit it, or send `default`, for a plain node's only output."}}}}}}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -1295,7 +1340,11 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1295
1340
|
}],
|
|
1296
1341
|
["getWorkflow", {
|
|
1297
1342
|
name: "getWorkflow",
|
|
1298
|
-
description: `
|
|
1343
|
+
description: `Get one workflow with its draft, status and \`revision\`.
|
|
1344
|
+
|
|
1345
|
+
Call it before every edit to get the current \`revision\`. Use
|
|
1346
|
+
\`view=structure\` to see nodes and edges without config on a large workflow.
|
|
1347
|
+
Secrets read back as \`********\`.
|
|
1299
1348
|
|
|
1300
1349
|
(Tags: Workflows)`,
|
|
1301
1350
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."},"view":{"type":"string","enum":["structure","full"],"default":"full","description":"`structure` leaves node `config` out."}},"required":["workflow_id"]},
|
|
@@ -1309,7 +1358,10 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1309
1358
|
}],
|
|
1310
1359
|
["deleteWorkflow", {
|
|
1311
1360
|
name: "deleteWorkflow",
|
|
1312
|
-
description: `Delete a workflow
|
|
1361
|
+
description: `Delete a workflow and stop its published version.
|
|
1362
|
+
|
|
1363
|
+
This cannot be undone, so confirm with the user first. To stop it without
|
|
1364
|
+
deleting, use \`deactivateWorkflow\`.
|
|
1313
1365
|
|
|
1314
1366
|
(Tags: Workflows)`,
|
|
1315
1367
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."}},"required":["workflow_id"]},
|
|
@@ -1323,7 +1375,14 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1323
1375
|
}],
|
|
1324
1376
|
["editWorkflow", {
|
|
1325
1377
|
name: "editWorkflow",
|
|
1326
|
-
description: `Change the draft with a list of \`ops
|
|
1378
|
+
description: `Change the draft with a list of \`ops\`.
|
|
1379
|
+
|
|
1380
|
+
Ops add, update, move or delete nodes, and connect or disconnect them. They
|
|
1381
|
+
apply all together or not at all. Send the \`revision\` from your last read.
|
|
1382
|
+
On \`409 revision_conflict\`, read the workflow again and retry.
|
|
1383
|
+
|
|
1384
|
+
Secrets read back as \`********\`. Send them back unchanged to keep the stored
|
|
1385
|
+
value. This edits the draft only. Use \`publishWorkflow\` to make it live.
|
|
1327
1386
|
|
|
1328
1387
|
(Tags: Workflows)`,
|
|
1329
1388
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."},"requestBody":{"type":"object","required":["revision","ops"],"properties":{"revision":{"type":"string","description":"The `draft.revision` from your last `getWorkflow` or edit."},"ops":{"type":"array","items":{"type":"object","description":"One edit to the draft. Set `op` and the fields that op uses.\n\n| `op` | Fields | Effect |\n|---|---|---|\n| `add_node` | `id`, `type`, `label?`, `config?`, `after?`, `handle?`, `position?` | Adds a node. With `after`, it also connects it to that node (on output `handle`). |\n| `update_node` | `id`, `config?`, `label?` | Merges `config` keys into the node. A `null` value removes a key. |\n| `move_node` | `id`, `position` | Moves a node on the canvas. |\n| `delete_node` | `id` | Deletes a node and its edges. |\n| `connect` | `from`, `to`, `handle?` | Adds an edge. |\n| `disconnect` | `from`, `to`, `handle?` | Removes an edge. |\n","required":["op"],"properties":{"op":{"type":"string","enum":["add_node","update_node","move_node","delete_node","connect","disconnect"]},"id":{"type":"string","description":"Node id. For `add_node`, lowercase letters, digits and underscores, starting with a letter. It must be new."},"type":{"type":"string","description":"`add_node`: a node type from `listWorkflowNodeTypes`."},"label":{"type":"string","description":"`add_node`, `update_node`: the name shown on the canvas."},"config":{"type":"object","additionalProperties":true,"description":"`add_node`, `update_node`: the node's settings. The fields come from\n`getWorkflowNodeType`. Send a secret back as `********` to keep the\nstored value.\n"},"after":{"type":"string","description":"`add_node`: id of the node to connect the new node to."},"handle":{"type":"string","description":"`add_node`, `connect`, `disconnect`: the output of the source node. Omit for the default output."},"position":{"type":"object","description":"`add_node`, `move_node`: canvas position. `add_node` places the node for you if you omit it.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"from":{"type":"string","description":"`connect`, `disconnect`: id of the node the edge starts at."},"to":{"type":"string","description":"`connect`, `disconnect`: id of the node the edge ends at."}}}},"name":{"type":"string","description":"Rename the workflow."}},"description":"The JSON request body."}},"required":["workflow_id","requestBody"]},
|
|
@@ -1337,7 +1396,10 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1337
1396
|
}],
|
|
1338
1397
|
["validateWorkflow", {
|
|
1339
1398
|
name: "validateWorkflow",
|
|
1340
|
-
description: `Check the draft and list what blocks publish.
|
|
1399
|
+
description: `Check the draft and list what blocks publish.
|
|
1400
|
+
|
|
1401
|
+
It changes nothing. Call it after your edits and fix every error before
|
|
1402
|
+
\`publishWorkflow\`.
|
|
1341
1403
|
|
|
1342
1404
|
(Tags: Workflows)`,
|
|
1343
1405
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."}},"required":["workflow_id"]},
|
|
@@ -1351,7 +1413,11 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1351
1413
|
}],
|
|
1352
1414
|
["publishWorkflow", {
|
|
1353
1415
|
name: "publishWorkflow",
|
|
1354
|
-
description: `Make the draft the live version.
|
|
1416
|
+
description: `Make the draft the live version.
|
|
1417
|
+
|
|
1418
|
+
Real events then run it, unless the workflow is paused. Publish is refused
|
|
1419
|
+
while the draft has errors, so run \`validateWorkflow\` first. Ask the user
|
|
1420
|
+
before you publish.
|
|
1355
1421
|
|
|
1356
1422
|
(Tags: Workflows)`,
|
|
1357
1423
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."}},"required":["workflow_id"]},
|
|
@@ -1379,7 +1445,10 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1379
1445
|
}],
|
|
1380
1446
|
["deactivateWorkflow", {
|
|
1381
1447
|
name: "deactivateWorkflow",
|
|
1382
|
-
description: `Turn the published workflow off
|
|
1448
|
+
description: `Turn the published workflow off.
|
|
1449
|
+
|
|
1450
|
+
Real events stop running it. The workflow and its draft stay. Use
|
|
1451
|
+
\`activateWorkflow\` to turn it back on.
|
|
1383
1452
|
|
|
1384
1453
|
(Tags: Workflows)`,
|
|
1385
1454
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."}},"required":["workflow_id"]},
|
|
@@ -1393,9 +1462,14 @@ request needs your API key in the \`Authorization\` header.
|
|
|
1393
1462
|
}],
|
|
1394
1463
|
["testWorkflow", {
|
|
1395
1464
|
name: "testWorkflow",
|
|
1396
|
-
description: `
|
|
1465
|
+
description: `Run the draft once with \`payload\` as the trigger data.
|
|
1466
|
+
|
|
1467
|
+
Every node runs for real: WhatsApp messages, SMS, emails and calls go out,
|
|
1468
|
+
and CRM records change. Ask the user first, and use their own phone number
|
|
1469
|
+
or email in the payload.
|
|
1397
1470
|
|
|
1398
|
-
It returns an \`execution_id\` at once. Poll \`getWorkflowExecution\` for the
|
|
1471
|
+
It returns an \`execution_id\` at once. Poll \`getWorkflowExecution\` for the
|
|
1472
|
+
result.
|
|
1399
1473
|
|
|
1400
1474
|
(Tags: Workflows)`,
|
|
1401
1475
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."},"requestBody":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":true,"description":"The trigger data. Nodes read it as `{{ context.<trigger id>.<field> }}`. See `output_example` of the trigger node type for its shape."}},"description":"The JSON request body."}},"required":["workflow_id"]},
|
|
@@ -1409,7 +1483,10 @@ It returns an \`execution_id\` at once. Poll \`getWorkflowExecution\` for the re
|
|
|
1409
1483
|
}],
|
|
1410
1484
|
["getWorkflowExecution", {
|
|
1411
1485
|
name: "getWorkflowExecution",
|
|
1412
|
-
description: `
|
|
1486
|
+
description: `Get one workflow run with the result of each step.
|
|
1487
|
+
|
|
1488
|
+
Use it to read the outcome of \`testWorkflow\`. The run is finished when
|
|
1489
|
+
\`state\` is \`completed\`, \`failed\` or \`cancelled\`.
|
|
1413
1490
|
|
|
1414
1491
|
(Tags: Workflows)`,
|
|
1415
1492
|
inputSchema: {"type":"object","properties":{"workflow_id":{"type":"number","description":"Id of the workflow."},"execution_id":{"type":"number","description":"The `execution_id` from `testWorkflow`."}},"required":["workflow_id","execution_id"]},
|
|
@@ -1423,10 +1500,11 @@ It returns an \`execution_id\` at once. Poll \`getWorkflowExecution\` for the re
|
|
|
1423
1500
|
}],
|
|
1424
1501
|
["listWhatsappNumbers", {
|
|
1425
1502
|
name: "listWhatsappNumbers",
|
|
1426
|
-
description: `
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1503
|
+
description: `List the WhatsApp numbers your API key can see.
|
|
1504
|
+
|
|
1505
|
+
Numbers come oldest first, and archived ones are left out. Use it to find a
|
|
1506
|
+
number id for the other routes. Each number carries \`capabilities\`, which
|
|
1507
|
+
says what it can send.
|
|
1430
1508
|
|
|
1431
1509
|
(Tags: WhatsApp)`,
|
|
1432
1510
|
inputSchema: {"type":"object","properties":{"limit":{"type":"number","default":20,"minimum":1,"maximum":100,"description":"Rows per page."},"cursor":{"type":"string","description":"The `next_cursor` from the previous page. Omit it on the first request and pass it back unchanged."}}},
|
|
@@ -1440,19 +1518,21 @@ out.
|
|
|
1440
1518
|
}],
|
|
1441
1519
|
["importWhatsappNumbers", {
|
|
1442
1520
|
name: "importWhatsappNumbers",
|
|
1443
|
-
description: `
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1521
|
+
description: `Connect numbers from your WhatsApp Business Account with your Meta access
|
|
1522
|
+
token.
|
|
1523
|
+
|
|
1524
|
+
List the numbers first with [Preview
|
|
1525
|
+
numbers](/docs/api-reference/whatsapp/previewWhatsappNumbers), then pass the
|
|
1526
|
+
ids you want.
|
|
1447
1527
|
|
|
1448
|
-
The token must never expire and must carry both
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1528
|
+
The token must never expire and must carry both
|
|
1529
|
+
\`whatsapp_business_management\` and \`whatsapp_business_messaging\`. A system
|
|
1530
|
+
user token does. Add \`app_secret\` to receive replies. Without it the number
|
|
1531
|
+
can send but not receive.
|
|
1452
1532
|
|
|
1453
|
-
Connecting a number again updates it
|
|
1454
|
-
\`app_secret\`
|
|
1455
|
-
|
|
1533
|
+
Connecting a number again updates it. Send a new \`access_token\` or
|
|
1534
|
+
\`app_secret\` to change either. One number failing does not stop the others.
|
|
1535
|
+
It is listed in \`failed\` with the reason.
|
|
1456
1536
|
|
|
1457
1537
|
(Tags: WhatsApp)`,
|
|
1458
1538
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["waba_id","access_token","phone_number_ids"],"properties":{"waba_id":{"type":"string","description":"Your WhatsApp Business Account id, from WhatsApp Manager."},"access_token":{"type":"string","description":"A Meta access token that never expires, with both WhatsApp permissions. Stored, never returned."},"phone_number_ids":{"type":"array","minItems":1,"items":{"type":"string"},"description":"Meta's ids for the numbers to connect, as Preview numbers lists them."},"app_secret":{"type":"string","description":"Your Meta app's secret. Turns on replies. Stored, never returned."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -1466,12 +1546,14 @@ not stop the others. It is listed in \`failed\` with the reason.
|
|
|
1466
1546
|
}],
|
|
1467
1547
|
["previewWhatsappNumbers", {
|
|
1468
1548
|
name: "previewWhatsappNumbers",
|
|
1469
|
-
description: `
|
|
1470
|
-
|
|
1471
|
-
same rules as connecting, so a preview that passes can connect.
|
|
1549
|
+
description: `List the numbers on your WhatsApp Business Account with their health.
|
|
1550
|
+
Connects nothing.
|
|
1472
1551
|
|
|
1473
|
-
|
|
1474
|
-
|
|
1552
|
+
The access token is checked first, against the same rules as connecting, so
|
|
1553
|
+
a preview that passes can connect.
|
|
1554
|
+
|
|
1555
|
+
Fix a number with \`needs_migration\` or \`needs_registration\` in WhatsApp
|
|
1556
|
+
Manager before you connect it, or its sends fail.
|
|
1475
1557
|
|
|
1476
1558
|
(Tags: WhatsApp)`,
|
|
1477
1559
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["waba_id","access_token"],"properties":{"waba_id":{"type":"string","description":"Your WhatsApp Business Account id, from WhatsApp Manager."},"access_token":{"type":"string","description":"A Meta access token that never expires, with both WhatsApp permissions."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -1485,8 +1567,10 @@ after fixing it in WhatsApp Manager, or its sends fail.
|
|
|
1485
1567
|
}],
|
|
1486
1568
|
["getWhatsappNumber", {
|
|
1487
1569
|
name: "getWhatsappNumber",
|
|
1488
|
-
description: `
|
|
1489
|
-
|
|
1570
|
+
description: `Get one number with its status, quality, messaging limit and what it can
|
|
1571
|
+
send.
|
|
1572
|
+
|
|
1573
|
+
A number in another workspace answers \`404\`.
|
|
1490
1574
|
|
|
1491
1575
|
(Tags: WhatsApp)`,
|
|
1492
1576
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"}},"required":["number_id"]},
|
|
@@ -1500,10 +1584,10 @@ can send. A number in another workspace answers \`404\`.
|
|
|
1500
1584
|
}],
|
|
1501
1585
|
["listWhatsappTemplates", {
|
|
1502
1586
|
name: "listWhatsappTemplates",
|
|
1503
|
-
description: `
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
missing.
|
|
1587
|
+
description: `List the number's message templates, as last synced, oldest first.
|
|
1588
|
+
|
|
1589
|
+
Pass \`status=approved\` to see exactly the templates a send accepts. If a
|
|
1590
|
+
template you expect is missing, run \`syncWhatsappTemplates\` first.
|
|
1507
1591
|
|
|
1508
1592
|
(Tags: WhatsApp)`,
|
|
1509
1593
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"},"status":{"type":"string","description":"Show only templates with this review status, such as `approved`,\n`pending` or `rejected`. Lower-case; omit it for all.\n"},"limit":{"type":"number","default":20,"minimum":1,"maximum":100,"description":"Rows per page."},"cursor":{"type":"string","description":"The `next_cursor` from the previous page."}},"required":["number_id"]},
|
|
@@ -1517,10 +1601,11 @@ missing.
|
|
|
1517
1601
|
}],
|
|
1518
1602
|
["syncWhatsappTemplates", {
|
|
1519
1603
|
name: "syncWhatsappTemplates",
|
|
1520
|
-
description: `Pull the number's templates and
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1604
|
+
description: `Pull the number's templates and review statuses from WhatsApp into your
|
|
1605
|
+
list.
|
|
1606
|
+
|
|
1607
|
+
Run it after you create or edit a template in Meta. It runs at most once a
|
|
1608
|
+
minute per number. A second call inside that minute answers \`429\`.
|
|
1524
1609
|
|
|
1525
1610
|
(Tags: WhatsApp)`,
|
|
1526
1611
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"}},"required":["number_id"]},
|
|
@@ -1534,10 +1619,11 @@ answers \`429\`.
|
|
|
1534
1619
|
}],
|
|
1535
1620
|
["getWhatsappCalling", {
|
|
1536
1621
|
name: "getWhatsappCalling",
|
|
1537
|
-
description: `
|
|
1538
|
-
|
|
1539
|
-
response
|
|
1540
|
-
|
|
1622
|
+
description: `Get whether calling is on for this number and whether it can be turned on.
|
|
1623
|
+
|
|
1624
|
+
The response lists the checks. A failing check does not fail the request: it
|
|
1625
|
+
stays \`200\` and names the check that blocks. Meta Cloud numbers only. Your
|
|
1626
|
+
plan must include calling.
|
|
1541
1627
|
|
|
1542
1628
|
(Tags: WhatsApp)`,
|
|
1543
1629
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"}},"required":["number_id"]},
|
|
@@ -1551,10 +1637,11 @@ only. Calling must be included in your plan.
|
|
|
1551
1637
|
}],
|
|
1552
1638
|
["setWhatsappCalling", {
|
|
1553
1639
|
name: "setWhatsappCalling",
|
|
1554
|
-
description: `Turn calling on or off for a Meta Cloud number.
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1640
|
+
description: `Turn calling on or off for a Meta Cloud number.
|
|
1641
|
+
|
|
1642
|
+
A customer calls this number. It does not place calls. Turning calling on
|
|
1643
|
+
needs every blocking check to pass, or the request answers \`409\`. Turning it
|
|
1644
|
+
off is always allowed.
|
|
1558
1645
|
|
|
1559
1646
|
(Tags: WhatsApp)`,
|
|
1560
1647
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"},"requestBody":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"`true` to turn calling on, `false` to turn it off."}},"description":"The JSON request body."}},"required":["number_id","requestBody"]},
|
|
@@ -1568,10 +1655,10 @@ allowed.
|
|
|
1568
1655
|
}],
|
|
1569
1656
|
["listWhatsappConversations", {
|
|
1570
1657
|
name: "listWhatsappConversations",
|
|
1571
|
-
description: `
|
|
1572
|
-
|
|
1573
|
-
event webhooks, so
|
|
1574
|
-
messages.
|
|
1658
|
+
description: `List a number's inbox, newest activity first.
|
|
1659
|
+
|
|
1660
|
+
There are no event webhooks, so poll with \`updated_since\` to learn about new
|
|
1661
|
+
messages. Page with \`cursor\`.
|
|
1575
1662
|
|
|
1576
1663
|
(Tags: WhatsApp)`,
|
|
1577
1664
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"},"filter":{"type":"string","enum":["all","unread","needs_person","agent","failed","window_closed","campaign_replies"],"default":"all","description":"`needs_person` is a person-owned or paused conversation. `window_closed` is one you can only reach with a template."},"q":{"type":"string","maxLength":200,"description":"Search the customer's name, phone number and message text."},"updated_since":{"type":"string","description":"An ISO 8601 date and time, such as `2026-10-01T09:00:00+00:00`. Returns\nconversations with a change at or after it. No offset means UTC.\n"},"limit":{"type":"number","default":20,"minimum":1,"maximum":100,"description":"Rows per page."},"cursor":{"type":"string","description":"The `next_cursor` from the previous page."}},"required":["number_id"]},
|
|
@@ -1585,8 +1672,9 @@ messages.
|
|
|
1585
1672
|
}],
|
|
1586
1673
|
["getWhatsappConversation", {
|
|
1587
1674
|
name: "getWhatsappConversation",
|
|
1588
|
-
description: `
|
|
1589
|
-
|
|
1675
|
+
description: `Get one conversation: owner, 24-hour window, opt-out state and unread count.
|
|
1676
|
+
|
|
1677
|
+
Poll it while a person is answering.
|
|
1590
1678
|
|
|
1591
1679
|
(Tags: WhatsApp)`,
|
|
1592
1680
|
inputSchema: {"type":"object","properties":{"conversation_id":{"type":"string","description":"A conversation id: the number id, a dash, then the customer's phone\ndigits, such as `412-919876543210`. From\n[listWhatsappConversations](/docs/api-reference/whatsapp/listWhatsappConversations).\n"}},"required":["conversation_id"]},
|
|
@@ -1601,7 +1689,9 @@ opted out, and the unread count. Poll it while a person is answering.
|
|
|
1601
1689
|
["takeOverWhatsappConversation", {
|
|
1602
1690
|
name: "takeOverWhatsappConversation",
|
|
1603
1691
|
description: `Take the conversation from the agent, so it stops replying and your team
|
|
1604
|
-
answers.
|
|
1692
|
+
answers.
|
|
1693
|
+
|
|
1694
|
+
Repeating it changes nothing. Hand it back with
|
|
1605
1695
|
\`handBackWhatsappConversation\` when the person is done.
|
|
1606
1696
|
|
|
1607
1697
|
(Tags: WhatsApp)`,
|
|
@@ -1616,8 +1706,9 @@ answers. Repeating it changes nothing. Hand it back with
|
|
|
1616
1706
|
}],
|
|
1617
1707
|
["handBackWhatsappConversation", {
|
|
1618
1708
|
name: "handBackWhatsappConversation",
|
|
1619
|
-
description: `Give the conversation back to the agent
|
|
1620
|
-
|
|
1709
|
+
description: `Give the conversation back to the agent and clear any pause.
|
|
1710
|
+
|
|
1711
|
+
The agent answers the customer's next message. Repeating it changes nothing.
|
|
1621
1712
|
|
|
1622
1713
|
(Tags: WhatsApp)`,
|
|
1623
1714
|
inputSchema: {"type":"object","properties":{"conversation_id":{"type":"string","description":"A conversation id: the number id, a dash, then the customer's phone\ndigits, such as `412-919876543210`. From\n[listWhatsappConversations](/docs/api-reference/whatsapp/listWhatsappConversations).\n"}},"required":["conversation_id"]},
|
|
@@ -1631,9 +1722,10 @@ answers the customer's next message. Repeating it changes nothing.
|
|
|
1631
1722
|
}],
|
|
1632
1723
|
["listWhatsappMessages", {
|
|
1633
1724
|
name: "listWhatsappMessages",
|
|
1634
|
-
description: `
|
|
1635
|
-
|
|
1636
|
-
|
|
1725
|
+
description: `List one conversation's messages, newest first.
|
|
1726
|
+
|
|
1727
|
+
Poll forward with \`after\`, the id of the newest message you have, to get
|
|
1728
|
+
only new ones. Page back through history with \`cursor\`. Do not pass both.
|
|
1637
1729
|
|
|
1638
1730
|
(Tags: WhatsApp)`,
|
|
1639
1731
|
inputSchema: {"type":"object","properties":{"conversation_id":{"type":"string","description":"The conversation to read."},"after":{"type":"number","description":"Return messages newer than this message id. `next_cursor` is null in this mode."},"limit":{"type":"number","default":20,"minimum":1,"maximum":100,"description":"Rows per page."},"cursor":{"type":"string","description":"The `next_cursor` from the previous page. Do not combine it with `after`."}},"required":["conversation_id"]},
|
|
@@ -1647,18 +1739,19 @@ Page backward through history with \`cursor\`. Do not pass both.
|
|
|
1647
1739
|
}],
|
|
1648
1740
|
["sendWhatsappMessage", {
|
|
1649
1741
|
name: "sendWhatsappMessage",
|
|
1650
|
-
description: `Send
|
|
1651
|
-
|
|
1742
|
+
description: `Send a text, template, image or document message to a customer.
|
|
1743
|
+
|
|
1744
|
+
It goes out from \`phone_number_id\`. Set \`type\` and the field that matches
|
|
1745
|
+
it.
|
|
1652
1746
|
|
|
1653
|
-
Outside the 24-hour window, only a template goes through.
|
|
1654
|
-
|
|
1655
|
-
|
|
1747
|
+
Outside the 24-hour window, only a template goes through. Text, image and
|
|
1748
|
+
document sends are refused with \`409 window_closed\`. A template send works
|
|
1749
|
+
any time and can start a new conversation.
|
|
1656
1750
|
|
|
1657
|
-
|
|
1658
|
-
|
|
1751
|
+
A send does not take the conversation over, so the agent keeps answering.
|
|
1752
|
+
Set \`take_over: true\` to stop the agent and answer yourself.
|
|
1659
1753
|
|
|
1660
|
-
\`Idempotency-Key\` is required. The same key with the same body replays
|
|
1661
|
-
the first answer instead of sending again.
|
|
1754
|
+
\`Idempotency-Key\` is required. The same key with the same body replays the first answer instead of sending again.
|
|
1662
1755
|
|
|
1663
1756
|
(Tags: WhatsApp)`,
|
|
1664
1757
|
inputSchema: {"type":"object","properties":{"Idempotency-Key":{"type":"string","maxLength":255,"description":"A unique string you choose, up to 255 characters. Required on this\nroute. The same key with the same body replays the first answer for\n24 hours instead of acting twice. A different body with the same key\nanswers `409`.\n"},"requestBody":{"type":"object","required":["phone_number_id","to","type"],"properties":{"phone_number_id":{"type":"number","description":"The number to send from."},"to":{"type":"string","description":"The customer's number in international format, such as `+15551234567`."},"type":{"type":"string","enum":["text","template","image","document"]},"text":{"type":"string","maxLength":4096,"description":"Required when `type` is `text`."},"template":{"type":"object","description":"Required when `type` is `template`.","required":["id"],"properties":{"id":{"type":"number","description":"An approved template on this number, from `listWhatsappTemplates`."},"params":{"type":"object","description":"One value per field in the template's `fields`. Keys are\nthose field keys. String, number or null values.\n","additionalProperties":true}}},"media":{"type":"object","description":"Required when `type` is `image` or `document`.","required":["media_id"],"properties":{"media_id":{"type":"string","description":"The `media_id` from `uploadWhatsappMedia`, uploaded within the last 24 hours."},"caption":{"type":"string","maxLength":1024}}},"reply_to":{"type":"number","description":"A message id in the same conversation to quote. Not allowed with a template."},"take_over":{"type":"boolean","default":false,"description":"Stop the agent answering this conversation and let a person run it."}},"description":"The JSON request body."}},"required":["Idempotency-Key","requestBody"]},
|
|
@@ -1672,9 +1765,11 @@ the first answer instead of sending again.
|
|
|
1672
1765
|
}],
|
|
1673
1766
|
["getWhatsappMessage", {
|
|
1674
1767
|
name: "getWhatsappMessage",
|
|
1675
|
-
description: `
|
|
1676
|
-
first.
|
|
1677
|
-
|
|
1768
|
+
description: `Get one message with its \`timeline\` of delivery and read steps, oldest
|
|
1769
|
+
first.
|
|
1770
|
+
|
|
1771
|
+
Poll it after a send to learn whether the message was delivered and read. It
|
|
1772
|
+
also shows what the send cost once charged.
|
|
1678
1773
|
|
|
1679
1774
|
(Tags: WhatsApp)`,
|
|
1680
1775
|
inputSchema: {"type":"object","properties":{"message_id":{"type":"number","description":"Id of a message, from `listWhatsappMessages` or a send response."}},"required":["message_id"]},
|
|
@@ -1703,10 +1798,10 @@ lists active opt-outs only.
|
|
|
1703
1798
|
}],
|
|
1704
1799
|
["addWhatsappOptOut", {
|
|
1705
1800
|
name: "addWhatsappOptOut",
|
|
1706
|
-
description: `
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1801
|
+
description: `Block a customer from receiving messages you start from this number.
|
|
1802
|
+
|
|
1803
|
+
The block lasts until you lift it. The response is \`201\` for a new block. It
|
|
1804
|
+
is \`200\` with the entry unchanged if the customer was already blocked.
|
|
1710
1805
|
|
|
1711
1806
|
(Tags: WhatsApp)`,
|
|
1712
1807
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"},"requestBody":{"type":"object","required":["customer"],"properties":{"customer":{"type":"string","description":"The customer's number in international format, such as `+15551234567`."},"note":{"type":"string","maxLength":500,"description":"A note for your team."}},"description":"The JSON request body."}},"required":["number_id","requestBody"]},
|
|
@@ -1720,10 +1815,11 @@ returned unchanged.
|
|
|
1720
1815
|
}],
|
|
1721
1816
|
["liftWhatsappOptOut", {
|
|
1722
1817
|
name: "liftWhatsappOptOut",
|
|
1723
|
-
description: `Lift a block you added, or a marketing block made in WhatsApp.
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1818
|
+
description: `Lift a block you added, or a marketing block made in WhatsApp.
|
|
1819
|
+
|
|
1820
|
+
The entry stays in the list with \`active: false\`. You cannot lift a
|
|
1821
|
+
customer's own STOP over the API. The customer must lift it in WhatsApp or
|
|
1822
|
+
message you again.
|
|
1727
1823
|
|
|
1728
1824
|
(Tags: WhatsApp)`,
|
|
1729
1825
|
inputSchema: {"type":"object","properties":{"number_id":{"type":"number","description":"Id of a WhatsApp number in your workspace, from\n[listWhatsappNumbers](/docs/api-reference/whatsapp/listWhatsappNumbers).\nA number in another workspace answers `404`.\n"},"opt_out_id":{"type":"number","description":"Id of an active opt-out entry, from `listWhatsappOptOuts`."}},"required":["number_id","opt_out_id"]},
|
|
@@ -1751,9 +1847,10 @@ messaging you again, brings them back.
|
|
|
1751
1847
|
}],
|
|
1752
1848
|
["createWhatsappCampaign", {
|
|
1753
1849
|
name: "createWhatsappCampaign",
|
|
1754
|
-
description: `Create a campaign
|
|
1755
|
-
|
|
1756
|
-
|
|
1850
|
+
description: `Create a draft campaign from an approved template. It sends nothing until
|
|
1851
|
+
you launch it.
|
|
1852
|
+
|
|
1853
|
+
Add contacts and launch it with the next calls. Scheduling is not offered.
|
|
1757
1854
|
|
|
1758
1855
|
(Tags: WhatsApp)`,
|
|
1759
1856
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["name","phone_number_id","template_id"],"properties":{"name":{"type":"string","maxLength":255},"phone_number_id":{"type":"number"},"template_id":{"type":"number","description":"An approved template on that number."},"campaign_mode":{"type":"string","enum":["broadcast","broadcast_reply"],"default":"broadcast","description":"`broadcast_reply` lets the agent answer replies. It needs an agent."},"agent_id":{"type":"number","description":"The agent that answers replies."},"data_source":{"type":"string","enum":["csv","webhook"],"default":"csv"},"is_dynamic":{"type":"boolean","default":false},"variable_mapping":{"type":"object","description":"Template field to contact field or static text.","additionalProperties":true}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
@@ -1767,9 +1864,11 @@ be used, so every campaign starts with one. Scheduling is not offered.
|
|
|
1767
1864
|
}],
|
|
1768
1865
|
["getWhatsappCampaign", {
|
|
1769
1866
|
name: "getWhatsappCampaign",
|
|
1770
|
-
description: `
|
|
1771
|
-
|
|
1772
|
-
|
|
1867
|
+
description: `Get one campaign with its counts and analytics.
|
|
1868
|
+
|
|
1869
|
+
Analytics include per-source figures and failed contacts grouped by reason.
|
|
1870
|
+
\`delivery_rate\` and \`read_rate\` are null on a number that does not report
|
|
1871
|
+
receipts.
|
|
1773
1872
|
|
|
1774
1873
|
(Tags: WhatsApp)`,
|
|
1775
1874
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of a WhatsApp campaign, from `listWhatsappCampaigns`."}},"required":["campaign_id"]},
|
|
@@ -1783,8 +1882,10 @@ null on a number that does not report receipts.
|
|
|
1783
1882
|
}],
|
|
1784
1883
|
["listWhatsappCampaignContacts", {
|
|
1785
1884
|
name: "listWhatsappCampaignContacts",
|
|
1786
|
-
description: `
|
|
1787
|
-
|
|
1885
|
+
description: `List per-contact status for a campaign, oldest first.
|
|
1886
|
+
|
|
1887
|
+
A contact that read the message and then replied STOP counts as read and
|
|
1888
|
+
opted out.
|
|
1788
1889
|
|
|
1789
1890
|
(Tags: WhatsApp)`,
|
|
1790
1891
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of a WhatsApp campaign, from `listWhatsappCampaigns`."},"status":{"type":"string","enum":["pending","sent","delivered","read","replied","failed","skipped","opted_out"],"description":"Show only contacts in this state."},"limit":{"type":"number","default":20,"minimum":1,"maximum":100,"description":"Rows per page."},"cursor":{"type":"string","description":"The `next_cursor` from the previous page."}},"required":["campaign_id"]},
|
|
@@ -1798,11 +1899,13 @@ message and then replied STOP counts as read and opted out.
|
|
|
1798
1899
|
}],
|
|
1799
1900
|
["addWhatsappCampaignContacts", {
|
|
1800
1901
|
name: "addWhatsappCampaignContacts",
|
|
1801
|
-
description: `Add one contact, or up to 500 at once
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1902
|
+
description: `Add one contact, or up to 500 at once, to a campaign.
|
|
1903
|
+
|
|
1904
|
+
On a draft they are stored for launch. On a running campaign they are sent
|
|
1905
|
+
now. A contact already in the campaign is skipped, so a retry is safe.
|
|
1906
|
+
|
|
1907
|
+
Each contact needs a \`phone_number\`. Every other key is kept and can fill a
|
|
1908
|
+
template parameter through \`variable_mapping\`.
|
|
1806
1909
|
|
|
1807
1910
|
(Tags: WhatsApp)`,
|
|
1808
1911
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of a WhatsApp campaign, from `listWhatsappCampaigns`."},"requestBody":{"description":"One contact object, or an array of 1 to 500.","oneOf":[{"type":"object","description":"One contact. `phone_number` is required. Any other key is kept on the\ncontact and can fill a template parameter through `variable_mapping`.\n","required":["phone_number"],"properties":{"phone_number":{"type":"string","description":"The customer's number in international format, such as `+15551234567`."},"contact_name":{"type":"string","description":"A name for your team. `name` works too."}},"additionalProperties":true},{"type":"array","maxItems":500,"items":{"type":"object","description":"One contact. `phone_number` is required. Any other key is kept on the\ncontact and can fill a template parameter through `variable_mapping`.\n","required":["phone_number"],"properties":{"phone_number":{"type":"string","description":"The customer's number in international format, such as `+15551234567`."},"contact_name":{"type":"string","description":"A name for your team. `name` works too."}},"additionalProperties":true}}]}},"required":["campaign_id","requestBody"]},
|
|
@@ -1816,10 +1919,11 @@ parameter through \`variable_mapping\`.
|
|
|
1816
1919
|
}],
|
|
1817
1920
|
["launchWhatsappCampaign", {
|
|
1818
1921
|
name: "launchWhatsappCampaign",
|
|
1819
|
-
description: `Start a draft campaign
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1922
|
+
description: `Start a draft campaign and queue every pending contact once.
|
|
1923
|
+
|
|
1924
|
+
It needs at least one contact, unless \`data_source\` is \`webhook\`. Launch
|
|
1925
|
+
checks the plan's monthly broadcast allowance and the wallet balance.
|
|
1926
|
+
\`Idempotency-Key\` is required, so a retry does not start it twice.
|
|
1823
1927
|
|
|
1824
1928
|
(Tags: WhatsApp)`,
|
|
1825
1929
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of a WhatsApp campaign, from `listWhatsappCampaigns`."},"Idempotency-Key":{"type":"string","maxLength":255,"description":"A unique string you choose, up to 255 characters. Required on this\nroute. The same key with the same body replays the first answer for\n24 hours instead of acting twice. A different body with the same key\nanswers `409`.\n"}},"required":["campaign_id","Idempotency-Key"]},
|
|
@@ -1833,8 +1937,10 @@ here. \`Idempotency-Key\` is required, so a retry does not start it twice.
|
|
|
1833
1937
|
}],
|
|
1834
1938
|
["pauseWhatsappCampaign", {
|
|
1835
1939
|
name: "pauseWhatsappCampaign",
|
|
1836
|
-
description: `Stop sending until you resume.
|
|
1837
|
-
|
|
1940
|
+
description: `Stop sending until you resume.
|
|
1941
|
+
|
|
1942
|
+
Only a running campaign can be paused. A pause you make by hand is never
|
|
1943
|
+
resumed automatically.
|
|
1838
1944
|
|
|
1839
1945
|
(Tags: WhatsApp)`,
|
|
1840
1946
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of a WhatsApp campaign, from `listWhatsappCampaigns`."}},"required":["campaign_id"]},
|
|
@@ -1848,9 +1954,10 @@ pause you make by hand is never resumed automatically.
|
|
|
1848
1954
|
}],
|
|
1849
1955
|
["resumeWhatsappCampaign", {
|
|
1850
1956
|
name: "resumeWhatsappCampaign",
|
|
1851
|
-
description: `Resume a paused campaign.
|
|
1852
|
-
|
|
1853
|
-
|
|
1957
|
+
description: `Resume a paused campaign.
|
|
1958
|
+
|
|
1959
|
+
Pending contacts are sent. A contact already sent is never sent again.
|
|
1960
|
+
Resume checks the wallet and allowance again, so it can answer \`402\`.
|
|
1854
1961
|
|
|
1855
1962
|
(Tags: WhatsApp)`,
|
|
1856
1963
|
inputSchema: {"type":"object","properties":{"campaign_id":{"type":"number","description":"Id of a WhatsApp campaign, from `listWhatsappCampaigns`."}},"required":["campaign_id"]},
|
|
@@ -1880,6 +1987,7 @@ or already-canceled campaign cannot be canceled.
|
|
|
1880
1987
|
]);
|
|
1881
1988
|
addShowWorkflow(toolDefinitionMap);
|
|
1882
1989
|
addDocsTools(toolDefinitionMap);
|
|
1990
|
+
addGuideTool(toolDefinitionMap);
|
|
1883
1991
|
if (readOnlyMode()) keepReadOnlyTools(toolDefinitionMap);
|
|
1884
1992
|
|
|
1885
1993
|
/**
|
|
@@ -1898,7 +2006,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
1898
2006
|
const toolsForClient: Tool[] = Array.from(toolDefinitionMap.values()).map(def => ({
|
|
1899
2007
|
name: def.name,
|
|
1900
2008
|
description: def.description,
|
|
1901
|
-
inputSchema: def
|
|
2009
|
+
inputSchema: flatInputSchema(def),
|
|
1902
2010
|
annotations: toolAnnotations(def),
|
|
1903
2011
|
_meta: toolMeta(def.name)
|
|
1904
2012
|
}));
|
|
@@ -1914,7 +2022,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request: CallToolRequest)
|
|
|
1914
2022
|
return { content: [{ type: "text", text: `Error: Unknown tool requested: ${toolName}` }] };
|
|
1915
2023
|
}
|
|
1916
2024
|
if (isDocsTool(toolName)) return await callDocsTool(toolName, toolArgs ?? {});
|
|
1917
|
-
|
|
2025
|
+
if (isGuideTool(toolName)) return callGuideTool(toolArgs ?? {});
|
|
2026
|
+
return await executeApiTool(toolName, toolDefinition, nestBodyArgs(toolDefinition, toolArgs ?? {}), securitySchemes);
|
|
1918
2027
|
});
|
|
1919
2028
|
|
|
1920
2029
|
|