@retell-ai/mcp-server 5.32.5 → 5.34.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/local-docs-search.js +251 -251
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +251 -251
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/src/local-docs-search.ts +332 -332
package/src/local-docs-search.ts
CHANGED
|
@@ -78,15 +78,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
78
78
|
example:
|
|
79
79
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneCallResponse = await client.call.createPhoneCall({\n from_number: '+14157774444',\n to_number: '+12137774445',\n});\n\nconsole.log(phoneCallResponse.agent_id);",
|
|
80
80
|
},
|
|
81
|
-
http: {
|
|
82
|
-
example:
|
|
83
|
-
'curl https://api.retellai.com/v2/create-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 120 \\\n -d \'{\n "from_number": "+14157774444",\n "to_number": "+12137774445",\n "custom_sip_headers": {\n "X-Custom-Header": "Custom Value"\n },\n "ignore_e164_validation": true,\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
84
|
-
},
|
|
85
81
|
python: {
|
|
86
82
|
method: 'call.create_phone_call',
|
|
87
83
|
example:
|
|
88
84
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_call_response = client.call.create_phone_call(\n from_number="+14157774444",\n to_number="+12137774445",\n)\nprint(phone_call_response.agent_id)',
|
|
89
85
|
},
|
|
86
|
+
http: {
|
|
87
|
+
example:
|
|
88
|
+
'curl https://api.retellai.com/v2/create-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 120 \\\n -d \'{\n "from_number": "+14157774444",\n "to_number": "+12137774445",\n "custom_sip_headers": {\n "X-Custom-Header": "Custom Value"\n },\n "ignore_e164_validation": true,\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
89
|
+
},
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -116,15 +116,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
116
116
|
example:
|
|
117
117
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneCallResponse = await client.call.registerPhoneCall({\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(phoneCallResponse.agent_id);",
|
|
118
118
|
},
|
|
119
|
-
http: {
|
|
120
|
-
example:
|
|
121
|
-
'curl https://api.retellai.com/v2/register-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "direction": "inbound",\n "from_number": "+14157774444",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "to_number": "+12137774445"\n }\'',
|
|
122
|
-
},
|
|
123
119
|
python: {
|
|
124
120
|
method: 'call.register_phone_call',
|
|
125
121
|
example:
|
|
126
122
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_call_response = client.call.register_phone_call(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(phone_call_response.agent_id)',
|
|
127
123
|
},
|
|
124
|
+
http: {
|
|
125
|
+
example:
|
|
126
|
+
'curl https://api.retellai.com/v2/register-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "direction": "inbound",\n "from_number": "+14157774444",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "to_number": "+12137774445"\n }\'',
|
|
127
|
+
},
|
|
128
128
|
},
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -154,15 +154,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
154
154
|
example:
|
|
155
155
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst webCallResponse = await client.call.createWebCall({\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(webCallResponse.agent_id);",
|
|
156
156
|
},
|
|
157
|
-
http: {
|
|
158
|
-
example:
|
|
159
|
-
'curl https://api.retellai.com/v2/create-web-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "current_node_id": "collect_info",\n "current_state": "information_collection",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
160
|
-
},
|
|
161
157
|
python: {
|
|
162
158
|
method: 'call.create_web_call',
|
|
163
159
|
example:
|
|
164
160
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nweb_call_response = client.call.create_web_call(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(web_call_response.agent_id)',
|
|
165
161
|
},
|
|
162
|
+
http: {
|
|
163
|
+
example:
|
|
164
|
+
'curl https://api.retellai.com/v2/create-web-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "current_node_id": "collect_info",\n "current_state": "information_collection",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
165
|
+
},
|
|
166
166
|
},
|
|
167
167
|
},
|
|
168
168
|
{
|
|
@@ -183,15 +183,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
183
183
|
example:
|
|
184
184
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d');\n\nconsole.log(callResponse);",
|
|
185
185
|
},
|
|
186
|
-
http: {
|
|
187
|
-
example:
|
|
188
|
-
'curl https://api.retellai.com/v2/get-call/$CALL_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
189
|
-
},
|
|
190
186
|
python: {
|
|
191
187
|
method: 'call.retrieve',
|
|
192
188
|
example:
|
|
193
189
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ncall_response = client.call.retrieve(\n "119c3f8e47135a29e65947eeb34cf12d",\n)\nprint(call_response)',
|
|
194
190
|
},
|
|
191
|
+
http: {
|
|
192
|
+
example:
|
|
193
|
+
'curl https://api.retellai.com/v2/get-call/$CALL_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
194
|
+
},
|
|
195
195
|
},
|
|
196
196
|
},
|
|
197
197
|
{
|
|
@@ -203,7 +203,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
203
203
|
stainlessPath: '(resource) call > (method) list',
|
|
204
204
|
qualified: 'client.call.list',
|
|
205
205
|
params: [
|
|
206
|
-
"filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }; call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }; direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]; e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }; metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; tool_calls?: { name: string; latency_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; success?: { op: 'eq'; type: 'boolean'; value: boolean; }; }[]; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; };",
|
|
206
|
+
"filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; } | { op: 'in'; type: 'enum'; value: string[]; }; call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }; call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }; direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]; e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }; metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; tool_calls?: { name: string; latency_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; success?: { op: 'eq'; type: 'boolean'; value: boolean; }; }[]; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; };",
|
|
207
207
|
'include_total?: boolean;',
|
|
208
208
|
'limit?: number;',
|
|
209
209
|
'pagination_key?: string;',
|
|
@@ -212,22 +212,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
212
212
|
],
|
|
213
213
|
response: '{ has_more?: boolean; items?: object | object[]; pagination_key?: string; total?: number; }',
|
|
214
214
|
markdown:
|
|
215
|
-
"## list\n\n`client.call.list(filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }; call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }; direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]; e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }; metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; tool_calls?: { name: string; latency_ms?: object | object; success?: object; }[]; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }, include_total?: boolean, limit?: number, pagination_key?: string, skip?: number, sort_order?: 'ascending' | 'descending'): { has_more?: boolean; items?: object | object[]; pagination_key?: string; total?: number; }`\n\n**post** `/v3/list-calls`\n\nList calls with unified cursor pagination response.\n\n### Parameters\n\n- `filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }; call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }; direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]; e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }; metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; tool_calls?: { name: string; latency_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; success?: { op: 'eq'; type: 'boolean'; value: boolean; }; }[]; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }`\n Filter criteria for calls. All conditions are implicitly connected with AND.\n - `agent?: { agent_id: string; version?: number[]; }[]`\n Filter by agent(s). Agent filters are connected by OR.\n - `batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by batch call ID.\n - `call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by call ID.\n - `call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }`\n - `call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }`\n Filter by whether the call was successful.\n - `call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }`\n - `combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by combined cost of the call.\n - `custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom analysis data fields.\n - `custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom attributes fields.\n - `data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }`\n - `direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }`\n - `disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }`\n - `duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by call duration in milliseconds.\n - `dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]`\n Filter by dynamic variables.\n - `e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by end-to-end latency p50.\n - `end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by call end timestamp (epoch ms).\n - `from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by from number.\n - `in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }`\n Filter by whether the call is in voicemail.\n - `metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by metadata fields.\n - `start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by call start timestamp (epoch ms).\n - `to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by to number.\n - `tool_calls?: { name: string; latency_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; success?: { op: 'eq'; type: 'boolean'; value: boolean; }; }[]`\n Filter by tool call criteria. Tool call filters are connected by AND.\n - `user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }`\n\n- `include_total?: boolean`\n Whether to include `total` (count of all calls matching `filter_criteria`, ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. Each enabled request triggers an additional aggregate query, so opt in only when the total is needed.\n\n- `limit?: number`\n Maximum number of calls to return.\n\n- `pagination_key?: string`\n Opaque pagination cursor from a previous response.\n\n- `skip?: number`\n Number of records to skip for pagination.\n\n- `sort_order?: 'ascending' | 'descending'`\n Sort calls by `start_timestamp` in ascending or descending order.\n\n### Returns\n\n- `{ has_more?: boolean; items?: { access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transfer_destination?: string; transfer_end_timestamp?: number; }[]; pagination_key?: string; total?: number; }`\n\n - `has_more?: boolean`\n - `items?: { access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transfer_destination?: string; transfer_end_timestamp?: number; }[]`\n - `pagination_key?: string`\n - `total?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst calls = await client.call.list();\n\nconsole.log(calls);\n```",
|
|
215
|
+
"## list\n\n`client.call.list(filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; } | { op: 'in'; type: 'enum'; value: string[]; }; call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }; call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }; direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]; e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }; metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; tool_calls?: { name: string; latency_ms?: object | object; success?: object; }[]; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }, include_total?: boolean, limit?: number, pagination_key?: string, skip?: number, sort_order?: 'ascending' | 'descending'): { has_more?: boolean; items?: object | object[]; pagination_key?: string; total?: number; }`\n\n**post** `/v3/list-calls`\n\nList calls with unified cursor pagination response.\n\n### Parameters\n\n- `filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; } | { op: 'in'; type: 'enum'; value: string[]; }; call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }; call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }; direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]; e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }; metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; tool_calls?: { name: string; latency_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; success?: { op: 'eq'; type: 'boolean'; value: boolean; }; }[]; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }`\n Filter criteria for calls. All conditions are implicitly connected with AND.\n - `agent?: { agent_id: string; version?: number[]; }[]`\n Filter by agent(s). Agent filters are connected by OR.\n - `batch_call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by batch call ID.\n - `call_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; } | { op: 'in'; type: 'enum'; value: string[]; }`\n Filter by call ID.\n - `call_status?: { op: 'in'; type: 'enum'; value: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; }`\n - `call_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }`\n Filter by whether the call was successful.\n - `call_type?: { op: 'in'; type: 'enum'; value: 'web_call' | 'phone_call'[]; }`\n - `combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by combined cost of the call.\n - `custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom analysis data fields.\n - `custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom attributes fields.\n - `data_storage_setting?: { op: 'in'; type: 'enum'; value: 'everything' | 'everything_except_pii' | 'basic_attributes_only'[]; }`\n - `direction?: { op: 'in'; type: 'enum'; value: 'inbound' | 'outbound'[]; }`\n - `disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }`\n - `duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by call duration in milliseconds.\n - `dynamic_variables?: { key: string; op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }[]`\n Filter by dynamic variables.\n - `e2e_latency_p50?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by end-to-end latency p50.\n - `end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by call end timestamp (epoch ms).\n - `from_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by from number.\n - `in_voicemail?: { op: 'eq'; type: 'boolean'; value: boolean; }`\n Filter by whether the call is in voicemail.\n - `metadata?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by metadata fields.\n - `start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by call start timestamp (epoch ms).\n - `to_number?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by to number.\n - `tool_calls?: { name: string; latency_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; success?: { op: 'eq'; type: 'boolean'; value: boolean; }; }[]`\n Filter by tool call criteria. Tool call filters are connected by AND.\n - `user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }`\n\n- `include_total?: boolean`\n Whether to include `total` (count of all calls matching `filter_criteria`, ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. Each enabled request triggers an additional aggregate query, so opt in only when the total is needed.\n\n- `limit?: number`\n Maximum number of calls to return.\n\n- `pagination_key?: string`\n Opaque pagination cursor from a previous response.\n\n- `skip?: number`\n Number of records to skip for pagination.\n\n- `sort_order?: 'ascending' | 'descending'`\n Sort calls by `start_timestamp` in ascending or descending order.\n\n### Returns\n\n- `{ has_more?: boolean; items?: { access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transfer_destination?: string; transfer_end_timestamp?: number; }[]; pagination_key?: string; total?: number; }`\n\n - `has_more?: boolean`\n - `items?: { access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transfer_destination?: string; transfer_end_timestamp?: number; }[]`\n - `pagination_key?: string`\n - `total?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst calls = await client.call.list();\n\nconsole.log(calls);\n```",
|
|
216
216
|
perLanguage: {
|
|
217
217
|
typescript: {
|
|
218
218
|
method: 'client.call.list',
|
|
219
219
|
example:
|
|
220
220
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst calls = await client.call.list();\n\nconsole.log(calls.has_more);",
|
|
221
221
|
},
|
|
222
|
-
http: {
|
|
223
|
-
example:
|
|
224
|
-
'curl https://api.retellai.com/v3/list-calls \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
225
|
-
},
|
|
226
222
|
python: {
|
|
227
223
|
method: 'call.list',
|
|
228
224
|
example:
|
|
229
225
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ncalls = client.call.list()\nprint(calls.has_more)',
|
|
230
226
|
},
|
|
227
|
+
http: {
|
|
228
|
+
example:
|
|
229
|
+
'curl https://api.retellai.com/v3/list-calls \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
230
|
+
},
|
|
231
231
|
},
|
|
232
232
|
},
|
|
233
233
|
{
|
|
@@ -247,22 +247,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
247
247
|
],
|
|
248
248
|
response: 'object | object',
|
|
249
249
|
markdown:
|
|
250
|
-
"## update\n\n`client.call.update(call_id: string, custom_attributes?: object, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', metadata?: object, override_dynamic_variables?: object): object | object`\n\n**patch** `/v2/update-call/{call_id}`\n\nUpdate metadata and sensitive data storage settings for an existing call.\n\n### Parameters\n\n- `call_id: string`\n\n- `custom_attributes?: object`\n Custom attributes for the call\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Data storage setting for this call. Overrides the agent's default setting. \"everything\" stores all data, \"everything_except_pii\" excludes PII when possible, \"basic_attributes_only\" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object. Size limited to 50kB max.\n\n- `override_dynamic_variables?: object`\n Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing override.\n\n### Returns\n\n- `{ access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; start_timestamp?: number; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst callResponse = await client.call.update('call_a4441234567890777c4a4a123e6');\n\nconsole.log(callResponse);\n```",
|
|
250
|
+
"## update\n\n`client.call.update(call_id: string, custom_attributes?: object, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', metadata?: object, override_dynamic_variables?: object): object | object`\n\n**patch** `/v2/update-call/{call_id}`\n\nUpdate metadata and sensitive data storage settings for an existing call.\n\n### Parameters\n\n- `call_id: string`\n\n- `custom_attributes?: object`\n Custom attributes for the call\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Data storage setting for this call. Overrides the agent's default setting. \"everything\" stores all data, \"everything_except_pii\" excludes PII when possible, \"basic_attributes_only\" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object. Size limited to 50kB max.\n\n- `override_dynamic_variables?: object`\n Deprecated. Use the /v2/update-live-call/{call_id} endpoint to override dynamic variables on an ongoing call. Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing override.\n\n### Returns\n\n- `{ access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; start_timestamp?: number; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { digit: string; role: 'dtmf'; } | { content: string; role: 'sms'; time_sec: number; multimedia?: object[]; } | { content: string; role: 'injected'; time_sec: number; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst callResponse = await client.call.update('call_a4441234567890777c4a4a123e6');\n\nconsole.log(callResponse);\n```",
|
|
251
251
|
perLanguage: {
|
|
252
252
|
typescript: {
|
|
253
253
|
method: 'client.call.update',
|
|
254
254
|
example:
|
|
255
255
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {\n data_storage_setting: 'everything_except_pii',\n metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },\n});\n\nconsole.log(callResponse);",
|
|
256
256
|
},
|
|
257
|
-
http: {
|
|
258
|
-
example:
|
|
259
|
-
'curl https://api.retellai.com/v2/update-call/$CALL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything_except_pii",\n "metadata": {\n "customer_id": "cust_123",\n "notes": "Follow-up required"\n },\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
|
|
260
|
-
},
|
|
261
257
|
python: {
|
|
262
258
|
method: 'call.update',
|
|
263
259
|
example:
|
|
264
260
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ncall_response = client.call.update(\n call_id="call_a4441234567890777c4a4a123e6",\n data_storage_setting="everything_except_pii",\n metadata={\n "customer_id": "cust_123",\n "notes": "Follow-up required",\n },\n)\nprint(call_response)',
|
|
265
261
|
},
|
|
262
|
+
http: {
|
|
263
|
+
example:
|
|
264
|
+
'curl https://api.retellai.com/v2/update-call/$CALL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything_except_pii",\n "metadata": {\n "customer_id": "cust_123",\n "notes": "Follow-up required"\n },\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
|
|
265
|
+
},
|
|
266
266
|
},
|
|
267
267
|
},
|
|
268
268
|
{
|
|
@@ -282,15 +282,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
282
282
|
example:
|
|
283
283
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.call.stop('call_a4441234567890777c4a4a123e6');",
|
|
284
284
|
},
|
|
285
|
-
http: {
|
|
286
|
-
example:
|
|
287
|
-
'curl https://api.retellai.com/v2/stop-call/$CALL_ID \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
288
|
-
},
|
|
289
285
|
python: {
|
|
290
286
|
method: 'call.stop',
|
|
291
287
|
example:
|
|
292
288
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.call.stop(\n "call_a4441234567890777c4a4a123e6",\n)',
|
|
293
289
|
},
|
|
290
|
+
http: {
|
|
291
|
+
example:
|
|
292
|
+
'curl https://api.retellai.com/v2/stop-call/$CALL_ID \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
293
|
+
},
|
|
294
294
|
},
|
|
295
295
|
},
|
|
296
296
|
{
|
|
@@ -310,15 +310,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
310
310
|
example:
|
|
311
311
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.call.delete('119c3f8e47135a29e65947eeb34cf12d');",
|
|
312
312
|
},
|
|
313
|
-
http: {
|
|
314
|
-
example:
|
|
315
|
-
'curl https://api.retellai.com/v2/delete-call/$CALL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
316
|
-
},
|
|
317
313
|
python: {
|
|
318
314
|
method: 'call.delete',
|
|
319
315
|
example:
|
|
320
316
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.call.delete(\n "119c3f8e47135a29e65947eeb34cf12d",\n)',
|
|
321
317
|
},
|
|
318
|
+
http: {
|
|
319
|
+
example:
|
|
320
|
+
'curl https://api.retellai.com/v2/delete-call/$CALL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
321
|
+
},
|
|
322
322
|
},
|
|
323
323
|
},
|
|
324
324
|
{
|
|
@@ -345,15 +345,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
345
345
|
example:
|
|
346
346
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(chatResponse.agent_id);",
|
|
347
347
|
},
|
|
348
|
-
http: {
|
|
349
|
-
example:
|
|
350
|
-
'curl https://api.retellai.com/create-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
351
|
-
},
|
|
352
348
|
python: {
|
|
353
349
|
method: 'chat.create',
|
|
354
350
|
example:
|
|
355
351
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.create(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(chat_response.agent_id)',
|
|
356
352
|
},
|
|
353
|
+
http: {
|
|
354
|
+
example:
|
|
355
|
+
'curl https://api.retellai.com/create-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
356
|
+
},
|
|
357
357
|
},
|
|
358
358
|
},
|
|
359
359
|
{
|
|
@@ -383,15 +383,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
383
383
|
example:
|
|
384
384
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.createSMSChat({\n from_number: '+12137771234',\n to_number: '+14155551234',\n});\n\nconsole.log(chatResponse.agent_id);",
|
|
385
385
|
},
|
|
386
|
-
http: {
|
|
387
|
-
example:
|
|
388
|
-
'curl https://api.retellai.com/create-sms-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "from_number": "+12137771234",\n "to_number": "+14155551234",\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
389
|
-
},
|
|
390
386
|
python: {
|
|
391
387
|
method: 'chat.create_sms_chat',
|
|
392
388
|
example:
|
|
393
389
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.create_sms_chat(\n from_number="+12137771234",\n to_number="+14155551234",\n)\nprint(chat_response.agent_id)',
|
|
394
390
|
},
|
|
391
|
+
http: {
|
|
392
|
+
example:
|
|
393
|
+
'curl https://api.retellai.com/create-sms-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "from_number": "+12137771234",\n "to_number": "+14155551234",\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "retell_llm_dynamic_variables": {\n "customer_name": "John Doe"\n }\n }\'',
|
|
394
|
+
},
|
|
395
395
|
},
|
|
396
396
|
},
|
|
397
397
|
{
|
|
@@ -411,15 +411,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
411
411
|
example:
|
|
412
412
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chat.end('16b980523634a6dc504898cda492e939');",
|
|
413
413
|
},
|
|
414
|
-
http: {
|
|
415
|
-
example:
|
|
416
|
-
'curl https://api.retellai.com/end-chat/$CHAT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
417
|
-
},
|
|
418
414
|
python: {
|
|
419
415
|
method: 'chat.end',
|
|
420
416
|
example:
|
|
421
417
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat.end(\n "16b980523634a6dc504898cda492e939",\n)',
|
|
422
418
|
},
|
|
419
|
+
http: {
|
|
420
|
+
example:
|
|
421
|
+
'curl https://api.retellai.com/end-chat/$CHAT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
422
|
+
},
|
|
423
423
|
},
|
|
424
424
|
},
|
|
425
425
|
{
|
|
@@ -441,15 +441,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
441
441
|
example:
|
|
442
442
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatResponse.agent_id);",
|
|
443
443
|
},
|
|
444
|
-
http: {
|
|
445
|
-
example:
|
|
446
|
-
'curl https://api.retellai.com/get-chat/$CHAT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
447
|
-
},
|
|
448
444
|
python: {
|
|
449
445
|
method: 'chat.retrieve',
|
|
450
446
|
example:
|
|
451
447
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.retrieve(\n "16b980523634a6dc504898cda492e939",\n)\nprint(chat_response.agent_id)',
|
|
452
448
|
},
|
|
449
|
+
http: {
|
|
450
|
+
example:
|
|
451
|
+
'curl https://api.retellai.com/get-chat/$CHAT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
452
|
+
},
|
|
453
453
|
},
|
|
454
454
|
},
|
|
455
455
|
{
|
|
@@ -471,15 +471,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
471
471
|
example:
|
|
472
472
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chat.createChatCompletion({\n chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n content: 'hi how are you doing?',\n});\n\nconsole.log(response.messages);",
|
|
473
473
|
},
|
|
474
|
-
http: {
|
|
475
|
-
example:
|
|
476
|
-
'curl https://api.retellai.com/create-chat-completion \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "chat_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "content": "hi how are you doing?"\n }\'',
|
|
477
|
-
},
|
|
478
474
|
python: {
|
|
479
475
|
method: 'chat.create_chat_completion',
|
|
480
476
|
example:
|
|
481
477
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.chat.create_chat_completion(\n chat_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n content="hi how are you doing?",\n)\nprint(response.messages)',
|
|
482
478
|
},
|
|
479
|
+
http: {
|
|
480
|
+
example:
|
|
481
|
+
'curl https://api.retellai.com/create-chat-completion \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "chat_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "content": "hi how are you doing?"\n }\'',
|
|
482
|
+
},
|
|
483
483
|
},
|
|
484
484
|
},
|
|
485
485
|
{
|
|
@@ -508,15 +508,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
508
508
|
example:
|
|
509
509
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chats = await client.chat.list();\n\nconsole.log(chats.has_more);",
|
|
510
510
|
},
|
|
511
|
-
http: {
|
|
512
|
-
example:
|
|
513
|
-
'curl https://api.retellai.com/v3/list-chats \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
514
|
-
},
|
|
515
511
|
python: {
|
|
516
512
|
method: 'chat.list',
|
|
517
513
|
example:
|
|
518
514
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchats = client.chat.list()\nprint(chats.has_more)',
|
|
519
515
|
},
|
|
516
|
+
http: {
|
|
517
|
+
example:
|
|
518
|
+
'curl https://api.retellai.com/v3/list-chats \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
519
|
+
},
|
|
520
520
|
},
|
|
521
521
|
},
|
|
522
522
|
{
|
|
@@ -544,15 +544,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
544
544
|
example:
|
|
545
545
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.update('chat_98c1a2157aa0559144d67bb0729', {\n data_storage_setting: 'everything',\n metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },\n override_dynamic_variables: { additional_discount: '15%' },\n});\n\nconsole.log(chatResponse.agent_id);",
|
|
546
546
|
},
|
|
547
|
-
http: {
|
|
548
|
-
example:
|
|
549
|
-
'curl https://api.retellai.com/update-chat/$CHAT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything",\n "metadata": {\n "customer_id": "cust_123",\n "notes": "Follow-up required"\n },\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
|
|
550
|
-
},
|
|
551
547
|
python: {
|
|
552
548
|
method: 'chat.update',
|
|
553
549
|
example:
|
|
554
550
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.update(\n chat_id="chat_98c1a2157aa0559144d67bb0729",\n data_storage_setting="everything",\n metadata={\n "customer_id": "cust_123",\n "notes": "Follow-up required",\n },\n override_dynamic_variables={\n "additional_discount": "15%"\n },\n)\nprint(chat_response.agent_id)',
|
|
555
551
|
},
|
|
552
|
+
http: {
|
|
553
|
+
example:
|
|
554
|
+
'curl https://api.retellai.com/update-chat/$CHAT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything",\n "metadata": {\n "customer_id": "cust_123",\n "notes": "Follow-up required"\n },\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
|
|
555
|
+
},
|
|
556
556
|
},
|
|
557
557
|
},
|
|
558
558
|
{
|
|
@@ -572,15 +572,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
572
572
|
example:
|
|
573
573
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chat.delete('16b980523634a6dc504898cda492e939');",
|
|
574
574
|
},
|
|
575
|
-
http: {
|
|
576
|
-
example:
|
|
577
|
-
'curl https://api.retellai.com/delete-chat/$CHAT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
578
|
-
},
|
|
579
575
|
python: {
|
|
580
576
|
method: 'chat.delete',
|
|
581
577
|
example:
|
|
582
578
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat.delete(\n "16b980523634a6dc504898cda492e939",\n)',
|
|
583
579
|
},
|
|
580
|
+
http: {
|
|
581
|
+
example:
|
|
582
|
+
'curl https://api.retellai.com/delete-chat/$CHAT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
583
|
+
},
|
|
584
584
|
},
|
|
585
585
|
},
|
|
586
586
|
{
|
|
@@ -609,22 +609,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
609
609
|
response:
|
|
610
610
|
"{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }",
|
|
611
611
|
markdown:
|
|
612
|
-
"## create\n\n`client.phoneNumber.create(allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], area_code?: number, country_code?: 'US' | 'CA', fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, number_provider?: 'twilio' | 'telnyx', outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], phone_number?: string, toll_free?: boolean, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/create-phone-number`\n\nBuy a new phone number & Bind agents\n\n### Parameters\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `area_code?: number`\n Area code of the number to obtain. Format is a 3 digit integer. Currently only supports US area code.\n\n- `country_code?: 'US' | 'CA'`\n The ISO 3166-1 alpha-2 country code of the number you are trying to purchase. If left empty, will default to \"US\".\n\n- `fallback_number?: string`\n
|
|
612
|
+
"## create\n\n`client.phoneNumber.create(allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], area_code?: number, country_code?: 'US' | 'CA', fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, number_provider?: 'twilio' | 'telnyx', outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], phone_number?: string, toll_free?: boolean, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/create-phone-number`\n\nBuy a new phone number & Bind agents\n\n### Parameters\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `area_code?: number`\n Area code of the number to obtain. Format is a 3 digit integer. Currently only supports US area code.\n\n- `country_code?: 'US' | 'CA'`\n The ISO 3166-1 alpha-2 country code of the number you are trying to purchase. If left empty, will default to \"US\".\n\n- `fallback_number?: string`\n When inbound call concurrency is reached and a slot does not free up after extended ringing, the call will fall back to this number. Can be either a Retell phone number or an external number. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, Retell will send a webhook for inbound calls, where you can override the agent ID, set dynamic variables, and configure other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `number_provider?: 'twilio' | 'telnyx'`\n The provider to purchase the phone number from. Default to twilio.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `phone_number?: string`\n The number you are trying to purchase in E.164 format of the number (+country code then number with no space and no special characters).\n\n- `toll_free?: boolean`\n Whether to purchase a toll-free number. Toll-free numbers incur higher costs.\n\n- `transport?: string`\n Outbound transport protocol to use for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse);\n```",
|
|
613
613
|
perLanguage: {
|
|
614
614
|
typescript: {
|
|
615
615
|
method: 'client.phoneNumber.create',
|
|
616
616
|
example:
|
|
617
617
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse.last_modification_timestamp);",
|
|
618
618
|
},
|
|
619
|
-
http: {
|
|
620
|
-
example:
|
|
621
|
-
'curl https://api.retellai.com/create-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "area_code": 415,\n "country_code": "US",\n "fallback_number": "+14155551234",\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "number_provider": "twilio",\n "phone_number": "+14157774444",\n "transport": "TCP"\n }\'',
|
|
622
|
-
},
|
|
623
619
|
python: {
|
|
624
620
|
method: 'phone_number.create',
|
|
625
621
|
example:
|
|
626
622
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.create()\nprint(phone_number_response.last_modification_timestamp)',
|
|
627
623
|
},
|
|
624
|
+
http: {
|
|
625
|
+
example:
|
|
626
|
+
'curl https://api.retellai.com/create-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "area_code": 415,\n "country_code": "US",\n "fallback_number": "+14155551234",\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "number_provider": "twilio",\n "phone_number": "+14157774444",\n "transport": "TCP"\n }\'',
|
|
627
|
+
},
|
|
628
628
|
},
|
|
629
629
|
},
|
|
630
630
|
{
|
|
@@ -652,22 +652,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
652
652
|
response:
|
|
653
653
|
"{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }",
|
|
654
654
|
markdown:
|
|
655
|
-
"## import\n\n`client.phoneNumber.import(phone_number: string, termination_uri: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], ignore_e164_validation?: boolean, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], sip_trunk_auth_password?: string, sip_trunk_auth_username?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/import-phone-number`\n\nImport a phone number from custom telephony & Bind agents\n\n### Parameters\n\n- `phone_number: string`\n The number you are trying to import in E.164 format of the number (+country code, then number with no space, no special characters), used as the unique identifier for phone number APIs.\n\n- `termination_uri: string`\n The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with \".pstn.twilio.com\".\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `ignore_e164_validation?: boolean`\n If true, E.164 validation for phone_number is skipped. This is useful for internal pseudo numbers when using custom telephony. If omitted, default is true. Must be a boolean literal; string values like \"true\" or \"false\" are invalid.\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can override agent
|
|
655
|
+
"## import\n\n`client.phoneNumber.import(phone_number: string, termination_uri: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], ignore_e164_validation?: boolean, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], sip_trunk_auth_password?: string, sip_trunk_auth_username?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/import-phone-number`\n\nImport a phone number from custom telephony & Bind agents\n\n### Parameters\n\n- `phone_number: string`\n The number you are trying to import in E.164 format of the number (+country code, then number with no space, no special characters), used as the unique identifier for phone number APIs.\n\n- `termination_uri: string`\n The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with \".pstn.twilio.com\".\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `ignore_e164_validation?: boolean`\n If true, E.164 validation for phone_number is skipped. This is useful for internal pseudo numbers when using custom telephony. If omitted, default is true. Must be a boolean literal; string values like \"true\" or \"false\" are invalid.\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, Retell will send a webhook for inbound calls, where you can override the agent ID, set dynamic variables, and configure other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `sip_trunk_auth_password?: string`\n The password used for authentication for the SIP trunk.\n\n- `sip_trunk_auth_username?: string`\n The username used for authentication for the SIP trunk.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.import({ phone_number: '+14157774444', termination_uri: 'someuri.pstn.twilio.com' });\n\nconsole.log(phoneNumberResponse);\n```",
|
|
656
656
|
perLanguage: {
|
|
657
657
|
typescript: {
|
|
658
658
|
method: 'client.phoneNumber.import',
|
|
659
659
|
example:
|
|
660
660
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.import({\n phone_number: '+14157774444',\n termination_uri: 'someuri.pstn.twilio.com',\n});\n\nconsole.log(phoneNumberResponse.last_modification_timestamp);",
|
|
661
661
|
},
|
|
662
|
-
http: {
|
|
663
|
-
example:
|
|
664
|
-
'curl https://api.retellai.com/import-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "phone_number": "+14157774444",\n "termination_uri": "someuri.pstn.twilio.com",\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "ignore_e164_validation": true,\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "sip_trunk_auth_password": "123456",\n "sip_trunk_auth_username": "username",\n "transport": "TCP"\n }\'',
|
|
665
|
-
},
|
|
666
662
|
python: {
|
|
667
663
|
method: 'phone_number.import_',
|
|
668
664
|
example:
|
|
669
665
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.import_(\n phone_number="+14157774444",\n termination_uri="someuri.pstn.twilio.com",\n)\nprint(phone_number_response.last_modification_timestamp)',
|
|
670
666
|
},
|
|
667
|
+
http: {
|
|
668
|
+
example:
|
|
669
|
+
'curl https://api.retellai.com/import-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "phone_number": "+14157774444",\n "termination_uri": "someuri.pstn.twilio.com",\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "ignore_e164_validation": true,\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "sip_trunk_auth_password": "123456",\n "sip_trunk_auth_username": "username",\n "transport": "TCP"\n }\'',
|
|
670
|
+
},
|
|
671
671
|
},
|
|
672
672
|
},
|
|
673
673
|
{
|
|
@@ -689,15 +689,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
689
689
|
example:
|
|
690
690
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.retrieve('+14157774444');\n\nconsole.log(phoneNumberResponse.last_modification_timestamp);",
|
|
691
691
|
},
|
|
692
|
-
http: {
|
|
693
|
-
example:
|
|
694
|
-
'curl https://api.retellai.com/get-phone-number/$PHONE_NUMBER \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
695
|
-
},
|
|
696
692
|
python: {
|
|
697
693
|
method: 'phone_number.retrieve',
|
|
698
694
|
example:
|
|
699
695
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.retrieve(\n "+14157774444",\n)\nprint(phone_number_response.last_modification_timestamp)',
|
|
700
696
|
},
|
|
697
|
+
http: {
|
|
698
|
+
example:
|
|
699
|
+
'curl https://api.retellai.com/get-phone-number/$PHONE_NUMBER \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
700
|
+
},
|
|
701
701
|
},
|
|
702
702
|
},
|
|
703
703
|
{
|
|
@@ -719,15 +719,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
719
719
|
example:
|
|
720
720
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumbers = await client.phoneNumber.list();\n\nconsole.log(phoneNumbers.has_more);",
|
|
721
721
|
},
|
|
722
|
-
http: {
|
|
723
|
-
example:
|
|
724
|
-
'curl https://api.retellai.com/v2/list-phone-numbers \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
725
|
-
},
|
|
726
722
|
python: {
|
|
727
723
|
method: 'phone_number.list',
|
|
728
724
|
example:
|
|
729
725
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_numbers = client.phone_number.list()\nprint(phone_numbers.has_more)',
|
|
730
726
|
},
|
|
727
|
+
http: {
|
|
728
|
+
example:
|
|
729
|
+
'curl https://api.retellai.com/v2/list-phone-numbers \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
730
|
+
},
|
|
731
731
|
},
|
|
732
732
|
},
|
|
733
733
|
{
|
|
@@ -758,22 +758,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
758
758
|
response:
|
|
759
759
|
"{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }",
|
|
760
760
|
markdown:
|
|
761
|
-
"## update\n\n`client.phoneNumber.update(phone_number: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], auth_password?: string, auth_username?: string, fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_webhook_url?: string, inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], termination_uri?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**patch** `/update-phone-number/{phone_number}`\n\nUpdate agent bound to a purchased phone number\n\n### Parameters\n\n- `phone_number: string`\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `auth_password?: string`\n The password used for authentication for the SIP trunk to update for the phone number.\n\n- `auth_username?: string`\n The username used for authentication for the SIP trunk to update for the phone number.\n\n- `fallback_number?: string`\n
|
|
761
|
+
"## update\n\n`client.phoneNumber.update(phone_number: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], auth_password?: string, auth_username?: string, fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_webhook_url?: string, inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], termination_uri?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**patch** `/update-phone-number/{phone_number}`\n\nUpdate agent bound to a purchased phone number\n\n### Parameters\n\n- `phone_number: string`\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `auth_password?: string`\n The password used for authentication for the SIP trunk to update for the phone number.\n\n- `auth_username?: string`\n The username used for authentication for the SIP trunk to update for the phone number.\n\n- `fallback_number?: string`\n When inbound call concurrency is reached and a slot does not free up after extended ringing, the call will fall back to this number. Can be either a Retell phone number or an external number. Set to null to remove. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_sms_agent_id.\n\n- `inbound_sms_webhook_url?: string`\n If set, Retell will send a webhook for inbound SMS, where you can override the agent ID, set dynamic variables, and configure other fields specific to that chat.\n\n- `inbound_webhook_url?: string`\n If set, Retell will send a webhook for inbound calls, where you can override the agent ID, set dynamic variables, and configure other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_sms_agent_id.\n\n- `termination_uri?: string`\n The termination uri to update for the phone number. This is used for outbound calls.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444');\n\nconsole.log(phoneNumberResponse);\n```",
|
|
762
762
|
perLanguage: {
|
|
763
763
|
typescript: {
|
|
764
764
|
method: 'client.phoneNumber.update',
|
|
765
765
|
example:
|
|
766
766
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444', {\n inbound_agents: [\n {\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n agent_version: 1,\n weight: 1,\n },\n ],\n nickname: 'Frontdesk Number',\n outbound_agents: [\n {\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n agent_version: 1,\n weight: 1,\n },\n ],\n});\n\nconsole.log(phoneNumberResponse.last_modification_timestamp);",
|
|
767
767
|
},
|
|
768
|
-
http: {
|
|
769
|
-
example:
|
|
770
|
-
'curl https://api.retellai.com/update-phone-number/$PHONE_NUMBER \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "auth_password": "123456",\n "auth_username": "username",\n "fallback_number": "+14155551234",\n "inbound_agents": [\n {\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "weight": 1,\n "agent_version": 1\n }\n ],\n "inbound_sms_webhook_url": "https://example.com/inbound-sms-webhook",\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "outbound_agents": [\n {\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "weight": 1,\n "agent_version": 1\n }\n ],\n "termination_uri": "someuri.pstn.twilio.com",\n "transport": "TCP"\n }\'',
|
|
771
|
-
},
|
|
772
768
|
python: {
|
|
773
769
|
method: 'phone_number.update',
|
|
774
770
|
example:
|
|
775
771
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.update(\n phone_number="+14157774444",\n inbound_agents=[{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "weight": 1,\n }],\n nickname="Frontdesk Number",\n outbound_agents=[{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "weight": 1,\n }],\n)\nprint(phone_number_response.last_modification_timestamp)',
|
|
776
772
|
},
|
|
773
|
+
http: {
|
|
774
|
+
example:
|
|
775
|
+
'curl https://api.retellai.com/update-phone-number/$PHONE_NUMBER \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "auth_password": "123456",\n "auth_username": "username",\n "fallback_number": "+14155551234",\n "inbound_agents": [\n {\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "weight": 1,\n "agent_version": 1\n }\n ],\n "inbound_sms_webhook_url": "https://example.com/inbound-sms-webhook",\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "outbound_agents": [\n {\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "weight": 1,\n "agent_version": 1\n }\n ],\n "termination_uri": "someuri.pstn.twilio.com",\n "transport": "TCP"\n }\'',
|
|
776
|
+
},
|
|
777
777
|
},
|
|
778
778
|
},
|
|
779
779
|
{
|
|
@@ -793,15 +793,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
793
793
|
example:
|
|
794
794
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.phoneNumber.delete('+14157774444');",
|
|
795
795
|
},
|
|
796
|
-
http: {
|
|
797
|
-
example:
|
|
798
|
-
'curl https://api.retellai.com/delete-phone-number/$PHONE_NUMBER \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
799
|
-
},
|
|
800
796
|
python: {
|
|
801
797
|
method: 'phone_number.delete',
|
|
802
798
|
example:
|
|
803
799
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.phone_number.delete(\n "+14157774444",\n)',
|
|
804
800
|
},
|
|
801
|
+
http: {
|
|
802
|
+
example:
|
|
803
|
+
'curl https://api.retellai.com/delete-phone-number/$PHONE_NUMBER \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
804
|
+
},
|
|
805
805
|
},
|
|
806
806
|
},
|
|
807
807
|
{
|
|
@@ -872,22 +872,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
872
872
|
],
|
|
873
873
|
response: 'object',
|
|
874
874
|
markdown:
|
|
875
|
-
"## create\n\n`client.agent.create(response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, voice_id: string, agent_name?: string, allow_dtmf_interruption?: boolean, allow_user_dtmf?: boolean, ambient_sound?: string, ambient_sound_volume?: number, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, backchannel_frequency?: number, backchannel_words?: string[], begin_message_delay_ms?: number, boosted_keywords?: string[], call_screening_option?: { agent_identity: string; call_purpose: string; }, custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation', enable_backchannel?: boolean, enable_dynamic_responsiveness?: boolean, enable_dynamic_voice_speed?: boolean, end_call_after_silence_ms?: number, fallback_voice_ids?: string[], guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }, interruption_sensitivity?: number, ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }, language?: string | string[], max_call_duration_ms?: number, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_call_analysis_model?: string, pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[], reminder_max_count?: number, reminder_trigger_ms?: number, responsiveness?: number, ring_duration_ms?: number, signed_url_expiration_ms?: number, stt_mode?: 'fast' | 'accurate' | 'custom', timezone?: string, user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }, version_description?: string, vocab_specialization?: 'general' | 'medical', voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised', voice_model?: string, voice_speed?: number, voice_temperature?: number, voicemail_detection_timeout_ms?: number, voicemail_message?: string, voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }, volume?: number, webhook_events?: string[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: object; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: object; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**post** `/create-agent`\n\nCreate a new agent\n\n### Parameters\n\n- `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `voice_id: string`\n Unique voice id used for the agent. Find list of available voices and their preview in Dashboard.\n\n- `agent_name?: string`\n The name of the agent. Only used for your own reference.\n\n- `allow_dtmf_interruption?: boolean`\n If set to true, DTMF input will interrupt the agent even when interruption_sensitivity is 0. Can be overridden per conversation or subagent node. Default to false.\n\n- `allow_user_dtmf?: boolean`\n If set to true, DTMF input will be accepted and processed. If false, any DTMF input will be ignored. Default to true.\n\n- `ambient_sound?: string`\n If set, will add ambient environment sound to the call to make experience more realistic. Currently supports the following options:\n\n- `coffee-shop`: Coffee shop ambience with people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)\n- `convention-hall`: Convention hall ambience, with some echo and people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)\n- `summer-outdoor`: Summer outdoor ambience with cicada chirping. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)\n- `mountain-outdoor`: Mountain outdoor ambience with birds singing. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)\n- `static-noise`: Constant static noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)\n- `call-center`: Call center work noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)\nSet to `null` to remove ambient sound from this agent.\n\n\n- `ambient_sound_volume?: number`\n If set, will control the volume of the ambient sound. Value ranging from [0,2]. Lower value means quieter ambient sound, while higher value means louder ambient sound. If unset, default value 1 will apply.\n\n- `analysis_successful_prompt?: string`\n Prompt to determine whether the post call or chat analysis should mark the interaction as successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post call or chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `backchannel_frequency?: number`\n Only applicable when enable_backchannel is true. Controls how often the agent would backchannel when a backchannel is possible. Value ranging from [0,1]. Lower value means less frequent backchannel, while higher value means more frequent backchannel. If unset, default value 0.8 will apply.\n\n- `backchannel_words?: string[]`\n Only applicable when enable_backchannel is true. A list of words that the agent would use as backchannel. If not set, default backchannel words will apply. Check out [backchannel default words](/agent/interaction-configuration#backchannel) for more details. Note that certain voices do not work too well with certain words, so it's recommended to experiment before adding any words.\n\n- `begin_message_delay_ms?: number`\n If set, will delay the first message by the specified amount of milliseconds, so that it gives user more time to prepare to take the call. Valid range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only applicable when agent speaks first.\n\n- `boosted_keywords?: string[]`\n Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, street, etc. Entries may reference dynamic variables with `{{variable}}` syntax.\n\n- `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to disable call screen prompt instructions.\n - `agent_identity: string`\n Identity the agent should provide when a call screen asks who is calling. Dynamic variables are supported.\n - `call_purpose: string`\n Purpose the agent should provide when a call screen asks why it is calling. Dynamic variables are supported.\n\n- `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n Custom STT configuration. Only used when stt_mode is set to custom.\n - `endpointing_ms: number`\n Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram, 500 for Soniox\n - `provider: 'azure' | 'deepgram' | 'soniox'`\n ASR provider name.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Granular setting to manage how Retell stores sensitive data (transcripts, recordings, logs, etc.).\nThis replaces the deprecated `opt_out_sensitive_data_storage` field.\n- `everything`: Store all data including transcripts, recordings, and logs.\n- `everything_except_pii`: Store data without PII when PII is detected.\n- `basic_attributes_only`: Store only basic attributes; no transcripts/recordings/logs.\nIf not set, default value of \"everything\" will apply.\n\n\n- `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n If set, determines what denoising mode to use. Use \"no-denoise\" to bypass all audio denoising. Default to noise-cancellation.\n\n- `enable_backchannel?: boolean`\n Controls whether the agent would backchannel (agent interjects the speaker with phrases like \"yeah\", \"uh-huh\" to signify interest and engagement). Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel.\n\n- `enable_dynamic_responsiveness?: boolean`\n If set to true, the agent will dynamically adjust how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. If unset, default value false will apply.\n\n- `enable_dynamic_voice_speed?: boolean`\n If set to true, will enable dynamic voice speed adjustment based on the user's speech rate and conversation context. If unset, default value false will apply.\n\n- `end_call_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).\n\n- `fallback_voice_ids?: string[]`\n When TTS provider for the selected voice is experiencing outages, we would use fallback voices listed here for the agent. Voice id and the fallback voice ids must be from different TTS providers. The system would go through the list in order, if the first one in the list is also having outage, it would use the next one. Set to null to remove voice fallback for the agent.\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `echo_verification?: boolean`\n Repeat back and confirm important details (voice only).\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `nato_phonetic_alphabet?: boolean`\n Spell using NATO phonetic alphabet style (voice only).\n - `natural_filler_words?: boolean`\n Sprinkle natural speech fillers like \"um\", \"you know\" for a more human, conversational tone.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n - `smart_matching?: boolean`\n Treat near-match similar words as same entity to reduce impact of transcription error (voice only).\n - `speech_normalization?: boolean`\n Convert numbers/dates/currency to spoken forms (voice only).\n\n- `interruption_sensitivity?: number`\n Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted.\n\n- `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection.\n - `action: { type: 'hangup'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as an IVR. Leave as null to use the default definition.\n\n- `language?: string | string[]`\n Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale selection (e.g. `[\"en-US\",\"es-ES\"]`). The array form must contain concrete locale codes only — the `multi` value is valid only as the scalar legacy form and must not appear inside an array. Single-element arrays are normalized to the equivalent scalar on output. If unset, defaults to `en-US`.\n\n- `max_call_duration_ms?: number`\n Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min), and maximum value allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in for signed URLs for public logs and recordings. When enabled, the generated URLs will include security signatures that restrict access and automatically expire after 24 hours.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings. PII redaction is only active when this list is non-empty; an empty array means no PII scrubbing is performed.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends.\n\n- `post_call_analysis_model?: string`\n The model to use for post call analysis. Default to gpt-4.1.\n\n- `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n A list of words / phrases and their pronunciation to be used to guide the audio synthesize for consistent pronunciation. Check the dashboard to see what provider supports this feature. Set to null to remove pronunciation dictionary from this agent.\n\n- `reminder_max_count?: number`\n If set, controls how many times agent would remind user when user is unresponsive. Must be a non negative integer. If unset, default value of 1 will apply (remind once). Set to 0 to disable agent from reminding.\n\n- `reminder_trigger_ms?: number`\n If set (in milliseconds), will trigger a reminder to the agent to speak if the user has been silent for the specified duration after some agent speech. Must be a positive number. If unset, default value of 10000 ms (10 s) will apply.\n\n- `responsiveness?: number`\n Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.\n\n- `ring_duration_ms?: number`\n If set, the phone ringing will last for the specified amount of milliseconds. This applies for both outbound call ringtime, and call transfer ringtime. Default to 30000 (30 s). Valid range is [5000, 300000].\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `stt_mode?: 'fast' | 'accurate' | 'custom'`\n If set, determines whether speech to text should focus on latency or accuracy. Default to fast mode. When set to custom, custom_stt_config must be provided.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `digit_limit?: number`\n The maximum number of digits allowed in the user's DTMF (Dual-Tone Multi-Frequency) input per turn. Once this limit is reached, the input is considered complete and a response will be generated immediately.\n - `termination_key?: string`\n A single key that signals the end of DTMF input. Acceptable values include any digit (0-9), the pound/hash symbol (#), or the asterisk (*).\n - `timeout_ms?: number`\n The time (in milliseconds) to wait for user DTMF input before timing out. The timer resets with each digit received.\n\n- `version_description?: string`\n Optional description of the agent version. Used for your own reference and documentation.\n\n- `vocab_specialization?: 'general' | 'medical'`\n If set, determines the vocabulary set to use for transcription. This setting only applies for English agents, for non English agent, this setting is a no-op. Default to general.\n\n- `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n Controls the emotional tone of the agent's voice. Currently supported for Cartesia and Minimax TTS providers. If unset, no emotion will be used.\n\n\n- `voice_model?: string`\n Select the voice model used for the selected voice. Each provider has a set of available voice models. Set to null to remove voice model selection, and default ones will apply. Check out dashboard for more details of each voice model.\n\n- `voice_speed?: number`\n Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.\n\n- `voice_temperature?: number`\n Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Check the dashboard to see what provider supports this feature. If unset, default value 1 will apply.\n\n- `voicemail_detection_timeout_ms?: number`\n Configures when to stop running voicemail detection, as it becomes unlikely to hit voicemail after a couple minutes, and keep running it will only have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).\n\n- `voicemail_message?: string`\n The message to be played when the call enters a voicemail. Note that this feature is only available for phone calls. If you want to hangup after hitting voicemail, set this to empty string.\n\n- `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect voicemail in the first 3 minutes of the call. Actions defined (hangup, or leave a message) will be applied when the voicemail is detected. Set this to null to disable voicemail detection.\n - `action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as voicemail. Leave as null to use the default definition.\n\n- `volume?: number`\n If set, will control the volume of the agent. Value ranging from [0,2]. Lower value means quieter agent speech, while higher value means louder agent speech. If unset, default value 1 will apply.\n\n- `webhook_events?: string[]`\n Which webhook events this agent should receive. If not set, defaults to call_started, call_ended, call_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: { agent_identity: string; call_purpose: string; }; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_dtmf_interruption?: boolean`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `assigned_tags?: string[]`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `base_version?: number`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n - `language?: string | string[]`\n - `max_call_duration_ms?: number`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse);\n```",
|
|
875
|
+
"## create\n\n`client.agent.create(response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, voice_id: string, agent_name?: string, allow_dtmf_interruption?: boolean, allow_user_dtmf?: boolean, ambient_sound?: string, ambient_sound_volume?: number, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, backchannel_frequency?: number, backchannel_words?: string[], begin_message_delay_ms?: number, boosted_keywords?: string[], call_screening_option?: { agent_identity: string; call_purpose: string; }, custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation', enable_backchannel?: boolean, enable_dynamic_responsiveness?: boolean, enable_dynamic_voice_speed?: boolean, end_call_after_silence_ms?: number, fallback_voice_ids?: string[], guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }, interruption_sensitivity?: number, ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }, language?: string | string[], max_call_duration_ms?: number, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_call_analysis_model?: string, pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[], reminder_max_count?: number, reminder_trigger_ms?: number, responsiveness?: number, ring_duration_ms?: number, signed_url_expiration_ms?: number, stt_mode?: 'fast' | 'accurate' | 'custom', timezone?: string, user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }, version_description?: string, vocab_specialization?: 'general' | 'medical', voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised', voice_model?: string, voice_speed?: number, voice_temperature?: number, voicemail_detection_timeout_ms?: number, voicemail_message?: string, voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }, volume?: number, webhook_events?: string[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: object; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: object; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**post** `/create-agent`\n\nCreate a new agent\n\n### Parameters\n\n- `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `voice_id: string`\n Unique voice id used for the agent. Find list of available voices and their preview in Dashboard.\n\n- `agent_name?: string`\n The name of the agent. Only used for your own reference.\n\n- `allow_dtmf_interruption?: boolean`\n If set to true, DTMF input will interrupt the agent even when interruption_sensitivity is 0. Can be overridden per conversation or subagent node. Default to false.\n\n- `allow_user_dtmf?: boolean`\n If set to true, DTMF input will be accepted and processed. If false, any DTMF input will be ignored. Default to true.\n\n- `ambient_sound?: string`\n If set, will add ambient environment sound to the call to make experience more realistic. Currently supports the following options:\n\n- `coffee-shop`: Coffee shop ambience with people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)\n- `convention-hall`: Convention hall ambience, with some echo and people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)\n- `summer-outdoor`: Summer outdoor ambience with cicada chirping. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)\n- `mountain-outdoor`: Mountain outdoor ambience with birds singing. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)\n- `static-noise`: Constant static noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)\n- `call-center`: Call center work noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)\nSet to `null` to remove ambient sound from this agent.\n\n- `ambient_sound_volume?: number`\n If set, will control the volume of the ambient sound. Value ranging from [0,2]. Lower value means quieter ambient sound, while higher value means louder ambient sound. If unset, default value 1 will apply.\n\n- `analysis_successful_prompt?: string`\n Prompt to determine whether the post call or chat analysis should mark the interaction as successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post call or chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `backchannel_frequency?: number`\n Only applicable when enable_backchannel is true. Controls how often the agent would backchannel when a backchannel is possible. Value ranging from [0,1]. Lower value means less frequent backchannel, while higher value means more frequent backchannel. If unset, default value 0.8 will apply.\n\n- `backchannel_words?: string[]`\n Only applicable when enable_backchannel is true. A list of words that the agent would use as backchannel. If not set, default backchannel words will apply. Check out [backchannel default words](/agent/interaction-configuration#backchannel) for more details. Note that certain voices do not work too well with certain words, so it's recommended to experiment before adding any words.\n\n- `begin_message_delay_ms?: number`\n If set, will delay the first message by the specified amount of milliseconds, so that it gives user more time to prepare to take the call. Valid range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only applicable when agent speaks first.\n\n- `boosted_keywords?: string[]`\n Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, street, etc. Entries may reference dynamic variables with `{{variable}}` syntax.\n\n- `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to disable call screen prompt instructions.\n - `agent_identity: string`\n Identity the agent should provide when a call screen asks who is calling. Dynamic variables are supported.\n - `call_purpose: string`\n Purpose the agent should provide when a call screen asks why it is calling. Dynamic variables are supported.\n\n- `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n Custom STT configuration. Only used when stt_mode is set to custom.\n - `endpointing_ms: number`\n Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram, 500 for Soniox\n - `provider: 'azure' | 'deepgram' | 'soniox'`\n ASR provider name.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Granular setting to manage how Retell stores sensitive data (transcripts, recordings, logs, etc.).\nThis replaces the deprecated `opt_out_sensitive_data_storage` field.\n- `everything`: Store all data including transcripts, recordings, and logs.\n- `everything_except_pii`: Store data without PII when PII is detected.\n- `basic_attributes_only`: Store only basic attributes; no transcripts/recordings/logs.\nIf not set, default value of \"everything\" will apply.\n\n- `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n If set, determines what denoising mode to use. Use \"no-denoise\" to bypass all audio denoising. Default to noise-cancellation.\n\n- `enable_backchannel?: boolean`\n Controls whether the agent would backchannel (agent interjects the speaker with phrases like \"yeah\", \"uh-huh\" to signify interest and engagement). Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel.\n\n- `enable_dynamic_responsiveness?: boolean`\n If set to true, the agent will dynamically adjust how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. If unset, default value false will apply.\n\n- `enable_dynamic_voice_speed?: boolean`\n If set to true, will enable dynamic voice speed adjustment based on the user's speech rate and conversation context. If unset, default value false will apply.\n\n- `end_call_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).\n\n- `fallback_voice_ids?: string[]`\n When TTS provider for the selected voice is experiencing outages, we would use fallback voices listed here for the agent. Voice id and the fallback voice ids must be from different TTS providers. The system would go through the list in order, if the first one in the list is also having outage, it would use the next one. Set to null to remove voice fallback for the agent.\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `echo_verification?: boolean`\n Repeat back and confirm important details (voice only).\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `nato_phonetic_alphabet?: boolean`\n Spell using NATO phonetic alphabet style (voice only).\n - `natural_filler_words?: boolean`\n Sprinkle natural speech fillers like \"um\", \"you know\" for a more human, conversational tone.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n - `smart_matching?: boolean`\n Treat near-match similar words as same entity to reduce impact of transcription error (voice only).\n - `speech_normalization?: boolean`\n Convert numbers/dates/currency to spoken forms (voice only).\n\n- `interruption_sensitivity?: number`\n Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted.\n\n- `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection.\n - `action: { type: 'hangup'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as an IVR. Leave as null to use the default definition.\n\n- `language?: string | string[]`\n Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale selection (e.g. `[\"en-US\",\"es-ES\"]`). The array form must contain concrete locale codes only — the `multi` value is valid only as the scalar legacy form and must not appear inside an array. Single-element arrays are normalized to the equivalent scalar on output. If unset, defaults to `en-US`.\n\n- `max_call_duration_ms?: number`\n Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min), and maximum value allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in for signed URLs for public logs and recordings. When enabled, the generated URLs will include security signatures that restrict access and automatically expire after 24 hours.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings. PII redaction is only active when this list is non-empty; an empty array means no PII scrubbing is performed.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends.\n\n- `post_call_analysis_model?: string`\n The model to use for post call analysis. Default to gpt-4.1.\n\n- `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n A list of words / phrases and their pronunciation to be used to guide the audio synthesize for consistent pronunciation. Check the dashboard to see what provider supports this feature. Set to null to remove pronunciation dictionary from this agent.\n\n- `reminder_max_count?: number`\n If set, controls how many times agent would remind user when user is unresponsive. Must be a non negative integer. If unset, default value of 1 will apply (remind once). Set to 0 to disable agent from reminding.\n\n- `reminder_trigger_ms?: number`\n If set (in milliseconds), will trigger a reminder to the agent to speak if the user has been silent for the specified duration after some agent speech. Must be a positive number. If unset, default value of 10000 ms (10 s) will apply.\n\n- `responsiveness?: number`\n Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.\n\n- `ring_duration_ms?: number`\n If set, the phone ringing will last for the specified amount of milliseconds. This applies for both outbound call ringtime, and call transfer ringtime. Default to 30000 (30 s). Valid range is [5000, 300000].\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `stt_mode?: 'fast' | 'accurate' | 'custom'`\n If set, determines whether speech to text should focus on latency or accuracy. Default to fast mode. When set to custom, custom_stt_config must be provided.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `digit_limit?: number`\n The maximum number of digits allowed in the user's DTMF (Dual-Tone Multi-Frequency) input per turn. Once this limit is reached, the input is considered complete and a response will be generated immediately.\n - `termination_key?: string`\n A single key that signals the end of DTMF input. Acceptable values include any digit (0-9), the pound/hash symbol (#), or the asterisk (*).\n - `timeout_ms?: number`\n The time (in milliseconds) to wait for user DTMF input before timing out. The timer resets with each digit received.\n\n- `version_description?: string`\n Optional description of the agent version. Used for your own reference and documentation.\n\n- `vocab_specialization?: 'general' | 'medical'`\n If set, determines the vocabulary set to use for transcription. This setting only applies for English agents, for non English agent, this setting is a no-op. Default to general.\n\n- `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n Controls the emotional tone of the agent's voice. Currently supported for Cartesia and Minimax TTS providers. If unset, no emotion will be used.\n\n- `voice_model?: string`\n Select the voice model used for the selected voice. Each provider has a set of available voice models. Set to null to remove voice model selection, and default ones will apply. Check out dashboard for more details of each voice model.\n\n- `voice_speed?: number`\n Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.\n\n- `voice_temperature?: number`\n Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Check the dashboard to see what provider supports this feature. If unset, default value 1 will apply.\n\n- `voicemail_detection_timeout_ms?: number`\n Configures when to stop running voicemail detection, as it becomes unlikely to hit voicemail after a couple minutes, and keep running it will only have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).\n\n- `voicemail_message?: string`\n The message to be played when the call enters a voicemail. Note that this feature is only available for phone calls. If you want to hangup after hitting voicemail, set this to empty string.\n\n- `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect voicemail in the first 3 minutes of the call. Actions defined (hangup, or leave a message) will be applied when the voicemail is detected. Set this to null to disable voicemail detection.\n - `action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as voicemail. Leave as null to use the default definition.\n\n- `volume?: number`\n If set, will control the volume of the agent. Value ranging from [0,2]. Lower value means quieter agent speech, while higher value means louder agent speech. If unset, default value 1 will apply.\n\n- `webhook_events?: string[]`\n Which webhook events this agent should receive. If not set, defaults to call_started, call_ended, call_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: { agent_identity: string; call_purpose: string; }; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_dtmf_interruption?: boolean`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `assigned_tags?: string[]`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `base_version?: number`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n - `language?: string | string[]`\n - `max_call_duration_ms?: number`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse);\n```",
|
|
876
876
|
perLanguage: {
|
|
877
877
|
typescript: {
|
|
878
878
|
method: 'client.agent.create',
|
|
879
879
|
example:
|
|
880
880
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);",
|
|
881
881
|
},
|
|
882
|
-
http: {
|
|
883
|
-
example:
|
|
884
|
-
'curl https://api.retellai.com/create-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_dtmf_interruption\\": false,\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"max_call_duration_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
885
|
-
},
|
|
886
882
|
python: {
|
|
887
883
|
method: 'agent.create',
|
|
888
884
|
example:
|
|
889
885
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)',
|
|
890
886
|
},
|
|
887
|
+
http: {
|
|
888
|
+
example:
|
|
889
|
+
'curl https://api.retellai.com/create-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_dtmf_interruption\\": false,\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"max_call_duration_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
890
|
+
},
|
|
891
891
|
},
|
|
892
892
|
},
|
|
893
893
|
{
|
|
@@ -908,15 +908,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
908
908
|
example:
|
|
909
909
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse.agent_id);",
|
|
910
910
|
},
|
|
911
|
-
http: {
|
|
912
|
-
example:
|
|
913
|
-
'curl https://api.retellai.com/get-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
914
|
-
},
|
|
915
911
|
python: {
|
|
916
912
|
method: 'agent.retrieve',
|
|
917
913
|
example:
|
|
918
914
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_response = client.agent.retrieve(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(agent_response.agent_id)',
|
|
919
915
|
},
|
|
916
|
+
http: {
|
|
917
|
+
example:
|
|
918
|
+
'curl https://api.retellai.com/get-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
919
|
+
},
|
|
920
920
|
},
|
|
921
921
|
},
|
|
922
922
|
{
|
|
@@ -942,15 +942,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
942
942
|
example:
|
|
943
943
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponses = await client.agent.list();\n\nconsole.log(agentResponses);",
|
|
944
944
|
},
|
|
945
|
-
http: {
|
|
946
|
-
example:
|
|
947
|
-
'curl https://api.retellai.com/list-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
948
|
-
},
|
|
949
945
|
python: {
|
|
950
946
|
method: 'agent.list',
|
|
951
947
|
example:
|
|
952
948
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_responses = client.agent.list()\nprint(agent_responses)',
|
|
953
949
|
},
|
|
950
|
+
http: {
|
|
951
|
+
example:
|
|
952
|
+
'curl https://api.retellai.com/list-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
953
|
+
},
|
|
954
954
|
},
|
|
955
955
|
},
|
|
956
956
|
{
|
|
@@ -1023,22 +1023,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1023
1023
|
],
|
|
1024
1024
|
response: 'object',
|
|
1025
1025
|
markdown:
|
|
1026
|
-
"## update\n\n`client.agent.update(agent_id: string, version?: number | string, agent_name?: string, allow_dtmf_interruption?: boolean, allow_user_dtmf?: boolean, ambient_sound?: string, ambient_sound_volume?: number, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, backchannel_frequency?: number, backchannel_words?: string[], begin_message_delay_ms?: number, boosted_keywords?: string[], call_screening_option?: { agent_identity: string; call_purpose: string; }, custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation', enable_backchannel?: boolean, enable_dynamic_responsiveness?: boolean, enable_dynamic_voice_speed?: boolean, end_call_after_silence_ms?: number, fallback_voice_ids?: string[], guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }, interruption_sensitivity?: number, ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }, language?: string | string[], max_call_duration_ms?: number, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_call_analysis_model?: string, pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[], reminder_max_count?: number, reminder_trigger_ms?: number, response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, responsiveness?: number, ring_duration_ms?: number, signed_url_expiration_ms?: number, stt_mode?: 'fast' | 'accurate' | 'custom', timezone?: string, user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }, version_description?: string, vocab_specialization?: 'general' | 'medical', voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised', voice_id?: string, voice_model?: string, voice_speed?: number, voice_temperature?: number, voicemail_detection_timeout_ms?: number, voicemail_message?: string, voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }, volume?: number, webhook_events?: string[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: object; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: object; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**patch** `/update-agent/{agent_id}`\n\nUpdate an existing agent's latest draft version\n\n### Parameters\n\n- `agent_id: string`\n\n- `version?: number | string`\n Optional version of the API to use for this request. Default to latest version.\n\n- `agent_name?: string`\n The name of the agent. Only used for your own reference.\n\n- `allow_dtmf_interruption?: boolean`\n If set to true, DTMF input will interrupt the agent even when interruption_sensitivity is 0. Can be overridden per conversation or subagent node. Default to false.\n\n- `allow_user_dtmf?: boolean`\n If set to true, DTMF input will be accepted and processed. If false, any DTMF input will be ignored. Default to true.\n\n- `ambient_sound?: string`\n If set, will add ambient environment sound to the call to make experience more realistic. Currently supports the following options:\n\n- `coffee-shop`: Coffee shop ambience with people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)\n- `convention-hall`: Convention hall ambience, with some echo and people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)\n- `summer-outdoor`: Summer outdoor ambience with cicada chirping. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)\n- `mountain-outdoor`: Mountain outdoor ambience with birds singing. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)\n- `static-noise`: Constant static noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)\n- `call-center`: Call center work noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)\nSet to `null` to remove ambient sound from this agent.\n\n\n- `ambient_sound_volume?: number`\n If set, will control the volume of the ambient sound. Value ranging from [0,2]. Lower value means quieter ambient sound, while higher value means louder ambient sound. If unset, default value 1 will apply.\n\n- `analysis_successful_prompt?: string`\n Prompt to determine whether the post call or chat analysis should mark the interaction as successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post call or chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `backchannel_frequency?: number`\n Only applicable when enable_backchannel is true. Controls how often the agent would backchannel when a backchannel is possible. Value ranging from [0,1]. Lower value means less frequent backchannel, while higher value means more frequent backchannel. If unset, default value 0.8 will apply.\n\n- `backchannel_words?: string[]`\n Only applicable when enable_backchannel is true. A list of words that the agent would use as backchannel. If not set, default backchannel words will apply. Check out [backchannel default words](/agent/interaction-configuration#backchannel) for more details. Note that certain voices do not work too well with certain words, so it's recommended to experiment before adding any words.\n\n- `begin_message_delay_ms?: number`\n If set, will delay the first message by the specified amount of milliseconds, so that it gives user more time to prepare to take the call. Valid range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only applicable when agent speaks first.\n\n- `boosted_keywords?: string[]`\n Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, street, etc. Entries may reference dynamic variables with `{{variable}}` syntax.\n\n- `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to disable call screen prompt instructions.\n - `agent_identity: string`\n Identity the agent should provide when a call screen asks who is calling. Dynamic variables are supported.\n - `call_purpose: string`\n Purpose the agent should provide when a call screen asks why it is calling. Dynamic variables are supported.\n\n- `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n Custom STT configuration. Only used when stt_mode is set to custom.\n - `endpointing_ms: number`\n Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram, 500 for Soniox\n - `provider: 'azure' | 'deepgram' | 'soniox'`\n ASR provider name.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Granular setting to manage how Retell stores sensitive data (transcripts, recordings, logs, etc.).\nThis replaces the deprecated `opt_out_sensitive_data_storage` field.\n- `everything`: Store all data including transcripts, recordings, and logs.\n- `everything_except_pii`: Store data without PII when PII is detected.\n- `basic_attributes_only`: Store only basic attributes; no transcripts/recordings/logs.\nIf not set, default value of \"everything\" will apply.\n\n\n- `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n If set, determines what denoising mode to use. Use \"no-denoise\" to bypass all audio denoising. Default to noise-cancellation.\n\n- `enable_backchannel?: boolean`\n Controls whether the agent would backchannel (agent interjects the speaker with phrases like \"yeah\", \"uh-huh\" to signify interest and engagement). Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel.\n\n- `enable_dynamic_responsiveness?: boolean`\n If set to true, the agent will dynamically adjust how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. If unset, default value false will apply.\n\n- `enable_dynamic_voice_speed?: boolean`\n If set to true, will enable dynamic voice speed adjustment based on the user's speech rate and conversation context. If unset, default value false will apply.\n\n- `end_call_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).\n\n- `fallback_voice_ids?: string[]`\n When TTS provider for the selected voice is experiencing outages, we would use fallback voices listed here for the agent. Voice id and the fallback voice ids must be from different TTS providers. The system would go through the list in order, if the first one in the list is also having outage, it would use the next one. Set to null to remove voice fallback for the agent.\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `echo_verification?: boolean`\n Repeat back and confirm important details (voice only).\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `nato_phonetic_alphabet?: boolean`\n Spell using NATO phonetic alphabet style (voice only).\n - `natural_filler_words?: boolean`\n Sprinkle natural speech fillers like \"um\", \"you know\" for a more human, conversational tone.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n - `smart_matching?: boolean`\n Treat near-match similar words as same entity to reduce impact of transcription error (voice only).\n - `speech_normalization?: boolean`\n Convert numbers/dates/currency to spoken forms (voice only).\n\n- `interruption_sensitivity?: number`\n Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted.\n\n- `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection.\n - `action: { type: 'hangup'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as an IVR. Leave as null to use the default definition.\n\n- `language?: string | string[]`\n Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale selection (e.g. `[\"en-US\",\"es-ES\"]`). The array form must contain concrete locale codes only — the `multi` value is valid only as the scalar legacy form and must not appear inside an array. Single-element arrays are normalized to the equivalent scalar on output. If unset, defaults to `en-US`.\n\n- `max_call_duration_ms?: number`\n Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min), and maximum value allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in for signed URLs for public logs and recordings. When enabled, the generated URLs will include security signatures that restrict access and automatically expire after 24 hours.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings. PII redaction is only active when this list is non-empty; an empty array means no PII scrubbing is performed.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends.\n\n- `post_call_analysis_model?: string`\n The model to use for post call analysis. Default to gpt-4.1.\n\n- `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n A list of words / phrases and their pronunciation to be used to guide the audio synthesize for consistent pronunciation. Check the dashboard to see what provider supports this feature. Set to null to remove pronunciation dictionary from this agent.\n\n- `reminder_max_count?: number`\n If set, controls how many times agent would remind user when user is unresponsive. Must be a non negative integer. If unset, default value of 1 will apply (remind once). Set to 0 to disable agent from reminding.\n\n- `reminder_trigger_ms?: number`\n If set (in milliseconds), will trigger a reminder to the agent to speak if the user has been silent for the specified duration after some agent speech. Must be a positive number. If unset, default value of 10000 ms (10 s) will apply.\n\n- `response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `responsiveness?: number`\n Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.\n\n- `ring_duration_ms?: number`\n If set, the phone ringing will last for the specified amount of milliseconds. This applies for both outbound call ringtime, and call transfer ringtime. Default to 30000 (30 s). Valid range is [5000, 300000].\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `stt_mode?: 'fast' | 'accurate' | 'custom'`\n If set, determines whether speech to text should focus on latency or accuracy. Default to fast mode. When set to custom, custom_stt_config must be provided.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `digit_limit?: number`\n The maximum number of digits allowed in the user's DTMF (Dual-Tone Multi-Frequency) input per turn. Once this limit is reached, the input is considered complete and a response will be generated immediately.\n - `termination_key?: string`\n A single key that signals the end of DTMF input. Acceptable values include any digit (0-9), the pound/hash symbol (#), or the asterisk (*).\n - `timeout_ms?: number`\n The time (in milliseconds) to wait for user DTMF input before timing out. The timer resets with each digit received.\n\n- `version_description?: string`\n Optional description of the agent version. Used for your own reference and documentation.\n\n- `vocab_specialization?: 'general' | 'medical'`\n If set, determines the vocabulary set to use for transcription. This setting only applies for English agents, for non English agent, this setting is a no-op. Default to general.\n\n- `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n Controls the emotional tone of the agent's voice. Currently supported for Cartesia and Minimax TTS providers. If unset, no emotion will be used.\n\n\n- `voice_id?: string`\n Unique voice id used for the agent. Find list of available voices and their preview in Dashboard.\n\n- `voice_model?: string`\n Select the voice model used for the selected voice. Each provider has a set of available voice models. Set to null to remove voice model selection, and default ones will apply. Check out dashboard for more details of each voice model.\n\n- `voice_speed?: number`\n Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.\n\n- `voice_temperature?: number`\n Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Check the dashboard to see what provider supports this feature. If unset, default value 1 will apply.\n\n- `voicemail_detection_timeout_ms?: number`\n Configures when to stop running voicemail detection, as it becomes unlikely to hit voicemail after a couple minutes, and keep running it will only have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).\n\n- `voicemail_message?: string`\n The message to be played when the call enters a voicemail. Note that this feature is only available for phone calls. If you want to hangup after hitting voicemail, set this to empty string.\n\n- `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect voicemail in the first 3 minutes of the call. Actions defined (hangup, or leave a message) will be applied when the voicemail is detected. Set this to null to disable voicemail detection.\n - `action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as voicemail. Leave as null to use the default definition.\n\n- `volume?: number`\n If set, will control the volume of the agent. Value ranging from [0,2]. Lower value means quieter agent speech, while higher value means louder agent speech. If unset, default value 1 will apply.\n\n- `webhook_events?: string[]`\n Which webhook events this agent should receive. If not set, defaults to call_started, call_ended, call_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: { agent_identity: string; call_purpose: string; }; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_dtmf_interruption?: boolean`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `assigned_tags?: string[]`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `base_version?: number`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n - `language?: string | string[]`\n - `max_call_duration_ms?: number`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse);\n```",
|
|
1026
|
+
"## update\n\n`client.agent.update(agent_id: string, version?: number | string, agent_name?: string, allow_dtmf_interruption?: boolean, allow_user_dtmf?: boolean, ambient_sound?: string, ambient_sound_volume?: number, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, backchannel_frequency?: number, backchannel_words?: string[], begin_message_delay_ms?: number, boosted_keywords?: string[], call_screening_option?: { agent_identity: string; call_purpose: string; }, custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation', enable_backchannel?: boolean, enable_dynamic_responsiveness?: boolean, enable_dynamic_voice_speed?: boolean, end_call_after_silence_ms?: number, fallback_voice_ids?: string[], guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }, interruption_sensitivity?: number, ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }, language?: string | string[], max_call_duration_ms?: number, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_call_analysis_model?: string, pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[], reminder_max_count?: number, reminder_trigger_ms?: number, response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, responsiveness?: number, ring_duration_ms?: number, signed_url_expiration_ms?: number, stt_mode?: 'fast' | 'accurate' | 'custom', timezone?: string, user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }, version_description?: string, vocab_specialization?: 'general' | 'medical', voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised', voice_id?: string, voice_model?: string, voice_speed?: number, voice_temperature?: number, voicemail_detection_timeout_ms?: number, voicemail_message?: string, voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }, volume?: number, webhook_events?: string[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: object; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: object; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**patch** `/update-agent/{agent_id}`\n\nUpdate an existing agent's latest draft version\n\n### Parameters\n\n- `agent_id: string`\n\n- `version?: number | string`\n Optional version of the API to use for this request. Default to latest version.\n\n- `agent_name?: string`\n The name of the agent. Only used for your own reference.\n\n- `allow_dtmf_interruption?: boolean`\n If set to true, DTMF input will interrupt the agent even when interruption_sensitivity is 0. Can be overridden per conversation or subagent node. Default to false.\n\n- `allow_user_dtmf?: boolean`\n If set to true, DTMF input will be accepted and processed. If false, any DTMF input will be ignored. Default to true.\n\n- `ambient_sound?: string`\n If set, will add ambient environment sound to the call to make experience more realistic. Currently supports the following options:\n\n- `coffee-shop`: Coffee shop ambience with people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)\n- `convention-hall`: Convention hall ambience, with some echo and people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)\n- `summer-outdoor`: Summer outdoor ambience with cicada chirping. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)\n- `mountain-outdoor`: Mountain outdoor ambience with birds singing. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)\n- `static-noise`: Constant static noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)\n- `call-center`: Call center work noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)\nSet to `null` to remove ambient sound from this agent.\n\n- `ambient_sound_volume?: number`\n If set, will control the volume of the ambient sound. Value ranging from [0,2]. Lower value means quieter ambient sound, while higher value means louder ambient sound. If unset, default value 1 will apply.\n\n- `analysis_successful_prompt?: string`\n Prompt to determine whether the post call or chat analysis should mark the interaction as successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post call or chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `backchannel_frequency?: number`\n Only applicable when enable_backchannel is true. Controls how often the agent would backchannel when a backchannel is possible. Value ranging from [0,1]. Lower value means less frequent backchannel, while higher value means more frequent backchannel. If unset, default value 0.8 will apply.\n\n- `backchannel_words?: string[]`\n Only applicable when enable_backchannel is true. A list of words that the agent would use as backchannel. If not set, default backchannel words will apply. Check out [backchannel default words](/agent/interaction-configuration#backchannel) for more details. Note that certain voices do not work too well with certain words, so it's recommended to experiment before adding any words.\n\n- `begin_message_delay_ms?: number`\n If set, will delay the first message by the specified amount of milliseconds, so that it gives user more time to prepare to take the call. Valid range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only applicable when agent speaks first.\n\n- `boosted_keywords?: string[]`\n Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, street, etc. Entries may reference dynamic variables with `{{variable}}` syntax.\n\n- `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to disable call screen prompt instructions.\n - `agent_identity: string`\n Identity the agent should provide when a call screen asks who is calling. Dynamic variables are supported.\n - `call_purpose: string`\n Purpose the agent should provide when a call screen asks why it is calling. Dynamic variables are supported.\n\n- `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n Custom STT configuration. Only used when stt_mode is set to custom.\n - `endpointing_ms: number`\n Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram, 500 for Soniox\n - `provider: 'azure' | 'deepgram' | 'soniox'`\n ASR provider name.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Granular setting to manage how Retell stores sensitive data (transcripts, recordings, logs, etc.).\nThis replaces the deprecated `opt_out_sensitive_data_storage` field.\n- `everything`: Store all data including transcripts, recordings, and logs.\n- `everything_except_pii`: Store data without PII when PII is detected.\n- `basic_attributes_only`: Store only basic attributes; no transcripts/recordings/logs.\nIf not set, default value of \"everything\" will apply.\n\n- `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n If set, determines what denoising mode to use. Use \"no-denoise\" to bypass all audio denoising. Default to noise-cancellation.\n\n- `enable_backchannel?: boolean`\n Controls whether the agent would backchannel (agent interjects the speaker with phrases like \"yeah\", \"uh-huh\" to signify interest and engagement). Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel.\n\n- `enable_dynamic_responsiveness?: boolean`\n If set to true, the agent will dynamically adjust how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. If unset, default value false will apply.\n\n- `enable_dynamic_voice_speed?: boolean`\n If set to true, will enable dynamic voice speed adjustment based on the user's speech rate and conversation context. If unset, default value false will apply.\n\n- `end_call_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).\n\n- `fallback_voice_ids?: string[]`\n When TTS provider for the selected voice is experiencing outages, we would use fallback voices listed here for the agent. Voice id and the fallback voice ids must be from different TTS providers. The system would go through the list in order, if the first one in the list is also having outage, it would use the next one. Set to null to remove voice fallback for the agent.\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `echo_verification?: boolean`\n Repeat back and confirm important details (voice only).\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `nato_phonetic_alphabet?: boolean`\n Spell using NATO phonetic alphabet style (voice only).\n - `natural_filler_words?: boolean`\n Sprinkle natural speech fillers like \"um\", \"you know\" for a more human, conversational tone.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n - `smart_matching?: boolean`\n Treat near-match similar words as same entity to reduce impact of transcription error (voice only).\n - `speech_normalization?: boolean`\n Convert numbers/dates/currency to spoken forms (voice only).\n\n- `interruption_sensitivity?: number`\n Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted.\n\n- `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection.\n - `action: { type: 'hangup'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as an IVR. Leave as null to use the default definition.\n\n- `language?: string | string[]`\n Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale selection (e.g. `[\"en-US\",\"es-ES\"]`). The array form must contain concrete locale codes only — the `multi` value is valid only as the scalar legacy form and must not appear inside an array. Single-element arrays are normalized to the equivalent scalar on output. If unset, defaults to `en-US`.\n\n- `max_call_duration_ms?: number`\n Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min), and maximum value allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in for signed URLs for public logs and recordings. When enabled, the generated URLs will include security signatures that restrict access and automatically expire after 24 hours.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings. PII redaction is only active when this list is non-empty; an empty array means no PII scrubbing is performed.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends.\n\n- `post_call_analysis_model?: string`\n The model to use for post call analysis. Default to gpt-4.1.\n\n- `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n A list of words / phrases and their pronunciation to be used to guide the audio synthesize for consistent pronunciation. Check the dashboard to see what provider supports this feature. Set to null to remove pronunciation dictionary from this agent.\n\n- `reminder_max_count?: number`\n If set, controls how many times agent would remind user when user is unresponsive. Must be a non negative integer. If unset, default value of 1 will apply (remind once). Set to 0 to disable agent from reminding.\n\n- `reminder_trigger_ms?: number`\n If set (in milliseconds), will trigger a reminder to the agent to speak if the user has been silent for the specified duration after some agent speech. Must be a positive number. If unset, default value of 10000 ms (10 s) will apply.\n\n- `response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `responsiveness?: number`\n Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.\n\n- `ring_duration_ms?: number`\n If set, the phone ringing will last for the specified amount of milliseconds. This applies for both outbound call ringtime, and call transfer ringtime. Default to 30000 (30 s). Valid range is [5000, 300000].\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `stt_mode?: 'fast' | 'accurate' | 'custom'`\n If set, determines whether speech to text should focus on latency or accuracy. Default to fast mode. When set to custom, custom_stt_config must be provided.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `digit_limit?: number`\n The maximum number of digits allowed in the user's DTMF (Dual-Tone Multi-Frequency) input per turn. Once this limit is reached, the input is considered complete and a response will be generated immediately.\n - `termination_key?: string`\n A single key that signals the end of DTMF input. Acceptable values include any digit (0-9), the pound/hash symbol (#), or the asterisk (*).\n - `timeout_ms?: number`\n The time (in milliseconds) to wait for user DTMF input before timing out. The timer resets with each digit received.\n\n- `version_description?: string`\n Optional description of the agent version. Used for your own reference and documentation.\n\n- `vocab_specialization?: 'general' | 'medical'`\n If set, determines the vocabulary set to use for transcription. This setting only applies for English agents, for non English agent, this setting is a no-op. Default to general.\n\n- `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n Controls the emotional tone of the agent's voice. Currently supported for Cartesia and Minimax TTS providers. If unset, no emotion will be used.\n\n- `voice_id?: string`\n Unique voice id used for the agent. Find list of available voices and their preview in Dashboard.\n\n- `voice_model?: string`\n Select the voice model used for the selected voice. Each provider has a set of available voice models. Set to null to remove voice model selection, and default ones will apply. Check out dashboard for more details of each voice model.\n\n- `voice_speed?: number`\n Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.\n\n- `voice_temperature?: number`\n Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Check the dashboard to see what provider supports this feature. If unset, default value 1 will apply.\n\n- `voicemail_detection_timeout_ms?: number`\n Configures when to stop running voicemail detection, as it becomes unlikely to hit voicemail after a couple minutes, and keep running it will only have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).\n\n- `voicemail_message?: string`\n The message to be played when the call enters a voicemail. Note that this feature is only available for phone calls. If you want to hangup after hitting voicemail, set this to empty string.\n\n- `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n If this option is set, the call will try to detect voicemail in the first 3 minutes of the call. Actions defined (hangup, or leave a message) will be applied when the voicemail is detected. Set this to null to disable voicemail detection.\n - `action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }`\n - `detection_prompt?: string`\n Optionally describe what should be treated as voicemail. Leave as null to use the default definition.\n\n- `volume?: number`\n If set, will control the volume of the agent. Value ranging from [0,2]. Lower value means quieter agent speech, while higher value means louder agent speech. If unset, default value 1 will apply.\n\n- `webhook_events?: string[]`\n Which webhook events this agent should receive. If not set, defaults to call_started, call_ended, call_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_dtmf_interruption?: boolean; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; assigned_tags?: string[]; backchannel_frequency?: number; backchannel_words?: string[]; base_version?: number; begin_message_delay_ms?: number; boosted_keywords?: string[]; call_screening_option?: { agent_identity: string; call_purpose: string; }; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }; language?: string | string[]; max_call_duration_ms?: number; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_dtmf_interruption?: boolean`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `assigned_tags?: string[]`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `base_version?: number`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `call_screening_option?: { agent_identity: string; call_purpose: string; }`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram' | 'soniox'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; detection_prompt?: string; }`\n - `language?: string | string[]`\n - `max_call_duration_ms?: number`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; detection_prompt?: string; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse);\n```",
|
|
1027
1027
|
perLanguage: {
|
|
1028
1028
|
typescript: {
|
|
1029
1029
|
method: 'client.agent.update',
|
|
1030
1030
|
example:
|
|
1031
1031
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {\n agent_name: 'Jarvis',\n});\n\nconsole.log(agentResponse.agent_id);",
|
|
1032
1032
|
},
|
|
1033
|
-
http: {
|
|
1034
|
-
example:
|
|
1035
|
-
'curl https://api.retellai.com/update-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_dtmf_interruption\\": false,\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"max_call_duration_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
1036
|
-
},
|
|
1037
1033
|
python: {
|
|
1038
1034
|
method: 'agent.update',
|
|
1039
1035
|
example:
|
|
1040
1036
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_response = client.agent.update(\n agent_id="16b980523634a6dc504898cda492e939",\n agent_name="Jarvis",\n)\nprint(agent_response.agent_id)',
|
|
1041
1037
|
},
|
|
1038
|
+
http: {
|
|
1039
|
+
example:
|
|
1040
|
+
'curl https://api.retellai.com/update-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_dtmf_interruption\\": false,\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"max_call_duration_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
1041
|
+
},
|
|
1042
1042
|
},
|
|
1043
1043
|
},
|
|
1044
1044
|
{
|
|
@@ -1058,15 +1058,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1058
1058
|
example:
|
|
1059
1059
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.agent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
|
|
1060
1060
|
},
|
|
1061
|
-
http: {
|
|
1062
|
-
example:
|
|
1063
|
-
'curl https://api.retellai.com/delete-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1064
|
-
},
|
|
1065
1061
|
python: {
|
|
1066
1062
|
method: 'agent.delete',
|
|
1067
1063
|
example:
|
|
1068
1064
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.agent.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
|
|
1069
1065
|
},
|
|
1066
|
+
http: {
|
|
1067
|
+
example:
|
|
1068
|
+
'curl https://api.retellai.com/delete-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1069
|
+
},
|
|
1070
1070
|
},
|
|
1071
1071
|
},
|
|
1072
1072
|
{
|
|
@@ -1086,15 +1086,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1086
1086
|
example:
|
|
1087
1087
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.agent.publish('agent_xxx', { version: 15 });",
|
|
1088
1088
|
},
|
|
1089
|
-
http: {
|
|
1090
|
-
example:
|
|
1091
|
-
'curl https://api.retellai.com/publish-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "version": 15,\n "version_description": "Hotfix for transfer timeout"\n }\'',
|
|
1092
|
-
},
|
|
1093
1089
|
python: {
|
|
1094
1090
|
method: 'agent.publish',
|
|
1095
1091
|
example:
|
|
1096
1092
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.agent.publish(\n agent_id="agent_xxx",\n version=15,\n)',
|
|
1097
1093
|
},
|
|
1094
|
+
http: {
|
|
1095
|
+
example:
|
|
1096
|
+
'curl https://api.retellai.com/publish-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "version": 15,\n "version_description": "Hotfix for transfer timeout"\n }\'',
|
|
1097
|
+
},
|
|
1098
1098
|
},
|
|
1099
1099
|
},
|
|
1100
1100
|
{
|
|
@@ -1115,15 +1115,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1115
1115
|
example:
|
|
1116
1116
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.agent.createVersion('agent_xxx', { base_version: 12 });\n\nconsole.log(response);",
|
|
1117
1117
|
},
|
|
1118
|
-
http: {
|
|
1119
|
-
example:
|
|
1120
|
-
'curl https://api.retellai.com/create-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "base_version": 12\n }\'',
|
|
1121
|
-
},
|
|
1122
1118
|
python: {
|
|
1123
1119
|
method: 'agent.create_version',
|
|
1124
1120
|
example:
|
|
1125
1121
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.agent.create_version(\n agent_id="agent_xxx",\n base_version=12,\n)\nprint(response)',
|
|
1126
1122
|
},
|
|
1123
|
+
http: {
|
|
1124
|
+
example:
|
|
1125
|
+
'curl https://api.retellai.com/create-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "base_version": 12\n }\'',
|
|
1126
|
+
},
|
|
1127
1127
|
},
|
|
1128
1128
|
},
|
|
1129
1129
|
{
|
|
@@ -1143,15 +1143,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1143
1143
|
example:
|
|
1144
1144
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.agent.deleteVersion('agent_xxx', { version: 1 });",
|
|
1145
1145
|
},
|
|
1146
|
-
http: {
|
|
1147
|
-
example:
|
|
1148
|
-
'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1149
|
-
},
|
|
1150
1146
|
python: {
|
|
1151
1147
|
method: 'agent.delete_version',
|
|
1152
1148
|
example:
|
|
1153
1149
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.agent.delete_version(\n agent_id="agent_xxx",\n version=1,\n)',
|
|
1154
1150
|
},
|
|
1151
|
+
http: {
|
|
1152
|
+
example:
|
|
1153
|
+
'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1154
|
+
},
|
|
1155
1155
|
},
|
|
1156
1156
|
},
|
|
1157
1157
|
{
|
|
@@ -1172,15 +1172,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1172
1172
|
example:
|
|
1173
1173
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponses);",
|
|
1174
1174
|
},
|
|
1175
|
-
http: {
|
|
1176
|
-
example:
|
|
1177
|
-
'curl https://api.retellai.com/get-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1178
|
-
},
|
|
1179
1175
|
python: {
|
|
1180
1176
|
method: 'agent.get_versions',
|
|
1181
1177
|
example:
|
|
1182
1178
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_responses = client.agent.get_versions(\n "16b980523634a6dc504898cda492e939",\n)\nprint(agent_responses)',
|
|
1183
1179
|
},
|
|
1180
|
+
http: {
|
|
1181
|
+
example:
|
|
1182
|
+
'curl https://api.retellai.com/get-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1183
|
+
},
|
|
1184
1184
|
},
|
|
1185
1185
|
},
|
|
1186
1186
|
{
|
|
@@ -1224,15 +1224,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1224
1224
|
example:
|
|
1225
1225
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponse = await client.chatAgent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n});\n\nconsole.log(chatAgentResponse.agent_id);",
|
|
1226
1226
|
},
|
|
1227
|
-
http: {
|
|
1228
|
-
example:
|
|
1229
|
-
'curl https://api.retellai.com/create-chat-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
1230
|
-
},
|
|
1231
1227
|
python: {
|
|
1232
1228
|
method: 'chat_agent.create',
|
|
1233
1229
|
example:
|
|
1234
1230
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_response = client.chat_agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n)\nprint(chat_agent_response.agent_id)',
|
|
1235
1231
|
},
|
|
1232
|
+
http: {
|
|
1233
|
+
example:
|
|
1234
|
+
'curl https://api.retellai.com/create-chat-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
1235
|
+
},
|
|
1236
1236
|
},
|
|
1237
1237
|
},
|
|
1238
1238
|
{
|
|
@@ -1254,15 +1254,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1254
1254
|
example:
|
|
1255
1255
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponse = await client.chatAgent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse.agent_id);",
|
|
1256
1256
|
},
|
|
1257
|
-
http: {
|
|
1258
|
-
example:
|
|
1259
|
-
'curl https://api.retellai.com/get-chat-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1260
|
-
},
|
|
1261
1257
|
python: {
|
|
1262
1258
|
method: 'chat_agent.retrieve',
|
|
1263
1259
|
example:
|
|
1264
1260
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_response = client.chat_agent.retrieve(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_response.agent_id)',
|
|
1265
1261
|
},
|
|
1262
|
+
http: {
|
|
1263
|
+
example:
|
|
1264
|
+
'curl https://api.retellai.com/get-chat-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1265
|
+
},
|
|
1266
1266
|
},
|
|
1267
1267
|
},
|
|
1268
1268
|
{
|
|
@@ -1289,15 +1289,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1289
1289
|
example:
|
|
1290
1290
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponses = await client.chatAgent.list();\n\nconsole.log(chatAgentResponses);",
|
|
1291
1291
|
},
|
|
1292
|
-
http: {
|
|
1293
|
-
example:
|
|
1294
|
-
'curl https://api.retellai.com/list-chat-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1295
|
-
},
|
|
1296
1292
|
python: {
|
|
1297
1293
|
method: 'chat_agent.list',
|
|
1298
1294
|
example:
|
|
1299
1295
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_responses = client.chat_agent.list()\nprint(chat_agent_responses)',
|
|
1300
1296
|
},
|
|
1297
|
+
http: {
|
|
1298
|
+
example:
|
|
1299
|
+
'curl https://api.retellai.com/list-chat-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1300
|
+
},
|
|
1301
1301
|
},
|
|
1302
1302
|
},
|
|
1303
1303
|
{
|
|
@@ -1343,15 +1343,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1343
1343
|
example:
|
|
1344
1344
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponse = await client.chatAgent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse.agent_id);",
|
|
1345
1345
|
},
|
|
1346
|
-
http: {
|
|
1347
|
-
example:
|
|
1348
|
-
'curl https://api.retellai.com/update-chat-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
1349
|
-
},
|
|
1350
1346
|
python: {
|
|
1351
1347
|
method: 'chat_agent.update',
|
|
1352
1348
|
example:
|
|
1353
1349
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_response = client.chat_agent.update(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_response.agent_id)',
|
|
1354
1350
|
},
|
|
1351
|
+
http: {
|
|
1352
|
+
example:
|
|
1353
|
+
'curl https://api.retellai.com/update-chat-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
|
|
1354
|
+
},
|
|
1355
1355
|
},
|
|
1356
1356
|
},
|
|
1357
1357
|
{
|
|
@@ -1371,15 +1371,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1371
1371
|
example:
|
|
1372
1372
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chatAgent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
|
|
1373
1373
|
},
|
|
1374
|
-
http: {
|
|
1375
|
-
example:
|
|
1376
|
-
'curl https://api.retellai.com/delete-chat-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1377
|
-
},
|
|
1378
1374
|
python: {
|
|
1379
1375
|
method: 'chat_agent.delete',
|
|
1380
1376
|
example:
|
|
1381
1377
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat_agent.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
|
|
1382
1378
|
},
|
|
1379
|
+
http: {
|
|
1380
|
+
example:
|
|
1381
|
+
'curl https://api.retellai.com/delete-chat-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1382
|
+
},
|
|
1383
1383
|
},
|
|
1384
1384
|
},
|
|
1385
1385
|
{
|
|
@@ -1399,15 +1399,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1399
1399
|
example:
|
|
1400
1400
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chatAgent.publish('agent_xxx', { version: 15 });",
|
|
1401
1401
|
},
|
|
1402
|
-
http: {
|
|
1403
|
-
example:
|
|
1404
|
-
'curl https://api.retellai.com/publish-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "version": 15,\n "version_description": "Hotfix for transfer timeout"\n }\'',
|
|
1405
|
-
},
|
|
1406
1402
|
python: {
|
|
1407
1403
|
method: 'chat_agent.publish',
|
|
1408
1404
|
example:
|
|
1409
1405
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat_agent.publish(\n agent_id="agent_xxx",\n version=15,\n)',
|
|
1410
1406
|
},
|
|
1407
|
+
http: {
|
|
1408
|
+
example:
|
|
1409
|
+
'curl https://api.retellai.com/publish-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "version": 15,\n "version_description": "Hotfix for transfer timeout"\n }\'',
|
|
1410
|
+
},
|
|
1411
1411
|
},
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
@@ -1428,15 +1428,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1428
1428
|
example:
|
|
1429
1429
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chatAgent.createVersion('agent_xxx', { base_version: 12 });\n\nconsole.log(response);",
|
|
1430
1430
|
},
|
|
1431
|
-
http: {
|
|
1432
|
-
example:
|
|
1433
|
-
'curl https://api.retellai.com/create-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "base_version": 12\n }\'',
|
|
1434
|
-
},
|
|
1435
1431
|
python: {
|
|
1436
1432
|
method: 'chat_agent.create_version',
|
|
1437
1433
|
example:
|
|
1438
1434
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.chat_agent.create_version(\n agent_id="agent_xxx",\n base_version=12,\n)\nprint(response)',
|
|
1439
1435
|
},
|
|
1436
|
+
http: {
|
|
1437
|
+
example:
|
|
1438
|
+
'curl https://api.retellai.com/create-agent-version/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "base_version": 12\n }\'',
|
|
1439
|
+
},
|
|
1440
1440
|
},
|
|
1441
1441
|
},
|
|
1442
1442
|
{
|
|
@@ -1456,15 +1456,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1456
1456
|
example:
|
|
1457
1457
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chatAgent.deleteVersion('agent_xxx', { version: 1 });",
|
|
1458
1458
|
},
|
|
1459
|
-
http: {
|
|
1460
|
-
example:
|
|
1461
|
-
'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1462
|
-
},
|
|
1463
1459
|
python: {
|
|
1464
1460
|
method: 'chat_agent.delete_version',
|
|
1465
1461
|
example:
|
|
1466
1462
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat_agent.delete_version(\n agent_id="agent_xxx",\n version=1,\n)',
|
|
1467
1463
|
},
|
|
1464
|
+
http: {
|
|
1465
|
+
example:
|
|
1466
|
+
'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1467
|
+
},
|
|
1468
1468
|
},
|
|
1469
1469
|
},
|
|
1470
1470
|
{
|
|
@@ -1486,15 +1486,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1486
1486
|
example:
|
|
1487
1487
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponses = await client.chatAgent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponses);",
|
|
1488
1488
|
},
|
|
1489
|
-
http: {
|
|
1490
|
-
example:
|
|
1491
|
-
'curl https://api.retellai.com/get-chat-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1492
|
-
},
|
|
1493
1489
|
python: {
|
|
1494
1490
|
method: 'chat_agent.get_versions',
|
|
1495
1491
|
example:
|
|
1496
1492
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_responses = client.chat_agent.get_versions(\n "16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_responses)',
|
|
1497
1493
|
},
|
|
1494
|
+
http: {
|
|
1495
|
+
example:
|
|
1496
|
+
'curl https://api.retellai.com/get-chat-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1497
|
+
},
|
|
1498
1498
|
},
|
|
1499
1499
|
},
|
|
1500
1500
|
{
|
|
@@ -1534,15 +1534,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1534
1534
|
example:
|
|
1535
1535
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponse = await client.llm.create();\n\nconsole.log(llmResponse.llm_id);",
|
|
1536
1536
|
},
|
|
1537
|
-
http: {
|
|
1538
|
-
example:
|
|
1539
|
-
'curl https://api.retellai.com/create-retell-llm \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "model_temperature": 0,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true\n }\'',
|
|
1540
|
-
},
|
|
1541
1537
|
python: {
|
|
1542
1538
|
method: 'llm.create',
|
|
1543
1539
|
example:
|
|
1544
1540
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_response = client.llm.create()\nprint(llm_response.llm_id)',
|
|
1545
1541
|
},
|
|
1542
|
+
http: {
|
|
1543
|
+
example:
|
|
1544
|
+
'curl https://api.retellai.com/create-retell-llm \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "model_temperature": 0,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true\n }\'',
|
|
1545
|
+
},
|
|
1546
1546
|
},
|
|
1547
1547
|
},
|
|
1548
1548
|
{
|
|
@@ -1564,15 +1564,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1564
1564
|
example:
|
|
1565
1565
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponse = await client.llm.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(llmResponse.llm_id);",
|
|
1566
1566
|
},
|
|
1567
|
-
http: {
|
|
1568
|
-
example:
|
|
1569
|
-
'curl https://api.retellai.com/get-retell-llm/$LLM_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1570
|
-
},
|
|
1571
1567
|
python: {
|
|
1572
1568
|
method: 'llm.retrieve',
|
|
1573
1569
|
example:
|
|
1574
1570
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_response = client.llm.retrieve(\n llm_id="16b980523634a6dc504898cda492e939",\n)\nprint(llm_response.llm_id)',
|
|
1575
1571
|
},
|
|
1572
|
+
http: {
|
|
1573
|
+
example:
|
|
1574
|
+
'curl https://api.retellai.com/get-retell-llm/$LLM_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1575
|
+
},
|
|
1576
1576
|
},
|
|
1577
1577
|
},
|
|
1578
1578
|
{
|
|
@@ -1594,15 +1594,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1594
1594
|
example:
|
|
1595
1595
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llms = await client.llm.list();\n\nconsole.log(llms.has_more);",
|
|
1596
1596
|
},
|
|
1597
|
-
http: {
|
|
1598
|
-
example:
|
|
1599
|
-
'curl https://api.retellai.com/v2/list-retell-llms \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1600
|
-
},
|
|
1601
1597
|
python: {
|
|
1602
1598
|
method: 'llm.list',
|
|
1603
1599
|
example:
|
|
1604
1600
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllms = client.llm.list()\nprint(llms.has_more)',
|
|
1605
1601
|
},
|
|
1602
|
+
http: {
|
|
1603
|
+
example:
|
|
1604
|
+
'curl https://api.retellai.com/v2/list-retell-llms \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1605
|
+
},
|
|
1606
1606
|
},
|
|
1607
1607
|
},
|
|
1608
1608
|
{
|
|
@@ -1643,15 +1643,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1643
1643
|
example:
|
|
1644
1644
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {\n begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',\n});\n\nconsole.log(llmResponse.llm_id);",
|
|
1645
1645
|
},
|
|
1646
|
-
http: {
|
|
1647
|
-
example:
|
|
1648
|
-
'curl https://api.retellai.com/update-retell-llm/$LLM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "model_temperature": 0,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true\n }\'',
|
|
1649
|
-
},
|
|
1650
1646
|
python: {
|
|
1651
1647
|
method: 'llm.update',
|
|
1652
1648
|
example:
|
|
1653
1649
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_response = client.llm.update(\n llm_id="16b980523634a6dc504898cda492e939",\n begin_message="Hey I am a virtual assistant calling from Retell Hospital.",\n)\nprint(llm_response.llm_id)',
|
|
1654
1650
|
},
|
|
1651
|
+
http: {
|
|
1652
|
+
example:
|
|
1653
|
+
'curl https://api.retellai.com/update-retell-llm/$LLM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "model_temperature": 0,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true\n }\'',
|
|
1654
|
+
},
|
|
1655
1655
|
},
|
|
1656
1656
|
},
|
|
1657
1657
|
{
|
|
@@ -1671,15 +1671,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1671
1671
|
example:
|
|
1672
1672
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
|
|
1673
1673
|
},
|
|
1674
|
-
http: {
|
|
1675
|
-
example:
|
|
1676
|
-
'curl https://api.retellai.com/delete-retell-llm/$LLM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1677
|
-
},
|
|
1678
1674
|
python: {
|
|
1679
1675
|
method: 'llm.delete',
|
|
1680
1676
|
example:
|
|
1681
1677
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.llm.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
|
|
1682
1678
|
},
|
|
1679
|
+
http: {
|
|
1680
|
+
example:
|
|
1681
|
+
'curl https://api.retellai.com/delete-retell-llm/$LLM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1682
|
+
},
|
|
1683
1683
|
},
|
|
1684
1684
|
},
|
|
1685
1685
|
{
|
|
@@ -1721,15 +1721,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1721
1721
|
example:
|
|
1722
1722
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponse = await client.conversationFlow.create({\n model_choice: { model: 'gpt-4.1', type: 'cascading' },\n nodes: [\n {\n id: 'start',\n instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },\n type: 'conversation',\n },\n ],\n start_speaker: 'agent',\n});\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
|
|
1723
1723
|
},
|
|
1724
|
-
http: {
|
|
1725
|
-
example:
|
|
1726
|
-
'curl https://api.retellai.com/create-conversation-flow \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "model_choice": {\n "model": "gpt-4.1",\n "type": "cascading"\n },\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_speaker": "agent",\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "flex_mode": false,\n "global_prompt": "You are a helpful customer service agent.",\n "is_transfer_llm": false,\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "start_node_id": "start",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
1727
|
-
},
|
|
1728
1724
|
python: {
|
|
1729
1725
|
method: 'conversation_flow.create',
|
|
1730
1726
|
example:
|
|
1731
1727
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_response = client.conversation_flow.create(\n model_choice={\n "model": "gpt-4.1",\n "type": "cascading",\n },\n nodes=[{\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt",\n },\n "type": "conversation",\n }],\n start_speaker="agent",\n)\nprint(conversation_flow_response.conversation_flow_id)',
|
|
1732
1728
|
},
|
|
1729
|
+
http: {
|
|
1730
|
+
example:
|
|
1731
|
+
'curl https://api.retellai.com/create-conversation-flow \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "model_choice": {\n "model": "gpt-4.1",\n "type": "cascading"\n },\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_speaker": "agent",\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "flex_mode": false,\n "global_prompt": "You are a helpful customer service agent.",\n "is_transfer_llm": false,\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "start_node_id": "start",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
1732
|
+
},
|
|
1733
1733
|
},
|
|
1734
1734
|
},
|
|
1735
1735
|
{
|
|
@@ -1751,15 +1751,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1751
1751
|
example:
|
|
1752
1752
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id');\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
|
|
1753
1753
|
},
|
|
1754
|
-
http: {
|
|
1755
|
-
example:
|
|
1756
|
-
'curl https://api.retellai.com/get-conversation-flow/$CONVERSATION_FLOW_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1757
|
-
},
|
|
1758
1754
|
python: {
|
|
1759
1755
|
method: 'conversation_flow.retrieve',
|
|
1760
1756
|
example:
|
|
1761
1757
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_response = client.conversation_flow.retrieve(\n conversation_flow_id="conversation_flow_id",\n)\nprint(conversation_flow_response.conversation_flow_id)',
|
|
1762
1758
|
},
|
|
1759
|
+
http: {
|
|
1760
|
+
example:
|
|
1761
|
+
'curl https://api.retellai.com/get-conversation-flow/$CONVERSATION_FLOW_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1762
|
+
},
|
|
1763
1763
|
},
|
|
1764
1764
|
},
|
|
1765
1765
|
{
|
|
@@ -1781,15 +1781,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1781
1781
|
example:
|
|
1782
1782
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlows = await client.conversationFlow.list();\n\nconsole.log(conversationFlows.has_more);",
|
|
1783
1783
|
},
|
|
1784
|
-
http: {
|
|
1785
|
-
example:
|
|
1786
|
-
'curl https://api.retellai.com/v2/list-conversation-flows \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1787
|
-
},
|
|
1788
1784
|
python: {
|
|
1789
1785
|
method: 'conversation_flow.list',
|
|
1790
1786
|
example:
|
|
1791
1787
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flows = client.conversation_flow.list()\nprint(conversation_flows.has_more)',
|
|
1792
1788
|
},
|
|
1789
|
+
http: {
|
|
1790
|
+
example:
|
|
1791
|
+
'curl https://api.retellai.com/v2/list-conversation-flows \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1792
|
+
},
|
|
1793
1793
|
},
|
|
1794
1794
|
},
|
|
1795
1795
|
{
|
|
@@ -1832,15 +1832,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1832
1832
|
example:
|
|
1833
1833
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id');\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
|
|
1834
1834
|
},
|
|
1835
|
-
http: {
|
|
1836
|
-
example:
|
|
1837
|
-
'curl https://api.retellai.com/update-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "flex_mode": false,\n "global_prompt": "You are a helpful customer service agent.",\n "is_transfer_llm": false,\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_node_id": "start",\n "start_speaker": "agent",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
1838
|
-
},
|
|
1839
1835
|
python: {
|
|
1840
1836
|
method: 'conversation_flow.update',
|
|
1841
1837
|
example:
|
|
1842
1838
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_response = client.conversation_flow.update(\n conversation_flow_id="conversation_flow_id",\n)\nprint(conversation_flow_response.conversation_flow_id)',
|
|
1843
1839
|
},
|
|
1840
|
+
http: {
|
|
1841
|
+
example:
|
|
1842
|
+
'curl https://api.retellai.com/update-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "flex_mode": false,\n "global_prompt": "You are a helpful customer service agent.",\n "is_transfer_llm": false,\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_node_id": "start",\n "start_speaker": "agent",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
1843
|
+
},
|
|
1844
1844
|
},
|
|
1845
1845
|
},
|
|
1846
1846
|
{
|
|
@@ -1860,15 +1860,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1860
1860
|
example:
|
|
1861
1861
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.conversationFlow.delete('conversation_flow_id');",
|
|
1862
1862
|
},
|
|
1863
|
-
http: {
|
|
1864
|
-
example:
|
|
1865
|
-
'curl https://api.retellai.com/delete-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1866
|
-
},
|
|
1867
1863
|
python: {
|
|
1868
1864
|
method: 'conversation_flow.delete',
|
|
1869
1865
|
example:
|
|
1870
1866
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.conversation_flow.delete(\n "conversation_flow_id",\n)',
|
|
1871
1867
|
},
|
|
1868
|
+
http: {
|
|
1869
|
+
example:
|
|
1870
|
+
'curl https://api.retellai.com/delete-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1871
|
+
},
|
|
1872
1872
|
},
|
|
1873
1873
|
},
|
|
1874
1874
|
{
|
|
@@ -1899,15 +1899,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1899
1899
|
example:
|
|
1900
1900
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.create({\n name: 'Customer Information Collector',\n nodes: [\n {\n id: 'collect_info',\n instruction: {\n text: 'Ask the customer for their name and contact information.',\n type: 'prompt',\n },\n type: 'conversation',\n },\n ],\n});\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
|
|
1901
1901
|
},
|
|
1902
|
-
http: {
|
|
1903
|
-
example:
|
|
1904
|
-
'curl https://api.retellai.com/create-conversation-flow-component \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "flex_mode": false,\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
1905
|
-
},
|
|
1906
1902
|
python: {
|
|
1907
1903
|
method: 'conversation_flow_component.create',
|
|
1908
1904
|
example:
|
|
1909
1905
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_response = client.conversation_flow_component.create(\n name="Customer Information Collector",\n nodes=[{\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt",\n },\n "type": "conversation",\n }],\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
|
|
1910
1906
|
},
|
|
1907
|
+
http: {
|
|
1908
|
+
example:
|
|
1909
|
+
'curl https://api.retellai.com/create-conversation-flow-component \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "flex_mode": false,\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
1910
|
+
},
|
|
1911
1911
|
},
|
|
1912
1912
|
},
|
|
1913
1913
|
{
|
|
@@ -1929,15 +1929,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1929
1929
|
example:
|
|
1930
1930
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.retrieve(\n 'conversation_flow_component_id',\n);\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
|
|
1931
1931
|
},
|
|
1932
|
-
http: {
|
|
1933
|
-
example:
|
|
1934
|
-
'curl https://api.retellai.com/get-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1935
|
-
},
|
|
1936
1932
|
python: {
|
|
1937
1933
|
method: 'conversation_flow_component.retrieve',
|
|
1938
1934
|
example:
|
|
1939
1935
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_response = client.conversation_flow_component.retrieve(\n "conversation_flow_component_id",\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
|
|
1940
1936
|
},
|
|
1937
|
+
http: {
|
|
1938
|
+
example:
|
|
1939
|
+
'curl https://api.retellai.com/get-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1940
|
+
},
|
|
1941
1941
|
},
|
|
1942
1942
|
},
|
|
1943
1943
|
{
|
|
@@ -1959,15 +1959,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1959
1959
|
example:
|
|
1960
1960
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponents = await client.conversationFlowComponent.list();\n\nconsole.log(conversationFlowComponents.has_more);",
|
|
1961
1961
|
},
|
|
1962
|
-
http: {
|
|
1963
|
-
example:
|
|
1964
|
-
'curl https://api.retellai.com/v2/list-conversation-flow-components \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1965
|
-
},
|
|
1966
1962
|
python: {
|
|
1967
1963
|
method: 'conversation_flow_component.list',
|
|
1968
1964
|
example:
|
|
1969
1965
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_components = client.conversation_flow_component.list()\nprint(conversation_flow_components.has_more)',
|
|
1970
1966
|
},
|
|
1967
|
+
http: {
|
|
1968
|
+
example:
|
|
1969
|
+
'curl https://api.retellai.com/v2/list-conversation-flow-components \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1970
|
+
},
|
|
1971
1971
|
},
|
|
1972
1972
|
},
|
|
1973
1973
|
{
|
|
@@ -1999,15 +1999,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1999
1999
|
example:
|
|
2000
2000
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.update(\n 'conversation_flow_component_id',\n);\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
|
|
2001
2001
|
},
|
|
2002
|
-
http: {
|
|
2003
|
-
example:
|
|
2004
|
-
'curl https://api.retellai.com/update-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "flex_mode": false,\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
2005
|
-
},
|
|
2006
2002
|
python: {
|
|
2007
2003
|
method: 'conversation_flow_component.update',
|
|
2008
2004
|
example:
|
|
2009
2005
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_response = client.conversation_flow_component.update(\n conversation_flow_component_id="conversation_flow_component_id",\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
|
|
2010
2006
|
},
|
|
2007
|
+
http: {
|
|
2008
|
+
example:
|
|
2009
|
+
'curl https://api.retellai.com/update-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "flex_mode": false,\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
|
|
2010
|
+
},
|
|
2011
2011
|
},
|
|
2012
2012
|
},
|
|
2013
2013
|
{
|
|
@@ -2028,15 +2028,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2028
2028
|
example:
|
|
2029
2029
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.conversationFlowComponent.delete('conversation_flow_component_id');",
|
|
2030
2030
|
},
|
|
2031
|
-
http: {
|
|
2032
|
-
example:
|
|
2033
|
-
'curl https://api.retellai.com/delete-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2034
|
-
},
|
|
2035
2031
|
python: {
|
|
2036
2032
|
method: 'conversation_flow_component.delete',
|
|
2037
2033
|
example:
|
|
2038
2034
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.conversation_flow_component.delete(\n "conversation_flow_component_id",\n)',
|
|
2039
2035
|
},
|
|
2036
|
+
http: {
|
|
2037
|
+
example:
|
|
2038
|
+
'curl https://api.retellai.com/delete-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2039
|
+
},
|
|
2040
2040
|
},
|
|
2041
2041
|
},
|
|
2042
2042
|
{
|
|
@@ -2066,15 +2066,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2066
2066
|
example:
|
|
2067
2067
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.create({\n knowledge_base_name: 'Sample KB',\n});\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
|
|
2068
2068
|
},
|
|
2069
|
-
http: {
|
|
2070
|
-
example:
|
|
2071
|
-
'curl https://api.retellai.com/create-knowledge-base \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F knowledge_base_name=\'Sample KB\' \\\n -F enable_auto_refresh=true \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\' \\\n -F max_chunk_size=2000 \\\n -F min_chunk_size=400',
|
|
2072
|
-
},
|
|
2073
2069
|
python: {
|
|
2074
2070
|
method: 'knowledge_base.create',
|
|
2075
2071
|
example:
|
|
2076
2072
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.create(\n knowledge_base_name="Sample KB",\n)\nprint(knowledge_base_response.knowledge_base_id)',
|
|
2077
2073
|
},
|
|
2074
|
+
http: {
|
|
2075
|
+
example:
|
|
2076
|
+
'curl https://api.retellai.com/create-knowledge-base \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F knowledge_base_name=\'Sample KB\' \\\n -F enable_auto_refresh=true \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\' \\\n -F max_chunk_size=2000 \\\n -F min_chunk_size=400',
|
|
2077
|
+
},
|
|
2078
2078
|
},
|
|
2079
2079
|
},
|
|
2080
2080
|
{
|
|
@@ -2096,15 +2096,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2096
2096
|
example:
|
|
2097
2097
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.retrieve('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
|
|
2098
2098
|
},
|
|
2099
|
-
http: {
|
|
2100
|
-
example:
|
|
2101
|
-
'curl https://api.retellai.com/get-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2102
|
-
},
|
|
2103
2099
|
python: {
|
|
2104
2100
|
method: 'knowledge_base.retrieve',
|
|
2105
2101
|
example:
|
|
2106
2102
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.retrieve(\n "kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
|
|
2107
2103
|
},
|
|
2104
|
+
http: {
|
|
2105
|
+
example:
|
|
2106
|
+
'curl https://api.retellai.com/get-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2107
|
+
},
|
|
2108
2108
|
},
|
|
2109
2109
|
},
|
|
2110
2110
|
{
|
|
@@ -2125,15 +2125,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2125
2125
|
example:
|
|
2126
2126
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponses = await client.knowledgeBase.list();\n\nconsole.log(knowledgeBaseResponses);",
|
|
2127
2127
|
},
|
|
2128
|
-
http: {
|
|
2129
|
-
example:
|
|
2130
|
-
'curl https://api.retellai.com/list-knowledge-bases \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2131
|
-
},
|
|
2132
2128
|
python: {
|
|
2133
2129
|
method: 'knowledge_base.list',
|
|
2134
2130
|
example:
|
|
2135
2131
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_responses = client.knowledge_base.list()\nprint(knowledge_base_responses)',
|
|
2136
2132
|
},
|
|
2133
|
+
http: {
|
|
2134
|
+
example:
|
|
2135
|
+
'curl https://api.retellai.com/list-knowledge-bases \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2136
|
+
},
|
|
2137
2137
|
},
|
|
2138
2138
|
},
|
|
2139
2139
|
{
|
|
@@ -2153,15 +2153,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2153
2153
|
example:
|
|
2154
2154
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.knowledgeBase.delete('kb_1234567890');",
|
|
2155
2155
|
},
|
|
2156
|
-
http: {
|
|
2157
|
-
example:
|
|
2158
|
-
'curl https://api.retellai.com/delete-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2159
|
-
},
|
|
2160
2156
|
python: {
|
|
2161
2157
|
method: 'knowledge_base.delete',
|
|
2162
2158
|
example:
|
|
2163
2159
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.knowledge_base.delete(\n "kb_1234567890",\n)',
|
|
2164
2160
|
},
|
|
2161
|
+
http: {
|
|
2162
|
+
example:
|
|
2163
|
+
'curl https://api.retellai.com/delete-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2164
|
+
},
|
|
2165
2165
|
},
|
|
2166
2166
|
},
|
|
2167
2167
|
{
|
|
@@ -2188,15 +2188,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2188
2188
|
example:
|
|
2189
2189
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.addSources('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
|
|
2190
2190
|
},
|
|
2191
|
-
http: {
|
|
2192
|
-
example:
|
|
2193
|
-
'curl https://api.retellai.com/add-knowledge-base-sources/$KNOWLEDGE_BASE_ID \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\'',
|
|
2194
|
-
},
|
|
2195
2191
|
python: {
|
|
2196
2192
|
method: 'knowledge_base.add_sources',
|
|
2197
2193
|
example:
|
|
2198
2194
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.add_sources(\n knowledge_base_id="kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
|
|
2199
2195
|
},
|
|
2196
|
+
http: {
|
|
2197
|
+
example:
|
|
2198
|
+
'curl https://api.retellai.com/add-knowledge-base-sources/$KNOWLEDGE_BASE_ID \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\'',
|
|
2199
|
+
},
|
|
2200
2200
|
},
|
|
2201
2201
|
},
|
|
2202
2202
|
{
|
|
@@ -2218,15 +2218,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2218
2218
|
example:
|
|
2219
2219
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.deleteSource('source_1234567890', {\n knowledge_base_id: 'kb_1234567890',\n});\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
|
|
2220
2220
|
},
|
|
2221
|
-
http: {
|
|
2222
|
-
example:
|
|
2223
|
-
'curl https://api.retellai.com/delete-knowledge-base-source/$KNOWLEDGE_BASE_ID/source/$SOURCE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2224
|
-
},
|
|
2225
2221
|
python: {
|
|
2226
2222
|
method: 'knowledge_base.delete_source',
|
|
2227
2223
|
example:
|
|
2228
2224
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.delete_source(\n source_id="source_1234567890",\n knowledge_base_id="kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
|
|
2229
2225
|
},
|
|
2226
|
+
http: {
|
|
2227
|
+
example:
|
|
2228
|
+
'curl https://api.retellai.com/delete-knowledge-base-source/$KNOWLEDGE_BASE_ID/source/$SOURCE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2229
|
+
},
|
|
2230
2230
|
},
|
|
2231
2231
|
},
|
|
2232
2232
|
{
|
|
@@ -2253,15 +2253,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2253
2253
|
example:
|
|
2254
2254
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponse = await client.voice.addResource({\n provider_voice_id: 'provider_voice_id',\n voice_name: 'x',\n});\n\nconsole.log(voiceResponse.provider);",
|
|
2255
2255
|
},
|
|
2256
|
-
http: {
|
|
2257
|
-
example:
|
|
2258
|
-
'curl https://api.retellai.com/add-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "provider_voice_id": "provider_voice_id",\n "voice_name": "x"\n }\'',
|
|
2259
|
-
},
|
|
2260
2256
|
python: {
|
|
2261
2257
|
method: 'voice.add_resource',
|
|
2262
2258
|
example:
|
|
2263
2259
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_response = client.voice.add_resource(\n provider_voice_id="provider_voice_id",\n voice_name="x",\n)\nprint(voice_response.provider)',
|
|
2264
2260
|
},
|
|
2261
|
+
http: {
|
|
2262
|
+
example:
|
|
2263
|
+
'curl https://api.retellai.com/add-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "provider_voice_id": "provider_voice_id",\n "voice_name": "x"\n }\'',
|
|
2264
|
+
},
|
|
2265
2265
|
},
|
|
2266
2266
|
},
|
|
2267
2267
|
{
|
|
@@ -2287,15 +2287,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2287
2287
|
example:
|
|
2288
2288
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponse = await client.voice.clone({\n files: [fs.createReadStream('path/to/file')],\n voice_name: 'x',\n voice_provider: 'elevenlabs',\n});\n\nconsole.log(voiceResponse.provider);",
|
|
2289
2289
|
},
|
|
2290
|
-
http: {
|
|
2291
|
-
example:
|
|
2292
|
-
'curl https://api.retellai.com/clone-voice \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F files=\'["Example data"]\' \\\n -F voice_name=x \\\n -F voice_provider=elevenlabs',
|
|
2293
|
-
},
|
|
2294
2290
|
python: {
|
|
2295
2291
|
method: 'voice.clone',
|
|
2296
2292
|
example:
|
|
2297
2293
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_response = client.voice.clone(\n files=[b"Example data"],\n voice_name="x",\n voice_provider="elevenlabs",\n)\nprint(voice_response.provider)',
|
|
2298
2294
|
},
|
|
2295
|
+
http: {
|
|
2296
|
+
example:
|
|
2297
|
+
'curl https://api.retellai.com/clone-voice \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F files=\'["Example data"]\' \\\n -F voice_name=x \\\n -F voice_provider=elevenlabs',
|
|
2298
|
+
},
|
|
2299
2299
|
},
|
|
2300
2300
|
},
|
|
2301
2301
|
{
|
|
@@ -2317,15 +2317,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2317
2317
|
example:
|
|
2318
2318
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponse = await client.voice.retrieve('retell-Cimo');\n\nconsole.log(voiceResponse.provider);",
|
|
2319
2319
|
},
|
|
2320
|
-
http: {
|
|
2321
|
-
example:
|
|
2322
|
-
'curl https://api.retellai.com/get-voice/$VOICE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2323
|
-
},
|
|
2324
2320
|
python: {
|
|
2325
2321
|
method: 'voice.retrieve',
|
|
2326
2322
|
example:
|
|
2327
2323
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_response = client.voice.retrieve(\n "retell-Cimo",\n)\nprint(voice_response.provider)',
|
|
2328
2324
|
},
|
|
2325
|
+
http: {
|
|
2326
|
+
example:
|
|
2327
|
+
'curl https://api.retellai.com/get-voice/$VOICE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2328
|
+
},
|
|
2329
2329
|
},
|
|
2330
2330
|
},
|
|
2331
2331
|
{
|
|
@@ -2346,15 +2346,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2346
2346
|
example:
|
|
2347
2347
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponses = await client.voice.list();\n\nconsole.log(voiceResponses);",
|
|
2348
2348
|
},
|
|
2349
|
-
http: {
|
|
2350
|
-
example:
|
|
2351
|
-
'curl https://api.retellai.com/list-voices \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2352
|
-
},
|
|
2353
2349
|
python: {
|
|
2354
2350
|
method: 'voice.list',
|
|
2355
2351
|
example:
|
|
2356
2352
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_responses = client.voice.list()\nprint(voice_responses)',
|
|
2357
2353
|
},
|
|
2354
|
+
http: {
|
|
2355
|
+
example:
|
|
2356
|
+
'curl https://api.retellai.com/list-voices \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2357
|
+
},
|
|
2358
2358
|
},
|
|
2359
2359
|
},
|
|
2360
2360
|
{
|
|
@@ -2379,15 +2379,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2379
2379
|
example:
|
|
2380
2380
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.voice.search({ search_query: 'search_query' });\n\nconsole.log(response.voices);",
|
|
2381
2381
|
},
|
|
2382
|
-
http: {
|
|
2383
|
-
example:
|
|
2384
|
-
'curl https://api.retellai.com/search-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "search_query": "search_query"\n }\'',
|
|
2385
|
-
},
|
|
2386
2382
|
python: {
|
|
2387
2383
|
method: 'voice.search',
|
|
2388
2384
|
example:
|
|
2389
2385
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.voice.search(\n search_query="search_query",\n)\nprint(response.voices)',
|
|
2390
2386
|
},
|
|
2387
|
+
http: {
|
|
2388
|
+
example:
|
|
2389
|
+
'curl https://api.retellai.com/search-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "search_query": "search_query"\n }\'',
|
|
2390
|
+
},
|
|
2391
2391
|
},
|
|
2392
2392
|
},
|
|
2393
2393
|
{
|
|
@@ -2408,15 +2408,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2408
2408
|
example:
|
|
2409
2409
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst concurrency = await client.concurrency.retrieve();\n\nconsole.log(concurrency.base_concurrency);",
|
|
2410
2410
|
},
|
|
2411
|
-
http: {
|
|
2412
|
-
example:
|
|
2413
|
-
'curl https://api.retellai.com/get-concurrency \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2414
|
-
},
|
|
2415
2411
|
python: {
|
|
2416
2412
|
method: 'concurrency.retrieve',
|
|
2417
2413
|
example:
|
|
2418
2414
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconcurrency = client.concurrency.retrieve()\nprint(concurrency.base_concurrency)',
|
|
2419
2415
|
},
|
|
2416
|
+
http: {
|
|
2417
|
+
example:
|
|
2418
|
+
'curl https://api.retellai.com/get-concurrency \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2419
|
+
},
|
|
2420
2420
|
},
|
|
2421
2421
|
},
|
|
2422
2422
|
{
|
|
@@ -2438,15 +2438,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2438
2438
|
example:
|
|
2439
2439
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst exportRequests = await client.exportRequest.list();\n\nconsole.log(exportRequests.has_more);",
|
|
2440
2440
|
},
|
|
2441
|
-
http: {
|
|
2442
|
-
example:
|
|
2443
|
-
'curl https://api.retellai.com/v2/list-export-requests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2444
|
-
},
|
|
2445
2441
|
python: {
|
|
2446
2442
|
method: 'export_request.list',
|
|
2447
2443
|
example:
|
|
2448
2444
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nexport_requests = client.export_request.list()\nprint(export_requests.has_more)',
|
|
2449
2445
|
},
|
|
2446
|
+
http: {
|
|
2447
|
+
example:
|
|
2448
|
+
'curl https://api.retellai.com/v2/list-export-requests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2449
|
+
},
|
|
2450
2450
|
},
|
|
2451
2451
|
},
|
|
2452
2452
|
{
|
|
@@ -2475,15 +2475,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2475
2475
|
example:
|
|
2476
2476
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchCallResponse = await client.batchCall.createBatchCall({\n from_number: '+14157774444',\n tasks: [{ to_number: '+12137774445' }],\n});\n\nconsole.log(batchCallResponse.batch_call_id);",
|
|
2477
2477
|
},
|
|
2478
|
-
http: {
|
|
2479
|
-
example:
|
|
2480
|
-
'curl https://api.retellai.com/create-batch-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "from_number": "+14157774444",\n "tasks": [\n {\n "to_number": "+12137774445"\n }\n ],\n "name": "First batch call",\n "trigger_timestamp": 1735718400000\n }\'',
|
|
2481
|
-
},
|
|
2482
2478
|
python: {
|
|
2483
2479
|
method: 'batch_call.create_batch_call',
|
|
2484
2480
|
example:
|
|
2485
2481
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_call_response = client.batch_call.create_batch_call(\n from_number="+14157774444",\n tasks=[{\n "to_number": "+12137774445"\n }],\n)\nprint(batch_call_response.batch_call_id)',
|
|
2486
2482
|
},
|
|
2483
|
+
http: {
|
|
2484
|
+
example:
|
|
2485
|
+
'curl https://api.retellai.com/create-batch-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "from_number": "+14157774444",\n "tasks": [\n {\n "to_number": "+12137774445"\n }\n ],\n "name": "First batch call",\n "trigger_timestamp": 1735718400000\n }\'',
|
|
2486
|
+
},
|
|
2487
2487
|
},
|
|
2488
2488
|
},
|
|
2489
2489
|
{
|
|
@@ -2513,15 +2513,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2513
2513
|
example:
|
|
2514
2514
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponse = await client.tests.createTestCaseDefinition({\n metrics: ['string'],\n name: 'name',\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n user_prompt: 'user_prompt',\n});\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
|
|
2515
2515
|
},
|
|
2516
|
-
http: {
|
|
2517
|
-
example:
|
|
2518
|
-
'curl https://api.retellai.com/create-test-case-definition \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "metrics": [\n "string"\n ],\n "name": "name",\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "user_prompt": "user_prompt"\n }\'',
|
|
2519
|
-
},
|
|
2520
2516
|
python: {
|
|
2521
2517
|
method: 'tests.create_test_case_definition',
|
|
2522
2518
|
example:
|
|
2523
2519
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_response = client.tests.create_test_case_definition(\n metrics=["string"],\n name="name",\n response_engine={\n "llm_id": "llm_id",\n "type": "retell-llm",\n },\n user_prompt="user_prompt",\n)\nprint(test_case_definition_response.test_case_definition_id)',
|
|
2524
2520
|
},
|
|
2521
|
+
http: {
|
|
2522
|
+
example:
|
|
2523
|
+
'curl https://api.retellai.com/create-test-case-definition \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "metrics": [\n "string"\n ],\n "name": "name",\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "user_prompt": "user_prompt"\n }\'',
|
|
2524
|
+
},
|
|
2525
2525
|
},
|
|
2526
2526
|
},
|
|
2527
2527
|
{
|
|
@@ -2543,15 +2543,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2543
2543
|
example:
|
|
2544
2544
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponse = await client.tests.getTestCaseDefinition(\n 'test_case_definition_id',\n);\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
|
|
2545
2545
|
},
|
|
2546
|
-
http: {
|
|
2547
|
-
example:
|
|
2548
|
-
'curl https://api.retellai.com/get-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2549
|
-
},
|
|
2550
2546
|
python: {
|
|
2551
2547
|
method: 'tests.get_test_case_definition',
|
|
2552
2548
|
example:
|
|
2553
2549
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_response = client.tests.get_test_case_definition(\n "test_case_definition_id",\n)\nprint(test_case_definition_response.test_case_definition_id)',
|
|
2554
2550
|
},
|
|
2551
|
+
http: {
|
|
2552
|
+
example:
|
|
2553
|
+
'curl https://api.retellai.com/get-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2554
|
+
},
|
|
2555
2555
|
},
|
|
2556
2556
|
},
|
|
2557
2557
|
{
|
|
@@ -2579,15 +2579,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2579
2579
|
example:
|
|
2580
2580
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.tests.listTestCaseDefinitions({ type: 'retell-llm' });\n\nconsole.log(response.has_more);",
|
|
2581
2581
|
},
|
|
2582
|
-
http: {
|
|
2583
|
-
example:
|
|
2584
|
-
'curl https://api.retellai.com/v2/list-test-case-definitions \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2585
|
-
},
|
|
2586
2582
|
python: {
|
|
2587
2583
|
method: 'tests.list_test_case_definitions',
|
|
2588
2584
|
example:
|
|
2589
2585
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.tests.list_test_case_definitions(\n type="retell-llm",\n)\nprint(response.has_more)',
|
|
2590
2586
|
},
|
|
2587
|
+
http: {
|
|
2588
|
+
example:
|
|
2589
|
+
'curl https://api.retellai.com/v2/list-test-case-definitions \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2590
|
+
},
|
|
2591
2591
|
},
|
|
2592
2592
|
},
|
|
2593
2593
|
{
|
|
@@ -2618,15 +2618,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2618
2618
|
example:
|
|
2619
2619
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponse = await client.tests.updateTestCaseDefinition(\n 'test_case_definition_id',\n);\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
|
|
2620
2620
|
},
|
|
2621
|
-
http: {
|
|
2622
|
-
example:
|
|
2623
|
-
"curl https://api.retellai.com/update-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $RETELL_API_KEY\" \\\n -d '{}'",
|
|
2624
|
-
},
|
|
2625
2621
|
python: {
|
|
2626
2622
|
method: 'tests.update_test_case_definition',
|
|
2627
2623
|
example:
|
|
2628
2624
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_response = client.tests.update_test_case_definition(\n test_case_definition_id="test_case_definition_id",\n)\nprint(test_case_definition_response.test_case_definition_id)',
|
|
2629
2625
|
},
|
|
2626
|
+
http: {
|
|
2627
|
+
example:
|
|
2628
|
+
"curl https://api.retellai.com/update-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $RETELL_API_KEY\" \\\n -d '{}'",
|
|
2629
|
+
},
|
|
2630
2630
|
},
|
|
2631
2631
|
},
|
|
2632
2632
|
{
|
|
@@ -2646,15 +2646,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2646
2646
|
example:
|
|
2647
2647
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.tests.deleteTestCaseDefinition('test_case_definition_id');",
|
|
2648
2648
|
},
|
|
2649
|
-
http: {
|
|
2650
|
-
example:
|
|
2651
|
-
'curl https://api.retellai.com/delete-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2652
|
-
},
|
|
2653
2649
|
python: {
|
|
2654
2650
|
method: 'tests.delete_test_case_definition',
|
|
2655
2651
|
example:
|
|
2656
2652
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.tests.delete_test_case_definition(\n "test_case_definition_id",\n)',
|
|
2657
2653
|
},
|
|
2654
|
+
http: {
|
|
2655
|
+
example:
|
|
2656
|
+
'curl https://api.retellai.com/delete-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2657
|
+
},
|
|
2658
2658
|
},
|
|
2659
2659
|
},
|
|
2660
2660
|
{
|
|
@@ -2679,15 +2679,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2679
2679
|
example:
|
|
2680
2680
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchTestResponse = await client.tests.createBatchTest({\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n test_case_definition_ids: ['string'],\n});\n\nconsole.log(batchTestResponse.test_case_batch_job_id);",
|
|
2681
2681
|
},
|
|
2682
|
-
http: {
|
|
2683
|
-
example:
|
|
2684
|
-
'curl https://api.retellai.com/create-batch-test \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "test_case_definition_ids": [\n "string"\n ]\n }\'',
|
|
2685
|
-
},
|
|
2686
2682
|
python: {
|
|
2687
2683
|
method: 'tests.create_batch_test',
|
|
2688
2684
|
example:
|
|
2689
2685
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_test_response = client.tests.create_batch_test(\n response_engine={\n "llm_id": "llm_id",\n "type": "retell-llm",\n },\n test_case_definition_ids=["string"],\n)\nprint(batch_test_response.test_case_batch_job_id)',
|
|
2690
2686
|
},
|
|
2687
|
+
http: {
|
|
2688
|
+
example:
|
|
2689
|
+
'curl https://api.retellai.com/create-batch-test \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "test_case_definition_ids": [\n "string"\n ]\n }\'',
|
|
2690
|
+
},
|
|
2691
2691
|
},
|
|
2692
2692
|
},
|
|
2693
2693
|
{
|
|
@@ -2709,15 +2709,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2709
2709
|
example:
|
|
2710
2710
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchTestResponse = await client.tests.getBatchTest('test_case_batch_job_id');\n\nconsole.log(batchTestResponse.test_case_batch_job_id);",
|
|
2711
2711
|
},
|
|
2712
|
-
http: {
|
|
2713
|
-
example:
|
|
2714
|
-
'curl https://api.retellai.com/get-batch-test/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2715
|
-
},
|
|
2716
2712
|
python: {
|
|
2717
2713
|
method: 'tests.get_batch_test',
|
|
2718
2714
|
example:
|
|
2719
2715
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_test_response = client.tests.get_batch_test(\n "test_case_batch_job_id",\n)\nprint(batch_test_response.test_case_batch_job_id)',
|
|
2720
2716
|
},
|
|
2717
|
+
http: {
|
|
2718
|
+
example:
|
|
2719
|
+
'curl https://api.retellai.com/get-batch-test/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2720
|
+
},
|
|
2721
2721
|
},
|
|
2722
2722
|
},
|
|
2723
2723
|
{
|
|
@@ -2746,15 +2746,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2746
2746
|
example:
|
|
2747
2747
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.tests.listBatchTests({ type: 'retell-llm' });\n\nconsole.log(response.has_more);",
|
|
2748
2748
|
},
|
|
2749
|
-
http: {
|
|
2750
|
-
example:
|
|
2751
|
-
'curl https://api.retellai.com/v2/list-batch-tests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2752
|
-
},
|
|
2753
2749
|
python: {
|
|
2754
2750
|
method: 'tests.list_batch_tests',
|
|
2755
2751
|
example:
|
|
2756
2752
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.tests.list_batch_tests(\n type="retell-llm",\n)\nprint(response.has_more)',
|
|
2757
2753
|
},
|
|
2754
|
+
http: {
|
|
2755
|
+
example:
|
|
2756
|
+
'curl https://api.retellai.com/v2/list-batch-tests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2757
|
+
},
|
|
2758
2758
|
},
|
|
2759
2759
|
},
|
|
2760
2760
|
{
|
|
@@ -2776,15 +2776,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2776
2776
|
example:
|
|
2777
2777
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseJobResponse = await client.tests.getTestRun('test_case_job_id');\n\nconsole.log(testCaseJobResponse.test_case_definition_id);",
|
|
2778
2778
|
},
|
|
2779
|
-
http: {
|
|
2780
|
-
example:
|
|
2781
|
-
'curl https://api.retellai.com/get-test-run/$TEST_CASE_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2782
|
-
},
|
|
2783
2779
|
python: {
|
|
2784
2780
|
method: 'tests.get_test_run',
|
|
2785
2781
|
example:
|
|
2786
2782
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_job_response = client.tests.get_test_run(\n "test_case_job_id",\n)\nprint(test_case_job_response.test_case_definition_id)',
|
|
2787
2783
|
},
|
|
2784
|
+
http: {
|
|
2785
|
+
example:
|
|
2786
|
+
'curl https://api.retellai.com/get-test-run/$TEST_CASE_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2787
|
+
},
|
|
2788
2788
|
},
|
|
2789
2789
|
},
|
|
2790
2790
|
{
|
|
@@ -2806,15 +2806,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2806
2806
|
example:
|
|
2807
2807
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.tests.listTestRuns('test_case_batch_job_id');\n\nconsole.log(response.has_more);",
|
|
2808
2808
|
},
|
|
2809
|
-
http: {
|
|
2810
|
-
example:
|
|
2811
|
-
'curl https://api.retellai.com/v2/list-test-runs/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2812
|
-
},
|
|
2813
2809
|
python: {
|
|
2814
2810
|
method: 'tests.list_test_runs',
|
|
2815
2811
|
example:
|
|
2816
2812
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.tests.list_test_runs(\n test_case_batch_job_id="test_case_batch_job_id",\n)\nprint(response.has_more)',
|
|
2817
2813
|
},
|
|
2814
|
+
http: {
|
|
2815
|
+
example:
|
|
2816
|
+
'curl https://api.retellai.com/v2/list-test-runs/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2817
|
+
},
|
|
2818
2818
|
},
|
|
2819
2819
|
},
|
|
2820
2820
|
{
|
|
@@ -2846,15 +2846,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2846
2846
|
example:
|
|
2847
2847
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.playground.completion('agent_id', {\n messages: [\n { content: \"Hi, I'd like to check my appointment.\", role: 'user' },\n { content: 'Sure! Could you please provide your name?', role: 'agent' },\n { content: 'My name is John Smith.', role: 'user' },\n ],\n});\n\nconsole.log(response.current_node_id);",
|
|
2848
2848
|
},
|
|
2849
|
-
http: {
|
|
2850
|
-
example:
|
|
2851
|
-
'curl https://api.retellai.com/agent-playground-completion/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d "{\n \\"messages\\": [\n {\n \\"content\\": \\"Hi, I\'d like to check my appointment.\\",\n \\"role\\": \\"user\\"\n },\n {\n \\"content\\": \\"Sure! Could you please provide your name?\\",\n \\"role\\": \\"agent\\"\n },\n {\n \\"content\\": \\"My name is John Smith.\\",\n \\"role\\": \\"user\\"\n }\n ],\n \\"component_id\\": \\"component_xyz789\\",\n \\"current_node_id\\": \\"start-node-abc123\\",\n \\"current_state\\": \\"greeting\\",\n \\"dynamic_variables\\": {\n \\"customer_name\\": \\"John Smith\\",\n \\"customer_phone\\": \\"444-223-3564\\"\n }\n }"',
|
|
2852
|
-
},
|
|
2853
2849
|
python: {
|
|
2854
2850
|
method: 'playground.completion',
|
|
2855
2851
|
example:
|
|
2856
2852
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.playground.completion(\n agent_id="agent_id",\n messages=[{\n "content": "Hi, I\'d like to check my appointment.",\n "role": "user",\n }, {\n "content": "Sure! Could you please provide your name?",\n "role": "agent",\n }, {\n "content": "My name is John Smith.",\n "role": "user",\n }],\n)\nprint(response.current_node_id)',
|
|
2857
2853
|
},
|
|
2854
|
+
http: {
|
|
2855
|
+
example:
|
|
2856
|
+
'curl https://api.retellai.com/agent-playground-completion/$AGENT_ID \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d "{\n \\"messages\\": [\n {\n \\"content\\": \\"Hi, I\'d like to check my appointment.\\",\n \\"role\\": \\"user\\"\n },\n {\n \\"content\\": \\"Sure! Could you please provide your name?\\",\n \\"role\\": \\"agent\\"\n },\n {\n \\"content\\": \\"My name is John Smith.\\",\n \\"role\\": \\"user\\"\n }\n ],\n \\"component_id\\": \\"component_xyz789\\",\n \\"current_node_id\\": \\"start-node-abc123\\",\n \\"current_state\\": \\"greeting\\",\n \\"dynamic_variables\\": {\n \\"customer_name\\": \\"John Smith\\",\n \\"customer_phone\\": \\"444-223-3564\\"\n }\n }"',
|
|
2857
|
+
},
|
|
2858
2858
|
},
|
|
2859
2859
|
},
|
|
2860
2860
|
{
|
|
@@ -2875,15 +2875,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2875
2875
|
example:
|
|
2876
2876
|
"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst mcpToolDefinitions = await client.mcpTool.getMcpTools('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', {\n mcp_id: 'mcp-server-1',\n});\n\nconsole.log(mcpToolDefinitions);",
|
|
2877
2877
|
},
|
|
2878
|
-
http: {
|
|
2879
|
-
example:
|
|
2880
|
-
'curl https://api.retellai.com/get-mcp-tools/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2881
|
-
},
|
|
2882
2878
|
python: {
|
|
2883
2879
|
method: 'mcp_tool.get_mcp_tools',
|
|
2884
2880
|
example:
|
|
2885
2881
|
'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nmcp_tool_definitions = client.mcp_tool.get_mcp_tools(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n mcp_id="mcp-server-1",\n)\nprint(mcp_tool_definitions)',
|
|
2886
2882
|
},
|
|
2883
|
+
http: {
|
|
2884
|
+
example:
|
|
2885
|
+
'curl https://api.retellai.com/get-mcp-tools/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2886
|
+
},
|
|
2887
2887
|
},
|
|
2888
2888
|
},
|
|
2889
2889
|
];
|