@omnidim-ai/mcp-server 0.8.0 → 0.9.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/build/index.js +343 -97
- package/build/index.js.map +1 -1
- package/build/procedures.js +115 -0
- package/build/procedures.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +348 -102
- package/src/procedures.ts +116 -0
package/src/index.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { readApiKey } from "./credentials.js";
|
|
6
6
|
import { isInteractive, printInteractiveHelp, startupBanner, trimLargeResponse } from "./helpers.js";
|
|
7
|
+
import { beginSession, emitSessionCrash, emitSessionEnd, endSession, recordToolError, recordToolResult } from "./telemetry.js";
|
|
7
8
|
import { registerProcedures } from "./procedures.js";
|
|
8
9
|
import { toolAnnotations } from "./tool-annotations.js";
|
|
9
10
|
import { notifyUpdates } from "./update_notifier.js";
|
|
10
|
-
import { beginSession, emitSessionCrash, emitSessionEnd, endSession, recordToolError, recordToolResult } from "./telemetry.js";
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -41,6 +41,8 @@ interface McpToolDefinition {
|
|
|
41
41
|
executionParameters: { name: string, in: string }[];
|
|
42
42
|
requestBodyContentType?: string;
|
|
43
43
|
securityRequirements: any[];
|
|
44
|
+
tags?: string[];
|
|
45
|
+
deprecated?: boolean;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
/**
|
|
@@ -85,15 +87,43 @@ registerProcedures(server);
|
|
|
85
87
|
*/
|
|
86
88
|
const toolDefinitionMap: Map<string, McpToolDefinition> = new Map([
|
|
87
89
|
|
|
90
|
+
["createSession", {
|
|
91
|
+
name: "createSession",
|
|
92
|
+
description: `Create a voice Session: a short-lived, single-conversation
|
|
93
|
+
reservation that lets a client hold a live voice chat with your
|
|
94
|
+
agent. This is step 1 of 2. Creating the Session does not start any
|
|
95
|
+
audio on its own; it returns a \`ws_url\` that a client then connects
|
|
96
|
+
to over WebSocket to actually talk.
|
|
97
|
+
|
|
98
|
+
Call this endpoint from your server with your API key, and return
|
|
99
|
+
only the \`ws_url\` to your client. The API key must never reach the
|
|
100
|
+
browser. The \`ws_url\` is the only thing the client needs, and it is
|
|
101
|
+
safe to hand out because it is single-use and expires. For how to
|
|
102
|
+
connect and talk, see "Connect the client and talk" below the
|
|
103
|
+
request details.
|
|
104
|
+
|
|
105
|
+
(Tags: Sessions)`,
|
|
106
|
+
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","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.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
107
|
+
method: "post",
|
|
108
|
+
pathTemplate: "/sessions/create",
|
|
109
|
+
executionParameters: [],
|
|
110
|
+
requestBodyContentType: "application/json",
|
|
111
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
112
|
+
tags: ["Sessions"],
|
|
113
|
+
deprecated: false
|
|
114
|
+
}],
|
|
88
115
|
["listAgents", {
|
|
89
116
|
name: "listAgents",
|
|
90
|
-
description: `Retrieve all agents for the authenticated user with pagination support
|
|
117
|
+
description: `Retrieve all agents for the authenticated user with pagination support.
|
|
118
|
+
(Tags: Agents)`,
|
|
91
119
|
inputSchema: {"type":"object","properties":{"pageno":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination."},"pagesize":{"type":"integer","minimum":1,"default":30,"maximum":150,"description":"Number of items per page (max 150)."},"name":{"type":"string","description":"Filter agents whose name matches this substring (case-insensitive)."}}},
|
|
92
120
|
method: "get",
|
|
93
121
|
pathTemplate: "/agents",
|
|
94
122
|
executionParameters: [{"name":"pageno","in":"query"},{"name":"pagesize","in":"query"},{"name":"name","in":"query"}],
|
|
95
123
|
requestBodyContentType: undefined,
|
|
96
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
124
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
125
|
+
tags: ["Agents"],
|
|
126
|
+
deprecated: false
|
|
97
127
|
}],
|
|
98
128
|
["createAgent", {
|
|
99
129
|
name: "createAgent",
|
|
@@ -101,85 +131,194 @@ const toolDefinitionMap: Map<string, McpToolDefinition> = new Map([
|
|
|
101
131
|
config supports transcriber, model, voice, web search, transfer,
|
|
102
132
|
end-call conditions, post-call actions (email + webhook),
|
|
103
133
|
ambient background track, initial ringing sound, and multilingual support.
|
|
104
|
-
|
|
105
|
-
inputSchema: {"type":"object","properties":{"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_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."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use.","example":"deepgram_stream"},"model":{"type":"string","enum":["nova-3","nova-2"],"description":"The model to use for transcription (required when provider is `deepgram_stream`).","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","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. The current catalog is returned by the LLM providers list.","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.","properties":{"provider":{"type":"string","enum":["eleven_labs","google","cartesia","sarvam"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list.","example":"eleven_labs"},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`).","example":"JBFqnCBsd6RMkjVDRZzb"},"model":{"type":"string","description":"TTS model identifier. Only consumed when `provider` is\n`cartesia` (e.g. `sonic-3.5`). For ElevenLabs and other\nproviders the model is implied by `voice_id` and this\nfield is ignored.\n","example":"sonic-3.5"},"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"],"description":"The search provider to use.","example":"DuckDuckGo"}}},"post_call_actions":{"type":"object","description":"Side effects that fire once the call ends. Configure email, webhook, or both.","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"},"example":["support@example.com"]},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","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 should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]},"example":["completed","voicemail_detected"]}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload.","example":"https://your-webhook-endpoint.com/omnidim-callback"},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","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 should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]},"example":["completed","failed"]}}}}},"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.","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.","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and react 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","welcome_message","context_breakdown"]}],"description":"The JSON request body."}},"required":["requestBody"]},
|
|
134
|
+
|
|
135
|
+
> **Voicemail detection is an access-gated feature** that we turn on per
|
|
136
|
+
account. If it isn't enabled for yours yet,
|
|
137
|
+
[request access](https://omnidim.io/contact-us?reason=product&lock=1)
|
|
138
|
+
before configuring the \`voicemail\` object.
|
|
139
|
+
|
|
140
|
+
(Tags: Agents)`,
|
|
141
|
+
inputSchema: {"type":"object","properties":{"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."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use.","example":"deepgram_stream"},"model":{"type":"string","enum":["nova-3","nova-2"],"description":"The model to use for transcription (required when provider is `deepgram_stream`).","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","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. The current catalog is returned by the LLM providers list.","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.","properties":{"provider":{"type":"string","enum":["eleven_labs","google","cartesia","sarvam"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list.","example":"eleven_labs"},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`).","example":"JBFqnCBsd6RMkjVDRZzb"},"model":{"type":"string","description":"TTS model identifier. Only consumed when `provider` is\n`cartesia` (e.g. `sonic-3.5`). For ElevenLabs and other\nproviders the model is implied by `voice_id` and this\nfield is ignored.\n","example":"sonic-3.5"},"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"],"description":"The search provider to use.","example":"DuckDuckGo"}}},"post_call_actions":{"type":"object","description":"Side effects that fire once the call ends. Configure email, webhook, or both.","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"},"example":["support@example.com"]},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","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 should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]},"example":["completed","voicemail_detected"]}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload.","example":"https://your-webhook-endpoint.com/omnidim-callback"},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","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 should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]},"example":["completed","failed"]}}}}},"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.","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","welcome_message","context_breakdown"]}],"description":"The JSON request body."}},"required":["requestBody"]},
|
|
106
142
|
method: "post",
|
|
107
143
|
pathTemplate: "/agents/create",
|
|
108
144
|
executionParameters: [],
|
|
109
145
|
requestBodyContentType: "application/json",
|
|
110
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
146
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
147
|
+
tags: ["Agents"],
|
|
148
|
+
deprecated: false
|
|
111
149
|
}],
|
|
112
150
|
["getAgent", {
|
|
113
151
|
name: "getAgent",
|
|
114
|
-
description: `Get details of a specific agent by ID
|
|
152
|
+
description: `Get details of a specific agent by ID. The response also includes a \`version_history_enabled\` boolean showing whether [version history](/docs/api-reference/agent-versions) is turned on for the agent's organization.
|
|
153
|
+
(Tags: Agents)`,
|
|
115
154
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."}},"required":["agent_id"]},
|
|
116
155
|
method: "get",
|
|
117
156
|
pathTemplate: "/agents/{agent_id}",
|
|
118
157
|
executionParameters: [{"name":"agent_id","in":"path"}],
|
|
119
158
|
requestBodyContentType: undefined,
|
|
120
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
159
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
160
|
+
tags: ["Agents"],
|
|
161
|
+
deprecated: false
|
|
121
162
|
}],
|
|
122
163
|
["updateAgent", {
|
|
123
164
|
name: "updateAgent",
|
|
124
|
-
description: `Update an existing agent. Send only the fields you want to change
|
|
125
|
-
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_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."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use."},"model":{"type":"string","enum":["nova-3","nova-2"],"description":"The model to use for transcription (required when provider is `deepgram_stream`)."},"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","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. The current catalog is returned by the LLM providers list."},"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.","properties":{"provider":{"type":"string","enum":["eleven_labs","google","cartesia","sarvam"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list."},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`)."},"model":{"type":"string","description":"TTS model identifier. Only consumed when `provider` is\n`cartesia` (e.g. `sonic-3.5`). For ElevenLabs and other\nproviders the model is implied by `voice_id` and this\nfield is ignored.\n"},"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"],"description":"The search provider to use."}}},"post_call_actions":{"type":"object","description":"Side effects that fire once the call ends. Configure email, webhook, or both.","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"}},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload."},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]}}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload."},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload."},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]}}}}}},"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.","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.","properties":{"enabled":{"type":"boolean","description":"Detect voicemail and react 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"]},
|
|
165
|
+
description: `Update an existing agent. Send only the fields you want to change.
|
|
166
|
+
|
|
167
|
+
> **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.
|
|
168
|
+
(Tags: Agents)`,
|
|
169
|
+
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."},"transcriber":{"type":"object","description":"Configuration for the speech-to-text transcriber.","properties":{"provider":{"type":"string","enum":["deepgram_stream","cartesia","sarvam","azure_stream","soniox"],"description":"The speech-to-text provider to use."},"model":{"type":"string","enum":["nova-3","nova-2"],"description":"The model to use for transcription (required when provider is `deepgram_stream`)."},"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","enum":["azure-gpt-4.1-mini","azure-gpt-4.1-nano","azure-gpt-4o","azure-gpt-4o-mini","gemini-2.5-flash","gemini-2.5-flash-lite","gpt-3.5-turbo","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5.1","llama-3.3-70b-versatile"],"description":"The language model to use. The current catalog is returned by the LLM providers list."},"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.","properties":{"provider":{"type":"string","enum":["eleven_labs","google","cartesia","sarvam"],"description":"The voice provider to use. The current catalog is returned by the TTS providers list."},"voice_id":{"type":"string","description":"The provider's voice identifier, returned in the `name` field of the voices list (not the numeric `id`)."},"model":{"type":"string","description":"TTS model identifier. Only consumed when `provider` is\n`cartesia` (e.g. `sonic-3.5`). For ElevenLabs and other\nproviders the model is implied by `voice_id` and this\nfield is ignored.\n"},"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"],"description":"The search provider to use."}}},"post_call_actions":{"type":"object","description":"Side effects that fire once the call ends. Configure email, webhook, or both.","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","description":"Email addresses that should receive the notification.","items":{"type":"string","format":"email"}},"include":{"type":"array","description":"Which sections to include in the email body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the email.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload."},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this action. Omit to\nuse the default (`completed`, `voicemail_detected`).\nPass an explicit list to also include failed calls,\nno-answers, busy signals, etc.\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]}}}},"webhook":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Endpoint that receives a POST with the call payload."},"include":{"type":"array","description":"Which sections to include in the webhook body.","items":{"type":"string","enum":["summary","extracted_variables","fullConversation","sentiment"]}},"extracted_variables":{"type":"array","description":"Variables the model should pull out of the conversation for the webhook.","items":{"type":"object","required":["key","prompt"],"properties":{"key":{"type":"string","description":"Unique identifier for the variable in the post-call payload."},"prompt":{"type":"string","description":"Instruction for the model on what to pull out of the conversation."}}}},"trigger_call_statuses":{"type":"array","description":"Call outcomes that should fire this webhook. Omit to\nuse the default (`completed`, `voicemail_detected`).\n","items":{"type":"string","enum":["completed","voicemail_detected","failed","no_answer","busy","cancelled"]}}}}}},"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.","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"]},
|
|
126
170
|
method: "put",
|
|
127
171
|
pathTemplate: "/agents/{agent_id}",
|
|
128
172
|
executionParameters: [{"name":"agent_id","in":"path"}],
|
|
129
173
|
requestBodyContentType: "application/json",
|
|
130
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
174
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
175
|
+
tags: ["Agents"],
|
|
176
|
+
deprecated: false
|
|
131
177
|
}],
|
|
132
178
|
["deleteAgent", {
|
|
133
179
|
name: "deleteAgent",
|
|
134
|
-
description: `Permanently delete an agent
|
|
180
|
+
description: `Permanently delete an agent.
|
|
181
|
+
(Tags: Agents)`,
|
|
135
182
|
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."}},"required":["agent_id"]},
|
|
136
183
|
method: "delete",
|
|
137
184
|
pathTemplate: "/agents/{agent_id}",
|
|
138
185
|
executionParameters: [{"name":"agent_id","in":"path"}],
|
|
139
186
|
requestBodyContentType: undefined,
|
|
140
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
187
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
188
|
+
tags: ["Agents"],
|
|
189
|
+
deprecated: false
|
|
190
|
+
}],
|
|
191
|
+
["listAgentVersions", {
|
|
192
|
+
name: "listAgentVersions",
|
|
193
|
+
description: `List an agent's saved versions, newest first. Includes manual (named) versions, automatic versions, and system backups taken before a restore.
|
|
194
|
+
(Tags: Agents)`,
|
|
195
|
+
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"pageno":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination."},"pagesize":{"type":"integer","minimum":1,"default":30,"maximum":150,"description":"Number of items per page (max 150)."},"search":{"type":"string","description":"Filter versions whose name matches this substring (case-insensitive)."},"kind":{"type":"string","enum":["manual","auto","system"],"description":"Filter versions by kind."}},"required":["agent_id"]},
|
|
196
|
+
method: "get",
|
|
197
|
+
pathTemplate: "/agents/{agent_id}/versions",
|
|
198
|
+
executionParameters: [{"name":"agent_id","in":"path"},{"name":"pageno","in":"query"},{"name":"pagesize","in":"query"},{"name":"search","in":"query"},{"name":"kind","in":"query"}],
|
|
199
|
+
requestBodyContentType: undefined,
|
|
200
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
201
|
+
tags: ["Agents"],
|
|
202
|
+
deprecated: false
|
|
203
|
+
}],
|
|
204
|
+
["createAgentVersion", {
|
|
205
|
+
name: "createAgentVersion",
|
|
206
|
+
description: `Save the agent's current configuration as a named version.
|
|
207
|
+
(Tags: Agents)`,
|
|
208
|
+
inputSchema: {"type":"object","properties":{"agent_id":{"type":"number","description":"The ID of the agent."},"requestBody":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Display name for the version."},"note":{"type":"string","description":"Optional note describing the version."}},"description":"The JSON request body."}},"required":["agent_id","requestBody"]},
|
|
209
|
+
method: "post",
|
|
210
|
+
pathTemplate: "/agents/{agent_id}/versions",
|
|
211
|
+
executionParameters: [{"name":"agent_id","in":"path"}],
|
|
212
|
+
requestBodyContentType: "application/json",
|
|
213
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
214
|
+
tags: ["Agents"],
|
|
215
|
+
deprecated: false
|
|
216
|
+
}],
|
|
217
|
+
["deleteAgentVersion", {
|
|
218
|
+
name: "deleteAgentVersion",
|
|
219
|
+
description: `Delete a saved version.
|
|
220
|
+
(Tags: Agents)`,
|
|
221
|
+
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."}},"required":["agent_id","version_number"]},
|
|
222
|
+
method: "delete",
|
|
223
|
+
pathTemplate: "/agents/{agent_id}/versions/{version_number}",
|
|
224
|
+
executionParameters: [{"name":"agent_id","in":"path"},{"name":"version_number","in":"path"}],
|
|
225
|
+
requestBodyContentType: undefined,
|
|
226
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
227
|
+
tags: ["Agents"],
|
|
228
|
+
deprecated: false
|
|
229
|
+
}],
|
|
230
|
+
["renameAgentVersion", {
|
|
231
|
+
name: "renameAgentVersion",
|
|
232
|
+
description: `Rename a saved version or edit its note. Version history is immutable otherwise; only the name and note can change.
|
|
233
|
+
(Tags: Agents)`,
|
|
234
|
+
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":{"name":{"type":"string","description":"New display name for the version."},"note":{"type":"string","description":"New note for the version."}},"description":"The JSON request body."}},"required":["agent_id","version_number"]},
|
|
235
|
+
method: "patch",
|
|
236
|
+
pathTemplate: "/agents/{agent_id}/versions/{version_number}",
|
|
237
|
+
executionParameters: [{"name":"agent_id","in":"path"},{"name":"version_number","in":"path"}],
|
|
238
|
+
requestBodyContentType: "application/json",
|
|
239
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
240
|
+
tags: ["Agents"],
|
|
241
|
+
deprecated: false
|
|
242
|
+
}],
|
|
243
|
+
["diffAgentVersion", {
|
|
244
|
+
name: "diffAgentVersion",
|
|
245
|
+
description: `Get a record-level diff for this version. By default it shows what changed in this version compared with the version before it. Use \`against=current\` to compare with the agent's live config (what restoring this version would change), or \`against=<number>\` to compare with another version.
|
|
246
|
+
(Tags: Agents)`,
|
|
247
|
+
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"]},
|
|
248
|
+
method: "get",
|
|
249
|
+
pathTemplate: "/agents/{agent_id}/versions/{version_number}/diff",
|
|
250
|
+
executionParameters: [{"name":"agent_id","in":"path"},{"name":"version_number","in":"path"},{"name":"against","in":"query"}],
|
|
251
|
+
requestBodyContentType: undefined,
|
|
252
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
253
|
+
tags: ["Agents"],
|
|
254
|
+
deprecated: false
|
|
255
|
+
}],
|
|
256
|
+
["restoreAgentVersion", {
|
|
257
|
+
name: "restoreAgentVersion",
|
|
258
|
+
description: `Restore a version onto the live agent. Your current setup is saved first as a backup version, so restoring is undoable. Configuration is brought back; any knowledge files or integrations that were deleted since this version was saved can't be re-linked, and are reported in \`skipped\`.
|
|
259
|
+
(Tags: Agents)`,
|
|
260
|
+
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."}},"required":["agent_id","version_number"]},
|
|
261
|
+
method: "post",
|
|
262
|
+
pathTemplate: "/agents/{agent_id}/versions/{version_number}/restore",
|
|
263
|
+
executionParameters: [{"name":"agent_id","in":"path"},{"name":"version_number","in":"path"}],
|
|
264
|
+
requestBodyContentType: undefined,
|
|
265
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
266
|
+
tags: ["Agents"],
|
|
267
|
+
deprecated: false
|
|
141
268
|
}],
|
|
142
269
|
["dispatchCall", {
|
|
143
270
|
name: "dispatchCall",
|
|
144
271
|
description: `Initiate a call to a phone number using a specified agent. The
|
|
145
272
|
phone number must include a country code with a leading plus.
|
|
146
|
-
|
|
273
|
+
|
|
274
|
+
(Tags: Calls)`,
|
|
147
275
|
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}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
148
276
|
method: "post",
|
|
149
277
|
pathTemplate: "/calls/dispatch",
|
|
150
278
|
executionParameters: [],
|
|
151
279
|
requestBodyContentType: "application/json",
|
|
152
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
280
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
281
|
+
tags: ["Calls"],
|
|
282
|
+
deprecated: false
|
|
153
283
|
}],
|
|
154
284
|
["listCallLogs", {
|
|
155
285
|
name: "listCallLogs",
|
|
156
|
-
description: `Retrieve call logs with pagination and optional filtering
|
|
286
|
+
description: `Retrieve call logs with pagination and optional filtering.
|
|
287
|
+
(Tags: Calls)`,
|
|
157
288
|
inputSchema: {"type":"object","properties":{"pageno":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination."},"pagesize":{"type":"integer","minimum":1,"default":30,"maximum":150,"description":"Number of items per page."},"agentid":{"type":"number","description":"Filter by agent ID."},"call_status":{"type":"string","enum":["completed","busy","failed","no-answer"],"description":"Filter by call outcome."},"bulk_call_id":{"type":"number","description":"Filter by bulk-call campaign ID."}}},
|
|
158
289
|
method: "get",
|
|
159
290
|
pathTemplate: "/calls/logs",
|
|
160
291
|
executionParameters: [{"name":"pageno","in":"query"},{"name":"pagesize","in":"query"},{"name":"agentid","in":"query"},{"name":"call_status","in":"query"},{"name":"bulk_call_id","in":"query"}],
|
|
161
292
|
requestBodyContentType: undefined,
|
|
162
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
293
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
294
|
+
tags: ["Calls"],
|
|
295
|
+
deprecated: false
|
|
163
296
|
}],
|
|
164
297
|
["getCallLog", {
|
|
165
298
|
name: "getCallLog",
|
|
166
|
-
description: `Detailed information about a specific call (duration, status, transcript, sentiment, extracted variables)
|
|
299
|
+
description: `Detailed information about a specific call (duration, status, transcript, sentiment, extracted variables).
|
|
300
|
+
(Tags: Calls)`,
|
|
167
301
|
inputSchema: {"type":"object","properties":{"call_log_id":{"type":"number","description":"Id of the call log, as returned by the call log list."}},"required":["call_log_id"]},
|
|
168
302
|
method: "get",
|
|
169
303
|
pathTemplate: "/calls/logs/{call_log_id}",
|
|
170
304
|
executionParameters: [{"name":"call_log_id","in":"path"}],
|
|
171
305
|
requestBodyContentType: undefined,
|
|
172
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
306
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
307
|
+
tags: ["Calls"],
|
|
308
|
+
deprecated: false
|
|
173
309
|
}],
|
|
174
310
|
["fetchBulkCalls", {
|
|
175
311
|
name: "fetchBulkCalls",
|
|
176
|
-
description: `List bulk-call campaigns with pagination and optional status filter
|
|
312
|
+
description: `List bulk-call campaigns with pagination and optional status filter.
|
|
313
|
+
(Tags: Bulk calls)`,
|
|
177
314
|
inputSchema: {"type":"object","properties":{"pageno":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination."},"pagesize":{"type":"integer","minimum":1,"default":10,"maximum":150,"description":"Items per page (max 150)."},"status":{"type":"string","description":"Filter by status (e.g. completed)."}}},
|
|
178
315
|
method: "get",
|
|
179
316
|
pathTemplate: "/calls/bulk_call",
|
|
180
317
|
executionParameters: [{"name":"pageno","in":"query"},{"name":"pagesize","in":"query"},{"name":"status","in":"query"}],
|
|
181
318
|
requestBodyContentType: undefined,
|
|
182
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
319
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
320
|
+
tags: ["Bulk calls"],
|
|
321
|
+
deprecated: false
|
|
183
322
|
}],
|
|
184
323
|
["createBulkCall", {
|
|
185
324
|
name: "createBulkCall",
|
|
@@ -196,13 +335,16 @@ There are two kinds of campaign:
|
|
|
196
335
|
campaign empty and feed it from a CRM, form, or automation. A
|
|
197
336
|
dynamic campaign stays alive waiting for contacts instead of
|
|
198
337
|
completing when its queue drains.
|
|
199
|
-
|
|
338
|
+
|
|
339
|
+
(Tags: Bulk calls)`,
|
|
200
340
|
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":"Your phone number id to use for making calls."},"is_dynamic":{"type":"boolean","default":false,"description":"Set to `true` to create a dynamic campaign that accepts\ncontacts in real time via the Add contact to dynamic\ncampaign webhook. When `true`, `contact_list` is optional\nand may be omitted to start the campaign empty.\n"},"contact_list":{"type":"array","description":"Array of contact objects. Each row needs `phone_number`.\nAny other key you add on the row (e.g. `customer_name`,\n`account_id`, `priority`) is passed to the agent as a\ncontext variable for that specific call, so the agent\ncan reference it during the conversation.\n\nRequired for static campaigns. Optional when `is_dynamic`\nis `true` (you can omit it and add contacts later via the\nwebhook).\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":0,"minimum":0,"maximum":5,"description":"Maximum number of retry attempts (0–5)."}}}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
201
341
|
method: "post",
|
|
202
342
|
pathTemplate: "/calls/bulk_call/create",
|
|
203
343
|
executionParameters: [],
|
|
204
344
|
requestBodyContentType: "application/json",
|
|
205
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
345
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
346
|
+
tags: ["Bulk calls"],
|
|
347
|
+
deprecated: false
|
|
206
348
|
}],
|
|
207
349
|
["addBulkCallContact", {
|
|
208
350
|
name: "addBulkCallContact",
|
|
@@ -213,236 +355,305 @@ for contacts, so this webhook is how you feed them from a CRM,
|
|
|
213
355
|
form, or automation platform. The contact is queued immediately,
|
|
214
356
|
and the campaign starts calling it as soon as it is within
|
|
215
357
|
operating hours.
|
|
216
|
-
|
|
358
|
+
|
|
359
|
+
(Tags: Bulk calls)`,
|
|
217
360
|
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}},"description":"The JSON request body."}},"required":["campaign_id","requestBody"]},
|
|
218
361
|
method: "post",
|
|
219
362
|
pathTemplate: "/calls/bulk_call/{campaign_id}/add_contact",
|
|
220
363
|
executionParameters: [{"name":"campaign_id","in":"path"}],
|
|
221
364
|
requestBodyContentType: "application/json",
|
|
222
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
365
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
366
|
+
tags: ["Bulk calls"],
|
|
367
|
+
deprecated: false
|
|
223
368
|
}],
|
|
224
369
|
["getBulkCall", {
|
|
225
370
|
name: "getBulkCall",
|
|
226
|
-
description: `Get detailed information about a bulk-call campaign
|
|
371
|
+
description: `Get detailed information about a bulk-call campaign.
|
|
372
|
+
(Tags: Bulk calls)`,
|
|
227
373
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."}},"required":["bulk_call_id"]},
|
|
228
374
|
method: "get",
|
|
229
375
|
pathTemplate: "/calls/bulk_call/{bulk_call_id}",
|
|
230
376
|
executionParameters: [{"name":"bulk_call_id","in":"path"}],
|
|
231
377
|
requestBodyContentType: undefined,
|
|
232
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
378
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
379
|
+
tags: ["Bulk calls"],
|
|
380
|
+
deprecated: false
|
|
233
381
|
}],
|
|
234
382
|
["bulkCallActions", {
|
|
235
383
|
name: "bulkCallActions",
|
|
236
|
-
description: `Pause, resume, or reschedule a running campaign
|
|
384
|
+
description: `Pause, resume, or reschedule a running campaign.
|
|
385
|
+
(Tags: Bulk calls)`,
|
|
237
386
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."},"requestBody":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["pause","resume","reschedule"],"description":"What to do with the campaign."},"new_scheduled_datetime":{"type":"string","description":"New start time for `reschedule`. Format `YYYY-MM-DD HH:MM:SS`."},"new_timezone":{"type":"string","description":"IANA timezone for `reschedule`."}},"description":"The JSON request body."}},"required":["bulk_call_id","requestBody"]},
|
|
238
387
|
method: "put",
|
|
239
388
|
pathTemplate: "/calls/bulk_call/{bulk_call_id}",
|
|
240
389
|
executionParameters: [{"name":"bulk_call_id","in":"path"}],
|
|
241
390
|
requestBodyContentType: "application/json",
|
|
242
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
391
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
392
|
+
tags: ["Bulk calls"],
|
|
393
|
+
deprecated: false
|
|
243
394
|
}],
|
|
244
395
|
["cancelBulkCall", {
|
|
245
396
|
name: "cancelBulkCall",
|
|
246
|
-
description: `Cancel a bulk-call campaign
|
|
397
|
+
description: `Cancel a bulk-call campaign.
|
|
398
|
+
(Tags: Bulk calls)`,
|
|
247
399
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."}},"required":["bulk_call_id"]},
|
|
248
400
|
method: "delete",
|
|
249
401
|
pathTemplate: "/calls/bulk_call/{bulk_call_id}",
|
|
250
402
|
executionParameters: [{"name":"bulk_call_id","in":"path"}],
|
|
251
403
|
requestBodyContentType: undefined,
|
|
252
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
404
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
405
|
+
tags: ["Bulk calls"],
|
|
406
|
+
deprecated: false
|
|
253
407
|
}],
|
|
254
408
|
["getBulkCallLiveStatus", {
|
|
255
409
|
name: "getBulkCallLiveStatus",
|
|
256
|
-
description: `Real-time status of a running bulk-call campaign
|
|
410
|
+
description: `Real-time status of a running bulk-call campaign.
|
|
411
|
+
(Tags: Bulk calls)`,
|
|
257
412
|
inputSchema: {"type":"object","properties":{"bulk_call_id":{"type":"number","description":"Id of the bulk call campaign."}},"required":["bulk_call_id"]},
|
|
258
413
|
method: "get",
|
|
259
414
|
pathTemplate: "/bulk-call/{bulk_call_id}/live-status",
|
|
260
415
|
executionParameters: [{"name":"bulk_call_id","in":"path"}],
|
|
261
416
|
requestBodyContentType: undefined,
|
|
262
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
417
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
418
|
+
tags: ["Bulk calls"],
|
|
419
|
+
deprecated: false
|
|
263
420
|
}],
|
|
264
421
|
["listKnowledgeBaseFiles", {
|
|
265
422
|
name: "listKnowledgeBaseFiles",
|
|
266
|
-
description: `List all knowledge-base files for the authenticated user
|
|
423
|
+
description: `List all knowledge-base files for the authenticated user.
|
|
424
|
+
(Tags: Knowledge base)`,
|
|
267
425
|
inputSchema: {"type":"object","properties":{}},
|
|
268
426
|
method: "get",
|
|
269
427
|
pathTemplate: "/knowledge_base/list",
|
|
270
428
|
executionParameters: [],
|
|
271
429
|
requestBodyContentType: undefined,
|
|
272
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
430
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
431
|
+
tags: ["Knowledge base"],
|
|
432
|
+
deprecated: false
|
|
273
433
|
}],
|
|
274
434
|
["canUploadFile", {
|
|
275
435
|
name: "canUploadFile",
|
|
276
|
-
description: `Check whether a file can be uploaded based on size and type
|
|
436
|
+
description: `Check whether a file can be uploaded based on size and type.
|
|
437
|
+
(Tags: Knowledge base)`,
|
|
277
438
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["file_size","file_type"],"properties":{"file_size":{"type":"number","minimum":1,"description":"Size in bytes."},"file_type":{"type":"string","description":"File extension. Only `pdf` is accepted."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
278
439
|
method: "post",
|
|
279
440
|
pathTemplate: "/knowledge_base/can_upload",
|
|
280
441
|
executionParameters: [],
|
|
281
442
|
requestBodyContentType: "application/json",
|
|
282
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
443
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
444
|
+
tags: ["Knowledge base"],
|
|
445
|
+
deprecated: false
|
|
283
446
|
}],
|
|
284
447
|
["uploadKnowledgeBaseFile", {
|
|
285
448
|
name: "uploadKnowledgeBaseFile",
|
|
286
|
-
description: `Upload a PDF file. The file content must be Base64 encoded
|
|
449
|
+
description: `Upload a PDF file. The file content must be Base64 encoded.
|
|
450
|
+
(Tags: Knowledge base)`,
|
|
287
451
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["file","filename"],"properties":{"file":{"type":"string","description":"Base64-encoded file content."},"filename":{"type":"string","description":"Filename including the `.pdf` extension."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
288
452
|
method: "post",
|
|
289
453
|
pathTemplate: "/knowledge_base/create",
|
|
290
454
|
executionParameters: [],
|
|
291
455
|
requestBodyContentType: "application/json",
|
|
292
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
456
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
457
|
+
tags: ["Knowledge base"],
|
|
458
|
+
deprecated: false
|
|
293
459
|
}],
|
|
294
460
|
["attachKnowledgeBaseFiles", {
|
|
295
461
|
name: "attachKnowledgeBaseFiles",
|
|
296
|
-
description: `Attach multiple knowledge-base files to an agent
|
|
462
|
+
description: `Attach multiple knowledge-base files to an agent.
|
|
463
|
+
(Tags: Knowledge base)`,
|
|
297
464
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["file_ids","agent_id"],"properties":{"file_ids":{"type":"array","minItems":1,"items":{"type":"number"},"description":"List of knowledge-base file IDs to attach."},"agent_id":{"type":"number","description":"ID of the agent to attach files to."},"when_to_use":{"type":"string","description":"Instruction to the agent on when to consult these files."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
298
465
|
method: "post",
|
|
299
466
|
pathTemplate: "/knowledge_base/attach",
|
|
300
467
|
executionParameters: [],
|
|
301
468
|
requestBodyContentType: "application/json",
|
|
302
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
469
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
470
|
+
tags: ["Knowledge base"],
|
|
471
|
+
deprecated: false
|
|
303
472
|
}],
|
|
304
473
|
["detachKnowledgeBaseFiles", {
|
|
305
474
|
name: "detachKnowledgeBaseFiles",
|
|
306
|
-
description: `Detach multiple knowledge-base files from an agent
|
|
475
|
+
description: `Detach multiple knowledge-base files from an agent.
|
|
476
|
+
(Tags: Knowledge base)`,
|
|
307
477
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["file_ids","agent_id"],"properties":{"file_ids":{"type":"array","minItems":1,"items":{"type":"number"},"description":"List of knowledge-base file IDs to detach."},"agent_id":{"type":"number","description":"ID of the agent to detach files from."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
308
478
|
method: "post",
|
|
309
479
|
pathTemplate: "/knowledge_base/detach",
|
|
310
480
|
executionParameters: [],
|
|
311
481
|
requestBodyContentType: "application/json",
|
|
312
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
482
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
483
|
+
tags: ["Knowledge base"],
|
|
484
|
+
deprecated: false
|
|
313
485
|
}],
|
|
314
486
|
["deleteKnowledgeBaseFile", {
|
|
315
487
|
name: "deleteKnowledgeBaseFile",
|
|
316
|
-
description: `Permanently delete a file. Removes it from any attached agents. Cannot be undone
|
|
488
|
+
description: `Permanently delete a file. Removes it from any attached agents. Cannot be undone.
|
|
489
|
+
(Tags: Knowledge base)`,
|
|
317
490
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["file_id"],"properties":{"file_id":{"type":"number","description":"ID of the file to delete."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
318
491
|
method: "post",
|
|
319
492
|
pathTemplate: "/knowledge_base/delete",
|
|
320
493
|
executionParameters: [],
|
|
321
494
|
requestBodyContentType: "application/json",
|
|
322
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
495
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
496
|
+
tags: ["Knowledge base"],
|
|
497
|
+
deprecated: false
|
|
323
498
|
}],
|
|
324
499
|
["listPhoneNumbers", {
|
|
325
500
|
name: "listPhoneNumbers",
|
|
326
|
-
description: `Retrieve all phone numbers associated with your account
|
|
501
|
+
description: `Retrieve all phone numbers associated with your account.
|
|
502
|
+
(Tags: Phone numbers)`,
|
|
327
503
|
inputSchema: {"type":"object","properties":{"pageno":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination."},"pagesize":{"type":"integer","minimum":1,"default":30,"maximum":150,"description":"Items per page (max 150)."}}},
|
|
328
504
|
method: "get",
|
|
329
505
|
pathTemplate: "/phone_number/list",
|
|
330
506
|
executionParameters: [{"name":"pageno","in":"query"},{"name":"pagesize","in":"query"}],
|
|
331
507
|
requestBodyContentType: undefined,
|
|
332
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
508
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
509
|
+
tags: ["Phone numbers"],
|
|
510
|
+
deprecated: false
|
|
333
511
|
}],
|
|
334
512
|
["attachPhoneNumber", {
|
|
335
513
|
name: "attachPhoneNumber",
|
|
336
|
-
description: `Attach an account-owned phone number to an existing agent
|
|
514
|
+
description: `Attach an account-owned phone number to an existing agent.
|
|
515
|
+
(Tags: Phone numbers)`,
|
|
337
516
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["phone_number_id","agent_id"],"properties":{"phone_number_id":{"type":"number","description":"ID of the phone number to attach."},"agent_id":{"type":"number","description":"ID of the agent to attach the phone number to."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
338
517
|
method: "post",
|
|
339
518
|
pathTemplate: "/phone_number/attach",
|
|
340
519
|
executionParameters: [],
|
|
341
520
|
requestBodyContentType: "application/json",
|
|
342
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
521
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
522
|
+
tags: ["Phone numbers"],
|
|
523
|
+
deprecated: false
|
|
343
524
|
}],
|
|
344
525
|
["detachPhoneNumber", {
|
|
345
526
|
name: "detachPhoneNumber",
|
|
346
|
-
description: `Detach a phone number from its associated agent
|
|
527
|
+
description: `Detach a phone number from its associated agent.
|
|
528
|
+
(Tags: Phone numbers)`,
|
|
347
529
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["phone_number_id"],"properties":{"phone_number_id":{"type":"number","description":"ID of the phone number to detach."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
348
530
|
method: "post",
|
|
349
531
|
pathTemplate: "/phone_number/detach",
|
|
350
532
|
executionParameters: [],
|
|
351
533
|
requestBodyContentType: "application/json",
|
|
352
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
534
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
535
|
+
tags: ["Phone numbers"],
|
|
536
|
+
deprecated: false
|
|
353
537
|
}],
|
|
354
538
|
["importTwilioNumber", {
|
|
355
539
|
name: "importTwilioNumber",
|
|
356
|
-
description: `Import an existing Twilio number by providing your Twilio credentials
|
|
540
|
+
description: `Import an existing Twilio number by providing your Twilio credentials.
|
|
541
|
+
(Tags: Phone numbers)`,
|
|
357
542
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["phone_number","account_sid","account_token"],"properties":{"phone_number":{"type":"string","description":"Phone number in E.164 format (starting with `+`)."},"account_sid":{"type":"string","description":"Your Twilio account SID."},"account_token":{"type":"string","description":"Your Twilio auth token."},"name":{"type":"string","description":"Optional friendly name for the imported number."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
358
543
|
method: "post",
|
|
359
544
|
pathTemplate: "/phone_number/import/twilio",
|
|
360
545
|
executionParameters: [],
|
|
361
546
|
requestBodyContentType: "application/json",
|
|
362
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
547
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
548
|
+
tags: ["Phone numbers"],
|
|
549
|
+
deprecated: false
|
|
363
550
|
}],
|
|
364
551
|
["importExotelNumber", {
|
|
365
552
|
name: "importExotelNumber",
|
|
366
|
-
description: `Import an Exotel number by providing your Exotel credentials
|
|
553
|
+
description: `Import an Exotel number by providing your Exotel credentials.
|
|
554
|
+
(Tags: Phone numbers)`,
|
|
367
555
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["exotel_phone_number","exotel_api_key","exotel_api_token","exotel_subdomain","exotel_account_sid","exotel_app_id"],"properties":{"exotel_phone_number":{"type":"string","description":"Exotel phone number in E.164 format."},"exotel_api_key":{"type":"string","description":"Your Exotel API key."},"exotel_api_token":{"type":"string","description":"Your Exotel API token."},"exotel_subdomain":{"type":"string","description":"Your Exotel subdomain (e.g. `your-account.in.exotel.com`)."},"exotel_account_sid":{"type":"string","description":"Your Exotel account SID."},"exotel_app_id":{"type":"string","description":"The Exotel App ID configured for the bot."},"name":{"type":"string","description":"Optional friendly name for the imported number."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
368
556
|
method: "post",
|
|
369
557
|
pathTemplate: "/phone_number/import/exotel",
|
|
370
558
|
executionParameters: [],
|
|
371
559
|
requestBodyContentType: "application/json",
|
|
372
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
560
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
561
|
+
tags: ["Phone numbers"],
|
|
562
|
+
deprecated: false
|
|
373
563
|
}],
|
|
374
564
|
["importSipTrunk", {
|
|
375
565
|
name: "importSipTrunk",
|
|
376
|
-
description: `Import a phone number associated with a SIP trunk
|
|
566
|
+
description: `Import a phone number associated with a SIP trunk.
|
|
567
|
+
(Tags: Phone numbers)`,
|
|
377
568
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["phone_number","sip_host","sip_trunk_name"],"properties":{"phone_number":{"type":"string","description":"Phone number in E.164 format (starting with `+`)."},"sip_host":{"type":"string","description":"SIP server hostname or IP."},"sip_trunk_name":{"type":"string","description":"Name for this SIP trunk (must be unique within your account)."},"name":{"type":"string","description":"Optional friendly name for the imported number."},"sip_port":{"type":"number","default":5060,"description":"SIP server port."},"sip_username":{"type":"string","description":"SIP authentication username."},"sip_password":{"type":"string","format":"password","description":"SIP authentication password."},"sip_dial_prefix":{"type":"string","description":"Optional prefix to prepend before the destination number when dialing (e.g. to strip the country code)."},"sip_strip_plus":{"type":"boolean","description":"When true, strips the leading `+` from the dialed number."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
378
569
|
method: "post",
|
|
379
570
|
pathTemplate: "/phone_number/import/sip",
|
|
380
571
|
executionParameters: [],
|
|
381
572
|
requestBodyContentType: "application/json",
|
|
382
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
573
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
574
|
+
tags: ["Phone numbers"],
|
|
575
|
+
deprecated: false
|
|
383
576
|
}],
|
|
384
577
|
["listLLMProviders", {
|
|
385
578
|
name: "listLLMProviders",
|
|
386
|
-
description: `Retrieve all available Large Language Model providers
|
|
579
|
+
description: `Retrieve all available Large Language Model providers.
|
|
580
|
+
(Tags: Providers)`,
|
|
387
581
|
inputSchema: {"type":"object","properties":{}},
|
|
388
582
|
method: "get",
|
|
389
583
|
pathTemplate: "/providers/llms",
|
|
390
584
|
executionParameters: [],
|
|
391
585
|
requestBodyContentType: undefined,
|
|
392
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
586
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
587
|
+
tags: ["Providers"],
|
|
588
|
+
deprecated: false
|
|
393
589
|
}],
|
|
394
590
|
["listVoices", {
|
|
395
591
|
name: "listVoices",
|
|
396
592
|
description: `Retrieve voices with filtering and pagination support. ElevenLabs
|
|
397
593
|
supports advanced filtering by name, language, accent, and gender.
|
|
398
594
|
Other providers support basic pagination only.
|
|
399
|
-
|
|
595
|
+
|
|
596
|
+
(Tags: Providers)`,
|
|
400
597
|
inputSchema: {"type":"object","properties":{"provider":{"type":"string","enum":["eleven_labs","google","deepgram","cartesia","sarvam"],"description":"TTS provider to list voices from. Omit to list across all providers."},"search":{"type":"string","description":"Substring match against voice name or description. ElevenLabs only."},"language":{"type":"string","description":"ISO language code (e.g. `en`, `hi`, `es`). ElevenLabs only."},"accent":{"type":"string","description":"Accent label (e.g. `american`, `british`). ElevenLabs only."},"gender":{"type":"string","enum":["male","female"],"description":"Filter voices by gender. ElevenLabs only."},"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."}}},
|
|
401
598
|
method: "get",
|
|
402
599
|
pathTemplate: "/providers/voices",
|
|
403
600
|
executionParameters: [{"name":"provider","in":"query"},{"name":"search","in":"query"},{"name":"language","in":"query"},{"name":"accent","in":"query"},{"name":"gender","in":"query"},{"name":"page","in":"query"},{"name":"page_size","in":"query"}],
|
|
404
601
|
requestBodyContentType: undefined,
|
|
405
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
602
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
603
|
+
tags: ["Providers"],
|
|
604
|
+
deprecated: false
|
|
406
605
|
}],
|
|
407
606
|
["listSTTProviders", {
|
|
408
607
|
name: "listSTTProviders",
|
|
409
|
-
description: `Retrieve all Speech-to-Text providers
|
|
608
|
+
description: `Retrieve all Speech-to-Text providers.
|
|
609
|
+
(Tags: Providers)`,
|
|
410
610
|
inputSchema: {"type":"object","properties":{}},
|
|
411
611
|
method: "get",
|
|
412
612
|
pathTemplate: "/providers/stt",
|
|
413
613
|
executionParameters: [],
|
|
414
614
|
requestBodyContentType: undefined,
|
|
415
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
615
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
616
|
+
tags: ["Providers"],
|
|
617
|
+
deprecated: false
|
|
416
618
|
}],
|
|
417
619
|
["listTTSProviders", {
|
|
418
620
|
name: "listTTSProviders",
|
|
419
|
-
description: `Retrieve all Text-to-Speech providers
|
|
621
|
+
description: `Retrieve all Text-to-Speech providers.
|
|
622
|
+
(Tags: Providers)`,
|
|
420
623
|
inputSchema: {"type":"object","properties":{}},
|
|
421
624
|
method: "get",
|
|
422
625
|
pathTemplate: "/providers/tts",
|
|
423
626
|
executionParameters: [],
|
|
424
627
|
requestBodyContentType: undefined,
|
|
425
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
628
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
629
|
+
tags: ["Providers"],
|
|
630
|
+
deprecated: false
|
|
426
631
|
}],
|
|
427
632
|
["listAllProviders", {
|
|
428
633
|
name: "listAllProviders",
|
|
429
|
-
description: `Comprehensive response with services and voices in one payload
|
|
634
|
+
description: `Comprehensive response with services and voices in one payload.
|
|
635
|
+
(Tags: Providers)`,
|
|
430
636
|
inputSchema: {"type":"object","properties":{}},
|
|
431
637
|
method: "get",
|
|
432
638
|
pathTemplate: "/providers/all",
|
|
433
639
|
executionParameters: [],
|
|
434
640
|
requestBodyContentType: undefined,
|
|
435
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
641
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
642
|
+
tags: ["Providers"],
|
|
643
|
+
deprecated: false
|
|
436
644
|
}],
|
|
437
645
|
["getVoice", {
|
|
438
646
|
name: "getVoice",
|
|
439
|
-
description: `Detailed metadata for a specific voice
|
|
647
|
+
description: `Detailed metadata for a specific voice.
|
|
648
|
+
(Tags: Providers)`,
|
|
440
649
|
inputSchema: {"type":"object","properties":{"voice_id":{"type":"number","description":"Numeric id of the voice, as returned in the `id` field of the voices list."}},"required":["voice_id"]},
|
|
441
650
|
method: "get",
|
|
442
651
|
pathTemplate: "/providers/voice/{voice_id}",
|
|
443
652
|
executionParameters: [{"name":"voice_id","in":"path"}],
|
|
444
653
|
requestBodyContentType: undefined,
|
|
445
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
654
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
655
|
+
tags: ["Providers"],
|
|
656
|
+
deprecated: false
|
|
446
657
|
}],
|
|
447
658
|
["listChildOrganizations", {
|
|
448
659
|
name: "listChildOrganizations",
|
|
@@ -450,51 +661,63 @@ Other providers support basic pagination only.
|
|
|
450
661
|
account. Returns each organization's balance, cost-per-minute
|
|
451
662
|
rate, and concurrency limit, plus the dashboard menu access
|
|
452
663
|
flags scoped to your reseller's permissions for every user.
|
|
453
|
-
|
|
664
|
+
|
|
665
|
+
(Tags: Reseller)`,
|
|
454
666
|
inputSchema: {"type":"object","properties":{}},
|
|
455
667
|
method: "get",
|
|
456
668
|
pathTemplate: "/reseller/organizations",
|
|
457
669
|
executionParameters: [],
|
|
458
670
|
requestBodyContentType: undefined,
|
|
459
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
671
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
672
|
+
tags: ["Reseller"],
|
|
673
|
+
deprecated: false
|
|
460
674
|
}],
|
|
461
675
|
["addUser", {
|
|
462
676
|
name: "addUser",
|
|
463
677
|
description: `Create a new child user and organization under the reseller.
|
|
464
678
|
The new organization is linked to your reseller account
|
|
465
679
|
automatically.
|
|
466
|
-
|
|
680
|
+
|
|
681
|
+
(Tags: Reseller)`,
|
|
467
682
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["name","email","phone","password"],"properties":{"name":{"type":"string","description":"Full name of the new user."},"email":{"type":"string","format":"email","description":"Email address. Also used as the login."},"phone":{"type":"string","description":"Phone number including country code (e.g. `+15551234567`)."},"password":{"type":"string","format":"password","description":"Account password for the new user."},"welcome_minutes_to_credit":{"type":"number","description":"Minutes to credit to the new account on signup."},"cost_per_min":{"type":"number","description":"Cost per minute charged to this user (e.g. `0.20`). Must be at least the reseller's premium model rate."},"concurrent_call_limit":{"type":"number","description":"Maximum number of concurrent calls allowed for this account."},"expiry_date":{"type":"string","format":"date","description":"Account expiry date in `YYYY-MM-DD` format (e.g. `2026-12-31`)."},"user_currency":{"type":"string","description":"ISO 4217 currency code for the account (e.g. `USD`, `INR`). Defaults to the reseller's currency."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
468
683
|
method: "post",
|
|
469
684
|
pathTemplate: "/reseller/users/add",
|
|
470
685
|
executionParameters: [],
|
|
471
686
|
requestBodyContentType: "application/json",
|
|
472
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
687
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
688
|
+
tags: ["Reseller"],
|
|
689
|
+
deprecated: false
|
|
473
690
|
}],
|
|
474
691
|
["setUserAccessControl", {
|
|
475
692
|
name: "setUserAccessControl",
|
|
476
693
|
description: `Enable or disable dashboard menu access flags for a child user.
|
|
477
694
|
Only the flags you pass are changed. Flags outside your
|
|
478
695
|
reseller's permissions are silently ignored.
|
|
479
|
-
|
|
696
|
+
|
|
697
|
+
(Tags: Reseller)`,
|
|
480
698
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["user_id","dashboard_menu_access"],"properties":{"user_id":{"type":"number","description":"ID of the child user to update."},"dashboard_menu_access":{"allOf":[{"type":"object","description":"Reseller-managed dashboard menu access flags. Each property is\na boolean toggle for a feature area in the child user's\ndashboard. On read endpoints, only flags the reseller\nthemselves has enabled are returned (so a child cannot have a\nflag the reseller doesn't have).\n","properties":{"is_bots_menu_access":{"type":"boolean"},"is_leads_access":{"type":"boolean"},"is_voice_cloning_access":{"type":"boolean"},"is_workflow_access":{"type":"boolean"},"is_asr_evaluation_menu_access":{"type":"boolean"},"is_train_with_call_recording_menu_access":{"type":"boolean"},"is_call_logs_menu_access":{"type":"boolean"},"is_call_simulation_menu_access":{"type":"boolean"},"is_omni_crm_access":{"type":"boolean"},"access_to_monitor_live_call":{"type":"boolean"},"is_whatsapp_flow_enabled":{"type":"boolean"},"is_billing_menu_access":{"type":"boolean"},"is_knowledge_base_access":{"type":"boolean"},"is_integration_access":{"type":"boolean"},"is_phone_number_access":{"type":"boolean"},"is_bulk_call_access":{"type":"boolean"},"is_analytics_access":{"type":"boolean"}}}],"description":"Flags to update. Only pass the flags you want to\nchange. Others are left untouched. Flags outside\nyour reseller's permissions are silently dropped.\n"}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
481
699
|
method: "post",
|
|
482
700
|
pathTemplate: "/reseller/users/access-control",
|
|
483
701
|
executionParameters: [],
|
|
484
702
|
requestBodyContentType: "application/json",
|
|
485
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
703
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
704
|
+
tags: ["Reseller"],
|
|
705
|
+
deprecated: false
|
|
486
706
|
}],
|
|
487
707
|
["setUserExpiry", {
|
|
488
708
|
name: "setUserExpiry",
|
|
489
709
|
description: `Set or remove the expiry date on a child user. The user must
|
|
490
710
|
belong to a child organization of your reseller.
|
|
491
|
-
|
|
711
|
+
|
|
712
|
+
(Tags: Reseller)`,
|
|
492
713
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"number","description":"ID of the child user to update."},"expiry_date":{"type":["string","null"],"format":"date","description":"Expiry date in `YYYY-MM-DD` format. Omit or pass `null` to remove the expiry."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
493
714
|
method: "post",
|
|
494
715
|
pathTemplate: "/reseller/users/expiry",
|
|
495
716
|
executionParameters: [],
|
|
496
717
|
requestBodyContentType: "application/json",
|
|
497
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
718
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
719
|
+
tags: ["Reseller"],
|
|
720
|
+
deprecated: false
|
|
498
721
|
}],
|
|
499
722
|
["setChildConcurrency", {
|
|
500
723
|
name: "setChildConcurrency",
|
|
@@ -503,13 +726,16 @@ organization can run. Slots come from the reseller's shared
|
|
|
503
726
|
pool. Increasing the limit deducts the delta from your pool
|
|
504
727
|
and fails if you don't have enough slots. Decreasing the
|
|
505
728
|
limit returns the delta to your pool immediately.
|
|
506
|
-
|
|
729
|
+
|
|
730
|
+
(Tags: Reseller)`,
|
|
507
731
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["child_organization_id","new_limit"],"properties":{"child_organization_id":{"type":"number","description":"ID of the child organization to update."},"new_limit":{"type":"number","description":"The desired absolute concurrent call limit (must be `>= 0`)."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
508
732
|
method: "post",
|
|
509
733
|
pathTemplate: "/reseller/concurrency",
|
|
510
734
|
executionParameters: [],
|
|
511
735
|
requestBodyContentType: "application/json",
|
|
512
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
736
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
737
|
+
tags: ["Reseller"],
|
|
738
|
+
deprecated: false
|
|
513
739
|
}],
|
|
514
740
|
["calculateCreditOperation", {
|
|
515
741
|
name: "calculateCreditOperation",
|
|
@@ -517,13 +743,16 @@ limit returns the delta to your pool immediately.
|
|
|
517
743
|
credits. Use this to confirm amounts before calling the
|
|
518
744
|
transfer or revert endpoints. The response shape differs
|
|
519
745
|
between forward transfers and reverts. See the examples.
|
|
520
|
-
|
|
746
|
+
|
|
747
|
+
(Tags: Reseller)`,
|
|
521
748
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["minutes"],"properties":{"minutes":{"type":"number","description":"Number of minutes to calculate for."},"cost_per_min":{"type":"number","description":"Rate per minute for a forward transfer (e.g. `0.20`). Not required when `is_revert` is `true`."},"is_revert":{"type":"boolean","description":"Set to `true` to calculate a revert instead of a forward transfer.","default":false},"child_organization_id":{"type":"number","description":"ID of the child organization to revert credits from. Required when `is_revert` is `true`."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
522
749
|
method: "post",
|
|
523
750
|
pathTemplate: "/reseller/credits/calculate",
|
|
524
751
|
executionParameters: [],
|
|
525
752
|
requestBodyContentType: "application/json",
|
|
526
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
753
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
754
|
+
tags: ["Reseller"],
|
|
755
|
+
deprecated: false
|
|
527
756
|
}],
|
|
528
757
|
["transferCreditsToChild", {
|
|
529
758
|
name: "transferCreditsToChild",
|
|
@@ -532,13 +761,16 @@ organization. Credits are deducted from your balance
|
|
|
532
761
|
immediately on success. The target organization must be a
|
|
533
762
|
direct child of your reseller. Use the calculate endpoint
|
|
534
763
|
first to preview the cost.
|
|
535
|
-
|
|
764
|
+
|
|
765
|
+
(Tags: Reseller)`,
|
|
536
766
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["to_organization_id","minutes","cost_per_min"],"properties":{"to_organization_id":{"type":"number","description":"ID of the child organization to transfer credits to."},"minutes":{"type":"number","description":"Number of minutes to transfer."},"cost_per_min":{"type":"number","description":"Rate per minute to charge the child organization (e.g. `0.20`)."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
537
767
|
method: "post",
|
|
538
768
|
pathTemplate: "/reseller/credits/transfer",
|
|
539
769
|
executionParameters: [],
|
|
540
770
|
requestBodyContentType: "application/json",
|
|
541
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
771
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
772
|
+
tags: ["Reseller"],
|
|
773
|
+
deprecated: false
|
|
542
774
|
}],
|
|
543
775
|
["revertCreditsFromChild", {
|
|
544
776
|
name: "revertCreditsFromChild",
|
|
@@ -547,26 +779,32 @@ reseller balance. The refund is calculated at the child's
|
|
|
547
779
|
current rate, so you don't pass one. This matches exactly
|
|
548
780
|
what was originally charged. Use the calculate endpoint
|
|
549
781
|
first to preview the refund.
|
|
550
|
-
|
|
782
|
+
|
|
783
|
+
(Tags: Reseller)`,
|
|
551
784
|
inputSchema: {"type":"object","properties":{"requestBody":{"type":"object","required":["from_organization_id","minutes"],"properties":{"from_organization_id":{"type":"number","description":"ID of the child organization to revert credits from."},"minutes":{"type":"number","description":"Number of minutes to revert."}},"description":"The JSON request body."}},"required":["requestBody"]},
|
|
552
785
|
method: "post",
|
|
553
786
|
pathTemplate: "/reseller/credits/revert",
|
|
554
787
|
executionParameters: [],
|
|
555
788
|
requestBodyContentType: "application/json",
|
|
556
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
789
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
790
|
+
tags: ["Reseller"],
|
|
791
|
+
deprecated: false
|
|
557
792
|
}],
|
|
558
793
|
["getResellerCreditLogs", {
|
|
559
794
|
name: "getResellerCreditLogs",
|
|
560
795
|
description: `Paginated history of all credit transfers and reverts for the
|
|
561
796
|
reseller account. Returns reverse-chronological order by
|
|
562
797
|
default. Date filters are inclusive.
|
|
563
|
-
|
|
798
|
+
|
|
799
|
+
(Tags: Reseller)`,
|
|
564
800
|
inputSchema: {"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination."},"page_size":{"type":"number","default":20,"description":"Number of records per page (max 100)."},"date_from":{"type":"string","format":"date","description":"Filter logs from this date in `YYYY-MM-DD` format (e.g. `2026-01-01`)."},"date_to":{"type":"string","format":"date","description":"Filter logs up to and including this date in `YYYY-MM-DD` format (e.g. `2026-03-31`)."}}},
|
|
565
801
|
method: "get",
|
|
566
802
|
pathTemplate: "/reseller/credits/logs",
|
|
567
803
|
executionParameters: [{"name":"page","in":"query"},{"name":"page_size","in":"query"},{"name":"date_from","in":"query"},{"name":"date_to","in":"query"}],
|
|
568
804
|
requestBodyContentType: undefined,
|
|
569
|
-
securityRequirements: [{"BearerAuth":[]}]
|
|
805
|
+
securityRequirements: [{"BearerAuth":[]}],
|
|
806
|
+
tags: ["Reseller"],
|
|
807
|
+
deprecated: false
|
|
570
808
|
}],
|
|
571
809
|
]);
|
|
572
810
|
|
|
@@ -629,11 +867,11 @@ declare global {
|
|
|
629
867
|
*/
|
|
630
868
|
async function acquireOAuth2Token(schemeName: string, scheme: any): Promise<string | null | undefined> {
|
|
631
869
|
try {
|
|
632
|
-
// Check if we have the necessary credentials
|
|
633
|
-
const clientId = process.env[`
|
|
634
|
-
const clientSecret = process.env[`
|
|
635
|
-
const scopes = process.env[`
|
|
636
|
-
|
|
870
|
+
// Check if we have the necessary credentials (resolved per-scheme at runtime)
|
|
871
|
+
const clientId = process.env[`OAUTH_CLIENT_ID_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`];
|
|
872
|
+
const clientSecret = process.env[`OAUTH_CLIENT_SECRET_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`];
|
|
873
|
+
const scopes = process.env[`OAUTH_SCOPES_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`];
|
|
874
|
+
|
|
637
875
|
if (!clientId || !clientSecret) {
|
|
638
876
|
console.error(`Missing client credentials for OAuth2 scheme '${schemeName}'`);
|
|
639
877
|
return null;
|
|
@@ -675,9 +913,9 @@ async function acquireOAuth2Token(schemeName: string, scheme: any): Promise<stri
|
|
|
675
913
|
if (scopes) {
|
|
676
914
|
formData.append('scope', scopes);
|
|
677
915
|
}
|
|
678
|
-
|
|
916
|
+
|
|
679
917
|
console.error(`Requesting OAuth2 token from ${tokenUrl}`);
|
|
680
|
-
|
|
918
|
+
|
|
681
919
|
// Make the token request
|
|
682
920
|
const response = await axios({
|
|
683
921
|
method: 'POST',
|
|
@@ -783,7 +1021,6 @@ async function executeApiTool(
|
|
|
783
1021
|
headers['content-type'] = definition.requestBodyContentType;
|
|
784
1022
|
}
|
|
785
1023
|
|
|
786
|
-
|
|
787
1024
|
// Apply security requirements if available
|
|
788
1025
|
// Security requirements use OR between array items and AND within each object
|
|
789
1026
|
const appliedSecurity = definition.securityRequirements?.find(req => {
|
|
@@ -803,8 +1040,8 @@ async function executeApiTool(
|
|
|
803
1040
|
return !!(process.env.OMNIDIM_API_KEY || readApiKey() || process.env[`BEARER_TOKEN_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`]);
|
|
804
1041
|
}
|
|
805
1042
|
else if (scheme.scheme?.toLowerCase() === 'basic') {
|
|
806
|
-
|
|
807
|
-
|
|
1043
|
+
// Username is sufficient; an empty password is valid per RFC 7617 (issue #66)
|
|
1044
|
+
return process.env[`BASIC_USERNAME_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`] != null;
|
|
808
1045
|
}
|
|
809
1046
|
}
|
|
810
1047
|
|
|
@@ -873,8 +1110,9 @@ async function executeApiTool(
|
|
|
873
1110
|
else if (scheme.scheme?.toLowerCase() === 'basic') {
|
|
874
1111
|
const username = process.env[`BASIC_USERNAME_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`];
|
|
875
1112
|
const password = process.env[`BASIC_PASSWORD_${schemeName.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase()}`];
|
|
876
|
-
|
|
877
|
-
|
|
1113
|
+
// Empty password is valid per RFC 7617 (issue #66); only username is required.
|
|
1114
|
+
if (username != null) {
|
|
1115
|
+
headers['authorization'] = `Basic ${Buffer.from(`${username}:${password ?? ''}`).toString('base64')}`;
|
|
878
1116
|
if (process.env.OMNIDIM_DEBUG) console.error(`Applied Basic authentication for '${schemeName}'`);
|
|
879
1117
|
}
|
|
880
1118
|
}
|
|
@@ -931,25 +1169,33 @@ async function executeApiTool(
|
|
|
931
1169
|
|
|
932
1170
|
|
|
933
1171
|
// Prepare the axios request configuration
|
|
934
|
-
headers['user-agent'] = `${SERVER_NAME}-mcp-server/${SERVER_VERSION}`;
|
|
935
1172
|
const config: AxiosRequestConfig = {
|
|
936
1173
|
method: definition.method.toUpperCase(),
|
|
937
1174
|
url: requestUrl,
|
|
938
1175
|
params: queryParams,
|
|
939
1176
|
headers: headers,
|
|
940
|
-
|
|
1177
|
+
// Serialize array query params as comma-separated values (issue #41)
|
|
1178
|
+
paramsSerializer: (params: Record<string, any>) => {
|
|
1179
|
+
const search = new URLSearchParams();
|
|
1180
|
+
for (const [key, value] of Object.entries(params)) {
|
|
1181
|
+
if (value === undefined || value === null) continue;
|
|
1182
|
+
search.append(key, Array.isArray(value) ? value.join(',') : String(value));
|
|
1183
|
+
}
|
|
1184
|
+
return search.toString();
|
|
1185
|
+
},
|
|
941
1186
|
...(requestBodyData !== undefined && { data: requestBodyData }),
|
|
942
1187
|
};
|
|
943
1188
|
|
|
944
1189
|
if (process.env.OMNIDIM_DEBUG) {
|
|
945
1190
|
console.error(`Executing tool "${toolName}": ${config.method} ${config.url}`);
|
|
946
1191
|
}
|
|
947
|
-
|
|
1192
|
+
|
|
948
1193
|
// Execute the request
|
|
949
1194
|
const response = await axios(config);
|
|
950
1195
|
|
|
951
1196
|
// Process and format the response
|
|
952
1197
|
let responseText = '';
|
|
1198
|
+
// Coerce header value to string before lowercasing (issue #65)
|
|
953
1199
|
const contentType = String(response.headers['content-type'] ?? '').toLowerCase();
|
|
954
1200
|
|
|
955
1201
|
// Handle JSON responses
|