@retell-ai/mcp-server 5.32.0 → 5.32.2
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 +245 -245
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +245 -245
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/src/local-docs-search.ts +326 -326
package/local-docs-search.js
CHANGED
|
@@ -69,13 +69,13 @@ const EMBEDDED_METHODS = [
|
|
|
69
69
|
method: 'client.call.createPhoneCall',
|
|
70
70
|
example: "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);",
|
|
71
71
|
},
|
|
72
|
+
http: {
|
|
73
|
+
example: '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 }\'',
|
|
74
|
+
},
|
|
72
75
|
python: {
|
|
73
76
|
method: 'call.create_phone_call',
|
|
74
77
|
example: '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)',
|
|
75
78
|
},
|
|
76
|
-
http: {
|
|
77
|
-
example: '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 }\'',
|
|
78
|
-
},
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
{
|
|
@@ -103,13 +103,13 @@ const EMBEDDED_METHODS = [
|
|
|
103
103
|
method: 'client.call.registerPhoneCall',
|
|
104
104
|
example: "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);",
|
|
105
105
|
},
|
|
106
|
+
http: {
|
|
107
|
+
example: '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 }\'',
|
|
108
|
+
},
|
|
106
109
|
python: {
|
|
107
110
|
method: 'call.register_phone_call',
|
|
108
111
|
example: '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)',
|
|
109
112
|
},
|
|
110
|
-
http: {
|
|
111
|
-
example: '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 }\'',
|
|
112
|
-
},
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
115
|
{
|
|
@@ -136,13 +136,13 @@ const EMBEDDED_METHODS = [
|
|
|
136
136
|
method: 'client.call.createWebCall',
|
|
137
137
|
example: "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);",
|
|
138
138
|
},
|
|
139
|
+
http: {
|
|
140
|
+
example: '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 }\'',
|
|
141
|
+
},
|
|
139
142
|
python: {
|
|
140
143
|
method: 'call.create_web_call',
|
|
141
144
|
example: '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)',
|
|
142
145
|
},
|
|
143
|
-
http: {
|
|
144
|
-
example: '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 }\'',
|
|
145
|
-
},
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
{
|
|
@@ -161,13 +161,13 @@ const EMBEDDED_METHODS = [
|
|
|
161
161
|
method: 'client.call.retrieve',
|
|
162
162
|
example: "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);",
|
|
163
163
|
},
|
|
164
|
+
http: {
|
|
165
|
+
example: 'curl https://api.retellai.com/v2/get-call/$CALL_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
166
|
+
},
|
|
164
167
|
python: {
|
|
165
168
|
method: 'call.retrieve',
|
|
166
169
|
example: '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)',
|
|
167
170
|
},
|
|
168
|
-
http: {
|
|
169
|
-
example: 'curl https://api.retellai.com/v2/get-call/$CALL_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
170
|
-
},
|
|
171
171
|
},
|
|
172
172
|
},
|
|
173
173
|
{
|
|
@@ -193,13 +193,13 @@ const EMBEDDED_METHODS = [
|
|
|
193
193
|
method: 'client.call.list',
|
|
194
194
|
example: "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);",
|
|
195
195
|
},
|
|
196
|
+
http: {
|
|
197
|
+
example: 'curl https://api.retellai.com/v3/list-calls \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
198
|
+
},
|
|
196
199
|
python: {
|
|
197
200
|
method: 'call.list',
|
|
198
201
|
example: '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)',
|
|
199
202
|
},
|
|
200
|
-
http: {
|
|
201
|
-
example: 'curl https://api.retellai.com/v3/list-calls \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
202
|
-
},
|
|
203
203
|
},
|
|
204
204
|
},
|
|
205
205
|
{
|
|
@@ -224,13 +224,13 @@ const EMBEDDED_METHODS = [
|
|
|
224
224
|
method: 'client.call.update',
|
|
225
225
|
example: "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);",
|
|
226
226
|
},
|
|
227
|
+
http: {
|
|
228
|
+
example: '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 }\'',
|
|
229
|
+
},
|
|
227
230
|
python: {
|
|
228
231
|
method: 'call.update',
|
|
229
232
|
example: '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)',
|
|
230
233
|
},
|
|
231
|
-
http: {
|
|
232
|
-
example: '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 }\'',
|
|
233
|
-
},
|
|
234
234
|
},
|
|
235
235
|
},
|
|
236
236
|
{
|
|
@@ -248,13 +248,13 @@ const EMBEDDED_METHODS = [
|
|
|
248
248
|
method: 'client.call.stop',
|
|
249
249
|
example: "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');",
|
|
250
250
|
},
|
|
251
|
+
http: {
|
|
252
|
+
example: 'curl https://api.retellai.com/v2/stop-call/$CALL_ID \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
253
|
+
},
|
|
251
254
|
python: {
|
|
252
255
|
method: 'call.stop',
|
|
253
256
|
example: '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)',
|
|
254
257
|
},
|
|
255
|
-
http: {
|
|
256
|
-
example: 'curl https://api.retellai.com/v2/stop-call/$CALL_ID \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
257
|
-
},
|
|
258
258
|
},
|
|
259
259
|
},
|
|
260
260
|
{
|
|
@@ -272,13 +272,13 @@ const EMBEDDED_METHODS = [
|
|
|
272
272
|
method: 'client.call.delete',
|
|
273
273
|
example: "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');",
|
|
274
274
|
},
|
|
275
|
+
http: {
|
|
276
|
+
example: 'curl https://api.retellai.com/v2/delete-call/$CALL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
277
|
+
},
|
|
275
278
|
python: {
|
|
276
279
|
method: 'call.delete',
|
|
277
280
|
example: '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)',
|
|
278
281
|
},
|
|
279
|
-
http: {
|
|
280
|
-
example: 'curl https://api.retellai.com/v2/delete-call/$CALL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
281
|
-
},
|
|
282
282
|
},
|
|
283
283
|
},
|
|
284
284
|
{
|
|
@@ -302,13 +302,13 @@ const EMBEDDED_METHODS = [
|
|
|
302
302
|
method: 'client.chat.create',
|
|
303
303
|
example: "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);",
|
|
304
304
|
},
|
|
305
|
+
http: {
|
|
306
|
+
example: '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 }\'',
|
|
307
|
+
},
|
|
305
308
|
python: {
|
|
306
309
|
method: 'chat.create',
|
|
307
310
|
example: '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)',
|
|
308
311
|
},
|
|
309
|
-
http: {
|
|
310
|
-
example: '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 }\'',
|
|
311
|
-
},
|
|
312
312
|
},
|
|
313
313
|
},
|
|
314
314
|
{
|
|
@@ -334,13 +334,13 @@ const EMBEDDED_METHODS = [
|
|
|
334
334
|
method: 'client.chat.createSMSChat',
|
|
335
335
|
example: "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);",
|
|
336
336
|
},
|
|
337
|
+
http: {
|
|
338
|
+
example: '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 }\'',
|
|
339
|
+
},
|
|
337
340
|
python: {
|
|
338
341
|
method: 'chat.create_sms_chat',
|
|
339
342
|
example: '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)',
|
|
340
343
|
},
|
|
341
|
-
http: {
|
|
342
|
-
example: '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 }\'',
|
|
343
|
-
},
|
|
344
344
|
},
|
|
345
345
|
},
|
|
346
346
|
{
|
|
@@ -358,13 +358,13 @@ const EMBEDDED_METHODS = [
|
|
|
358
358
|
method: 'client.chat.end',
|
|
359
359
|
example: "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');",
|
|
360
360
|
},
|
|
361
|
+
http: {
|
|
362
|
+
example: 'curl https://api.retellai.com/end-chat/$CHAT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
363
|
+
},
|
|
361
364
|
python: {
|
|
362
365
|
method: 'chat.end',
|
|
363
366
|
example: '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)',
|
|
364
367
|
},
|
|
365
|
-
http: {
|
|
366
|
-
example: 'curl https://api.retellai.com/end-chat/$CHAT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
367
|
-
},
|
|
368
368
|
},
|
|
369
369
|
},
|
|
370
370
|
{
|
|
@@ -383,13 +383,13 @@ const EMBEDDED_METHODS = [
|
|
|
383
383
|
method: 'client.chat.retrieve',
|
|
384
384
|
example: "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);",
|
|
385
385
|
},
|
|
386
|
+
http: {
|
|
387
|
+
example: 'curl https://api.retellai.com/get-chat/$CHAT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
388
|
+
},
|
|
386
389
|
python: {
|
|
387
390
|
method: 'chat.retrieve',
|
|
388
391
|
example: '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)',
|
|
389
392
|
},
|
|
390
|
-
http: {
|
|
391
|
-
example: 'curl https://api.retellai.com/get-chat/$CHAT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
392
|
-
},
|
|
393
393
|
},
|
|
394
394
|
},
|
|
395
395
|
{
|
|
@@ -408,13 +408,13 @@ const EMBEDDED_METHODS = [
|
|
|
408
408
|
method: 'client.chat.createChatCompletion',
|
|
409
409
|
example: "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);",
|
|
410
410
|
},
|
|
411
|
+
http: {
|
|
412
|
+
example: '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 }\'',
|
|
413
|
+
},
|
|
411
414
|
python: {
|
|
412
415
|
method: 'chat.create_chat_completion',
|
|
413
416
|
example: '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)',
|
|
414
417
|
},
|
|
415
|
-
http: {
|
|
416
|
-
example: '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 }\'',
|
|
417
|
-
},
|
|
418
418
|
},
|
|
419
419
|
},
|
|
420
420
|
{
|
|
@@ -440,13 +440,13 @@ const EMBEDDED_METHODS = [
|
|
|
440
440
|
method: 'client.chat.list',
|
|
441
441
|
example: "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);",
|
|
442
442
|
},
|
|
443
|
+
http: {
|
|
444
|
+
example: 'curl https://api.retellai.com/v3/list-chats \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
445
|
+
},
|
|
443
446
|
python: {
|
|
444
447
|
method: 'chat.list',
|
|
445
448
|
example: '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)',
|
|
446
449
|
},
|
|
447
|
-
http: {
|
|
448
|
-
example: 'curl https://api.retellai.com/v3/list-chats \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
|
|
449
|
-
},
|
|
450
450
|
},
|
|
451
451
|
},
|
|
452
452
|
{
|
|
@@ -471,13 +471,13 @@ const EMBEDDED_METHODS = [
|
|
|
471
471
|
method: 'client.chat.update',
|
|
472
472
|
example: "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);",
|
|
473
473
|
},
|
|
474
|
+
http: {
|
|
475
|
+
example: '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 }\'',
|
|
476
|
+
},
|
|
474
477
|
python: {
|
|
475
478
|
method: 'chat.update',
|
|
476
479
|
example: '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)',
|
|
477
480
|
},
|
|
478
|
-
http: {
|
|
479
|
-
example: '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 }\'',
|
|
480
|
-
},
|
|
481
481
|
},
|
|
482
482
|
},
|
|
483
483
|
{
|
|
@@ -495,13 +495,13 @@ const EMBEDDED_METHODS = [
|
|
|
495
495
|
method: 'client.chat.delete',
|
|
496
496
|
example: "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');",
|
|
497
497
|
},
|
|
498
|
+
http: {
|
|
499
|
+
example: 'curl https://api.retellai.com/delete-chat/$CHAT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
500
|
+
},
|
|
498
501
|
python: {
|
|
499
502
|
method: 'chat.delete',
|
|
500
503
|
example: '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)',
|
|
501
504
|
},
|
|
502
|
-
http: {
|
|
503
|
-
example: 'curl https://api.retellai.com/delete-chat/$CHAT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
504
|
-
},
|
|
505
505
|
},
|
|
506
506
|
},
|
|
507
507
|
{
|
|
@@ -534,13 +534,13 @@ const EMBEDDED_METHODS = [
|
|
|
534
534
|
method: 'client.phoneNumber.create',
|
|
535
535
|
example: "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);",
|
|
536
536
|
},
|
|
537
|
+
http: {
|
|
538
|
+
example: '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 }\'',
|
|
539
|
+
},
|
|
537
540
|
python: {
|
|
538
541
|
method: 'phone_number.create',
|
|
539
542
|
example: '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)',
|
|
540
543
|
},
|
|
541
|
-
http: {
|
|
542
|
-
example: '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 }\'',
|
|
543
|
-
},
|
|
544
544
|
},
|
|
545
545
|
},
|
|
546
546
|
{
|
|
@@ -572,13 +572,13 @@ const EMBEDDED_METHODS = [
|
|
|
572
572
|
method: 'client.phoneNumber.import',
|
|
573
573
|
example: "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);",
|
|
574
574
|
},
|
|
575
|
+
http: {
|
|
576
|
+
example: '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 }\'',
|
|
577
|
+
},
|
|
575
578
|
python: {
|
|
576
579
|
method: 'phone_number.import_',
|
|
577
580
|
example: '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)',
|
|
578
581
|
},
|
|
579
|
-
http: {
|
|
580
|
-
example: '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 }\'',
|
|
581
|
-
},
|
|
582
582
|
},
|
|
583
583
|
},
|
|
584
584
|
{
|
|
@@ -597,13 +597,13 @@ const EMBEDDED_METHODS = [
|
|
|
597
597
|
method: 'client.phoneNumber.retrieve',
|
|
598
598
|
example: "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);",
|
|
599
599
|
},
|
|
600
|
+
http: {
|
|
601
|
+
example: 'curl https://api.retellai.com/get-phone-number/$PHONE_NUMBER \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
602
|
+
},
|
|
600
603
|
python: {
|
|
601
604
|
method: 'phone_number.retrieve',
|
|
602
605
|
example: '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)',
|
|
603
606
|
},
|
|
604
|
-
http: {
|
|
605
|
-
example: 'curl https://api.retellai.com/get-phone-number/$PHONE_NUMBER \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
606
|
-
},
|
|
607
607
|
},
|
|
608
608
|
},
|
|
609
609
|
{
|
|
@@ -622,13 +622,13 @@ const EMBEDDED_METHODS = [
|
|
|
622
622
|
method: 'client.phoneNumber.list',
|
|
623
623
|
example: "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);",
|
|
624
624
|
},
|
|
625
|
+
http: {
|
|
626
|
+
example: 'curl https://api.retellai.com/v2/list-phone-numbers \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
627
|
+
},
|
|
625
628
|
python: {
|
|
626
629
|
method: 'phone_number.list',
|
|
627
630
|
example: '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)',
|
|
628
631
|
},
|
|
629
|
-
http: {
|
|
630
|
-
example: 'curl https://api.retellai.com/v2/list-phone-numbers \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
631
|
-
},
|
|
632
632
|
},
|
|
633
633
|
},
|
|
634
634
|
{
|
|
@@ -663,13 +663,13 @@ const EMBEDDED_METHODS = [
|
|
|
663
663
|
method: 'client.phoneNumber.update',
|
|
664
664
|
example: "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);",
|
|
665
665
|
},
|
|
666
|
+
http: {
|
|
667
|
+
example: '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 }\'',
|
|
668
|
+
},
|
|
666
669
|
python: {
|
|
667
670
|
method: 'phone_number.update',
|
|
668
671
|
example: '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)',
|
|
669
672
|
},
|
|
670
|
-
http: {
|
|
671
|
-
example: '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 }\'',
|
|
672
|
-
},
|
|
673
673
|
},
|
|
674
674
|
},
|
|
675
675
|
{
|
|
@@ -687,13 +687,13 @@ const EMBEDDED_METHODS = [
|
|
|
687
687
|
method: 'client.phoneNumber.delete',
|
|
688
688
|
example: "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');",
|
|
689
689
|
},
|
|
690
|
+
http: {
|
|
691
|
+
example: 'curl https://api.retellai.com/delete-phone-number/$PHONE_NUMBER \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
692
|
+
},
|
|
690
693
|
python: {
|
|
691
694
|
method: 'phone_number.delete',
|
|
692
695
|
example: '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)',
|
|
693
696
|
},
|
|
694
|
-
http: {
|
|
695
|
-
example: 'curl https://api.retellai.com/delete-phone-number/$PHONE_NUMBER \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
696
|
-
},
|
|
697
697
|
},
|
|
698
698
|
},
|
|
699
699
|
{
|
|
@@ -763,19 +763,19 @@ const EMBEDDED_METHODS = [
|
|
|
763
763
|
'webhook_url?: string;',
|
|
764
764
|
],
|
|
765
765
|
response: 'object',
|
|
766
|
-
markdown: "## 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```",
|
|
766
|
+
markdown: "## 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```",
|
|
767
767
|
perLanguage: {
|
|
768
768
|
typescript: {
|
|
769
769
|
method: 'client.agent.create',
|
|
770
770
|
example: "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);",
|
|
771
771
|
},
|
|
772
|
+
http: {
|
|
773
|
+
example: '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 }"',
|
|
774
|
+
},
|
|
772
775
|
python: {
|
|
773
776
|
method: 'agent.create',
|
|
774
777
|
example: '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)',
|
|
775
778
|
},
|
|
776
|
-
http: {
|
|
777
|
-
example: '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 }"',
|
|
778
|
-
},
|
|
779
779
|
},
|
|
780
780
|
},
|
|
781
781
|
{
|
|
@@ -794,13 +794,13 @@ const EMBEDDED_METHODS = [
|
|
|
794
794
|
method: 'client.agent.retrieve',
|
|
795
795
|
example: "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);",
|
|
796
796
|
},
|
|
797
|
+
http: {
|
|
798
|
+
example: 'curl https://api.retellai.com/get-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
799
|
+
},
|
|
797
800
|
python: {
|
|
798
801
|
method: 'agent.retrieve',
|
|
799
802
|
example: '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)',
|
|
800
803
|
},
|
|
801
|
-
http: {
|
|
802
|
-
example: 'curl https://api.retellai.com/get-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
803
|
-
},
|
|
804
804
|
},
|
|
805
805
|
},
|
|
806
806
|
{
|
|
@@ -824,13 +824,13 @@ const EMBEDDED_METHODS = [
|
|
|
824
824
|
method: 'client.agent.list',
|
|
825
825
|
example: "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);",
|
|
826
826
|
},
|
|
827
|
+
http: {
|
|
828
|
+
example: 'curl https://api.retellai.com/list-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
829
|
+
},
|
|
827
830
|
python: {
|
|
828
831
|
method: 'agent.list',
|
|
829
832
|
example: '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)',
|
|
830
833
|
},
|
|
831
|
-
http: {
|
|
832
|
-
example: 'curl https://api.retellai.com/list-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
833
|
-
},
|
|
834
834
|
},
|
|
835
835
|
},
|
|
836
836
|
{
|
|
@@ -902,19 +902,19 @@ const EMBEDDED_METHODS = [
|
|
|
902
902
|
'webhook_url?: string;',
|
|
903
903
|
],
|
|
904
904
|
response: 'object',
|
|
905
|
-
markdown: "## 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```",
|
|
905
|
+
markdown: "## 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```",
|
|
906
906
|
perLanguage: {
|
|
907
907
|
typescript: {
|
|
908
908
|
method: 'client.agent.update',
|
|
909
909
|
example: "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);",
|
|
910
910
|
},
|
|
911
|
+
http: {
|
|
912
|
+
example: '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 }"',
|
|
913
|
+
},
|
|
911
914
|
python: {
|
|
912
915
|
method: 'agent.update',
|
|
913
916
|
example: '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)',
|
|
914
917
|
},
|
|
915
|
-
http: {
|
|
916
|
-
example: '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 }"',
|
|
917
|
-
},
|
|
918
918
|
},
|
|
919
919
|
},
|
|
920
920
|
{
|
|
@@ -932,13 +932,13 @@ const EMBEDDED_METHODS = [
|
|
|
932
932
|
method: 'client.agent.delete',
|
|
933
933
|
example: "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');",
|
|
934
934
|
},
|
|
935
|
+
http: {
|
|
936
|
+
example: 'curl https://api.retellai.com/delete-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
937
|
+
},
|
|
935
938
|
python: {
|
|
936
939
|
method: 'agent.delete',
|
|
937
940
|
example: '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)',
|
|
938
941
|
},
|
|
939
|
-
http: {
|
|
940
|
-
example: 'curl https://api.retellai.com/delete-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
941
|
-
},
|
|
942
942
|
},
|
|
943
943
|
},
|
|
944
944
|
{
|
|
@@ -956,13 +956,13 @@ const EMBEDDED_METHODS = [
|
|
|
956
956
|
method: 'client.agent.publish',
|
|
957
957
|
example: "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 });",
|
|
958
958
|
},
|
|
959
|
+
http: {
|
|
960
|
+
example: '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 }\'',
|
|
961
|
+
},
|
|
959
962
|
python: {
|
|
960
963
|
method: 'agent.publish',
|
|
961
964
|
example: '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)',
|
|
962
965
|
},
|
|
963
|
-
http: {
|
|
964
|
-
example: '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 }\'',
|
|
965
|
-
},
|
|
966
966
|
},
|
|
967
967
|
},
|
|
968
968
|
{
|
|
@@ -981,13 +981,13 @@ const EMBEDDED_METHODS = [
|
|
|
981
981
|
method: 'client.agent.createVersion',
|
|
982
982
|
example: "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);",
|
|
983
983
|
},
|
|
984
|
+
http: {
|
|
985
|
+
example: '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 }\'',
|
|
986
|
+
},
|
|
984
987
|
python: {
|
|
985
988
|
method: 'agent.create_version',
|
|
986
989
|
example: '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)',
|
|
987
990
|
},
|
|
988
|
-
http: {
|
|
989
|
-
example: '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 }\'',
|
|
990
|
-
},
|
|
991
991
|
},
|
|
992
992
|
},
|
|
993
993
|
{
|
|
@@ -1005,13 +1005,13 @@ const EMBEDDED_METHODS = [
|
|
|
1005
1005
|
method: 'client.agent.deleteVersion',
|
|
1006
1006
|
example: "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 });",
|
|
1007
1007
|
},
|
|
1008
|
+
http: {
|
|
1009
|
+
example: 'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1010
|
+
},
|
|
1008
1011
|
python: {
|
|
1009
1012
|
method: 'agent.delete_version',
|
|
1010
1013
|
example: '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)',
|
|
1011
1014
|
},
|
|
1012
|
-
http: {
|
|
1013
|
-
example: 'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1014
|
-
},
|
|
1015
1015
|
},
|
|
1016
1016
|
},
|
|
1017
1017
|
{
|
|
@@ -1030,13 +1030,13 @@ const EMBEDDED_METHODS = [
|
|
|
1030
1030
|
method: 'client.agent.getVersions',
|
|
1031
1031
|
example: "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);",
|
|
1032
1032
|
},
|
|
1033
|
+
http: {
|
|
1034
|
+
example: 'curl https://api.retellai.com/get-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1035
|
+
},
|
|
1033
1036
|
python: {
|
|
1034
1037
|
method: 'agent.get_versions',
|
|
1035
1038
|
example: '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)',
|
|
1036
1039
|
},
|
|
1037
|
-
http: {
|
|
1038
|
-
example: 'curl https://api.retellai.com/get-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1039
|
-
},
|
|
1040
1040
|
},
|
|
1041
1041
|
},
|
|
1042
1042
|
{
|
|
@@ -1077,13 +1077,13 @@ const EMBEDDED_METHODS = [
|
|
|
1077
1077
|
method: 'client.chatAgent.create',
|
|
1078
1078
|
example: "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);",
|
|
1079
1079
|
},
|
|
1080
|
+
http: {
|
|
1081
|
+
example: '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 }"',
|
|
1082
|
+
},
|
|
1080
1083
|
python: {
|
|
1081
1084
|
method: 'chat_agent.create',
|
|
1082
1085
|
example: '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)',
|
|
1083
1086
|
},
|
|
1084
|
-
http: {
|
|
1085
|
-
example: '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 }"',
|
|
1086
|
-
},
|
|
1087
1087
|
},
|
|
1088
1088
|
},
|
|
1089
1089
|
{
|
|
@@ -1102,13 +1102,13 @@ const EMBEDDED_METHODS = [
|
|
|
1102
1102
|
method: 'client.chatAgent.retrieve',
|
|
1103
1103
|
example: "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);",
|
|
1104
1104
|
},
|
|
1105
|
+
http: {
|
|
1106
|
+
example: 'curl https://api.retellai.com/get-chat-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1107
|
+
},
|
|
1105
1108
|
python: {
|
|
1106
1109
|
method: 'chat_agent.retrieve',
|
|
1107
1110
|
example: '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)',
|
|
1108
1111
|
},
|
|
1109
|
-
http: {
|
|
1110
|
-
example: 'curl https://api.retellai.com/get-chat-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1111
|
-
},
|
|
1112
1112
|
},
|
|
1113
1113
|
},
|
|
1114
1114
|
{
|
|
@@ -1132,13 +1132,13 @@ const EMBEDDED_METHODS = [
|
|
|
1132
1132
|
method: 'client.chatAgent.list',
|
|
1133
1133
|
example: "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);",
|
|
1134
1134
|
},
|
|
1135
|
+
http: {
|
|
1136
|
+
example: 'curl https://api.retellai.com/list-chat-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1137
|
+
},
|
|
1135
1138
|
python: {
|
|
1136
1139
|
method: 'chat_agent.list',
|
|
1137
1140
|
example: '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)',
|
|
1138
1141
|
},
|
|
1139
|
-
http: {
|
|
1140
|
-
example: 'curl https://api.retellai.com/list-chat-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1141
|
-
},
|
|
1142
1142
|
},
|
|
1143
1143
|
},
|
|
1144
1144
|
{
|
|
@@ -1181,13 +1181,13 @@ const EMBEDDED_METHODS = [
|
|
|
1181
1181
|
method: 'client.chatAgent.update',
|
|
1182
1182
|
example: "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);",
|
|
1183
1183
|
},
|
|
1184
|
+
http: {
|
|
1185
|
+
example: '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 }"',
|
|
1186
|
+
},
|
|
1184
1187
|
python: {
|
|
1185
1188
|
method: 'chat_agent.update',
|
|
1186
1189
|
example: '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)',
|
|
1187
1190
|
},
|
|
1188
|
-
http: {
|
|
1189
|
-
example: '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 }"',
|
|
1190
|
-
},
|
|
1191
1191
|
},
|
|
1192
1192
|
},
|
|
1193
1193
|
{
|
|
@@ -1205,13 +1205,13 @@ const EMBEDDED_METHODS = [
|
|
|
1205
1205
|
method: 'client.chatAgent.delete',
|
|
1206
1206
|
example: "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');",
|
|
1207
1207
|
},
|
|
1208
|
+
http: {
|
|
1209
|
+
example: 'curl https://api.retellai.com/delete-chat-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1210
|
+
},
|
|
1208
1211
|
python: {
|
|
1209
1212
|
method: 'chat_agent.delete',
|
|
1210
1213
|
example: '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)',
|
|
1211
1214
|
},
|
|
1212
|
-
http: {
|
|
1213
|
-
example: 'curl https://api.retellai.com/delete-chat-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1214
|
-
},
|
|
1215
1215
|
},
|
|
1216
1216
|
},
|
|
1217
1217
|
{
|
|
@@ -1229,13 +1229,13 @@ const EMBEDDED_METHODS = [
|
|
|
1229
1229
|
method: 'client.chatAgent.publish',
|
|
1230
1230
|
example: "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 });",
|
|
1231
1231
|
},
|
|
1232
|
+
http: {
|
|
1233
|
+
example: '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 }\'',
|
|
1234
|
+
},
|
|
1232
1235
|
python: {
|
|
1233
1236
|
method: 'chat_agent.publish',
|
|
1234
1237
|
example: '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)',
|
|
1235
1238
|
},
|
|
1236
|
-
http: {
|
|
1237
|
-
example: '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 }\'',
|
|
1238
|
-
},
|
|
1239
1239
|
},
|
|
1240
1240
|
},
|
|
1241
1241
|
{
|
|
@@ -1254,13 +1254,13 @@ const EMBEDDED_METHODS = [
|
|
|
1254
1254
|
method: 'client.chatAgent.createVersion',
|
|
1255
1255
|
example: "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);",
|
|
1256
1256
|
},
|
|
1257
|
+
http: {
|
|
1258
|
+
example: '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 }\'',
|
|
1259
|
+
},
|
|
1257
1260
|
python: {
|
|
1258
1261
|
method: 'chat_agent.create_version',
|
|
1259
1262
|
example: '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)',
|
|
1260
1263
|
},
|
|
1261
|
-
http: {
|
|
1262
|
-
example: '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 }\'',
|
|
1263
|
-
},
|
|
1264
1264
|
},
|
|
1265
1265
|
},
|
|
1266
1266
|
{
|
|
@@ -1278,13 +1278,13 @@ const EMBEDDED_METHODS = [
|
|
|
1278
1278
|
method: 'client.chatAgent.deleteVersion',
|
|
1279
1279
|
example: "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 });",
|
|
1280
1280
|
},
|
|
1281
|
+
http: {
|
|
1282
|
+
example: 'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1283
|
+
},
|
|
1281
1284
|
python: {
|
|
1282
1285
|
method: 'chat_agent.delete_version',
|
|
1283
1286
|
example: '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)',
|
|
1284
1287
|
},
|
|
1285
|
-
http: {
|
|
1286
|
-
example: 'curl https://api.retellai.com/delete-agent-version/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1287
|
-
},
|
|
1288
1288
|
},
|
|
1289
1289
|
},
|
|
1290
1290
|
{
|
|
@@ -1303,13 +1303,13 @@ const EMBEDDED_METHODS = [
|
|
|
1303
1303
|
method: 'client.chatAgent.getVersions',
|
|
1304
1304
|
example: "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);",
|
|
1305
1305
|
},
|
|
1306
|
+
http: {
|
|
1307
|
+
example: 'curl https://api.retellai.com/get-chat-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1308
|
+
},
|
|
1306
1309
|
python: {
|
|
1307
1310
|
method: 'chat_agent.get_versions',
|
|
1308
1311
|
example: '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)',
|
|
1309
1312
|
},
|
|
1310
|
-
http: {
|
|
1311
|
-
example: 'curl https://api.retellai.com/get-chat-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1312
|
-
},
|
|
1313
1313
|
},
|
|
1314
1314
|
},
|
|
1315
1315
|
{
|
|
@@ -1345,13 +1345,13 @@ const EMBEDDED_METHODS = [
|
|
|
1345
1345
|
method: 'client.llm.create',
|
|
1346
1346
|
example: "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);",
|
|
1347
1347
|
},
|
|
1348
|
+
http: {
|
|
1349
|
+
example: '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 }\'',
|
|
1350
|
+
},
|
|
1348
1351
|
python: {
|
|
1349
1352
|
method: 'llm.create',
|
|
1350
1353
|
example: '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)',
|
|
1351
1354
|
},
|
|
1352
|
-
http: {
|
|
1353
|
-
example: '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 }\'',
|
|
1354
|
-
},
|
|
1355
1355
|
},
|
|
1356
1356
|
},
|
|
1357
1357
|
{
|
|
@@ -1370,13 +1370,13 @@ const EMBEDDED_METHODS = [
|
|
|
1370
1370
|
method: 'client.llm.retrieve',
|
|
1371
1371
|
example: "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);",
|
|
1372
1372
|
},
|
|
1373
|
+
http: {
|
|
1374
|
+
example: 'curl https://api.retellai.com/get-retell-llm/$LLM_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1375
|
+
},
|
|
1373
1376
|
python: {
|
|
1374
1377
|
method: 'llm.retrieve',
|
|
1375
1378
|
example: '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)',
|
|
1376
1379
|
},
|
|
1377
|
-
http: {
|
|
1378
|
-
example: 'curl https://api.retellai.com/get-retell-llm/$LLM_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1379
|
-
},
|
|
1380
1380
|
},
|
|
1381
1381
|
},
|
|
1382
1382
|
{
|
|
@@ -1395,13 +1395,13 @@ const EMBEDDED_METHODS = [
|
|
|
1395
1395
|
method: 'client.llm.list',
|
|
1396
1396
|
example: "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);",
|
|
1397
1397
|
},
|
|
1398
|
+
http: {
|
|
1399
|
+
example: 'curl https://api.retellai.com/v2/list-retell-llms \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1400
|
+
},
|
|
1398
1401
|
python: {
|
|
1399
1402
|
method: 'llm.list',
|
|
1400
1403
|
example: '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)',
|
|
1401
1404
|
},
|
|
1402
|
-
http: {
|
|
1403
|
-
example: 'curl https://api.retellai.com/v2/list-retell-llms \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1404
|
-
},
|
|
1405
1405
|
},
|
|
1406
1406
|
},
|
|
1407
1407
|
{
|
|
@@ -1439,13 +1439,13 @@ const EMBEDDED_METHODS = [
|
|
|
1439
1439
|
method: 'client.llm.update',
|
|
1440
1440
|
example: "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);",
|
|
1441
1441
|
},
|
|
1442
|
+
http: {
|
|
1443
|
+
example: '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 }\'',
|
|
1444
|
+
},
|
|
1442
1445
|
python: {
|
|
1443
1446
|
method: 'llm.update',
|
|
1444
1447
|
example: '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)',
|
|
1445
1448
|
},
|
|
1446
|
-
http: {
|
|
1447
|
-
example: '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 }\'',
|
|
1448
|
-
},
|
|
1449
1449
|
},
|
|
1450
1450
|
},
|
|
1451
1451
|
{
|
|
@@ -1463,13 +1463,13 @@ const EMBEDDED_METHODS = [
|
|
|
1463
1463
|
method: 'client.llm.delete',
|
|
1464
1464
|
example: "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');",
|
|
1465
1465
|
},
|
|
1466
|
+
http: {
|
|
1467
|
+
example: 'curl https://api.retellai.com/delete-retell-llm/$LLM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1468
|
+
},
|
|
1466
1469
|
python: {
|
|
1467
1470
|
method: 'llm.delete',
|
|
1468
1471
|
example: '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)',
|
|
1469
1472
|
},
|
|
1470
|
-
http: {
|
|
1471
|
-
example: 'curl https://api.retellai.com/delete-retell-llm/$LLM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1472
|
-
},
|
|
1473
1473
|
},
|
|
1474
1474
|
},
|
|
1475
1475
|
{
|
|
@@ -1507,13 +1507,13 @@ const EMBEDDED_METHODS = [
|
|
|
1507
1507
|
method: 'client.conversationFlow.create',
|
|
1508
1508
|
example: "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);",
|
|
1509
1509
|
},
|
|
1510
|
+
http: {
|
|
1511
|
+
example: '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 }\'',
|
|
1512
|
+
},
|
|
1510
1513
|
python: {
|
|
1511
1514
|
method: 'conversation_flow.create',
|
|
1512
1515
|
example: '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)',
|
|
1513
1516
|
},
|
|
1514
|
-
http: {
|
|
1515
|
-
example: '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 }\'',
|
|
1516
|
-
},
|
|
1517
1517
|
},
|
|
1518
1518
|
},
|
|
1519
1519
|
{
|
|
@@ -1532,13 +1532,13 @@ const EMBEDDED_METHODS = [
|
|
|
1532
1532
|
method: 'client.conversationFlow.retrieve',
|
|
1533
1533
|
example: "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);",
|
|
1534
1534
|
},
|
|
1535
|
+
http: {
|
|
1536
|
+
example: 'curl https://api.retellai.com/get-conversation-flow/$CONVERSATION_FLOW_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1537
|
+
},
|
|
1535
1538
|
python: {
|
|
1536
1539
|
method: 'conversation_flow.retrieve',
|
|
1537
1540
|
example: '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)',
|
|
1538
1541
|
},
|
|
1539
|
-
http: {
|
|
1540
|
-
example: 'curl https://api.retellai.com/get-conversation-flow/$CONVERSATION_FLOW_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1541
|
-
},
|
|
1542
1542
|
},
|
|
1543
1543
|
},
|
|
1544
1544
|
{
|
|
@@ -1557,13 +1557,13 @@ const EMBEDDED_METHODS = [
|
|
|
1557
1557
|
method: 'client.conversationFlow.list',
|
|
1558
1558
|
example: "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);",
|
|
1559
1559
|
},
|
|
1560
|
+
http: {
|
|
1561
|
+
example: 'curl https://api.retellai.com/v2/list-conversation-flows \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1562
|
+
},
|
|
1560
1563
|
python: {
|
|
1561
1564
|
method: 'conversation_flow.list',
|
|
1562
1565
|
example: '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)',
|
|
1563
1566
|
},
|
|
1564
|
-
http: {
|
|
1565
|
-
example: 'curl https://api.retellai.com/v2/list-conversation-flows \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1566
|
-
},
|
|
1567
1567
|
},
|
|
1568
1568
|
},
|
|
1569
1569
|
{
|
|
@@ -1603,13 +1603,13 @@ const EMBEDDED_METHODS = [
|
|
|
1603
1603
|
method: 'client.conversationFlow.update',
|
|
1604
1604
|
example: "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);",
|
|
1605
1605
|
},
|
|
1606
|
+
http: {
|
|
1607
|
+
example: '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 }\'',
|
|
1608
|
+
},
|
|
1606
1609
|
python: {
|
|
1607
1610
|
method: 'conversation_flow.update',
|
|
1608
1611
|
example: '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)',
|
|
1609
1612
|
},
|
|
1610
|
-
http: {
|
|
1611
|
-
example: '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 }\'',
|
|
1612
|
-
},
|
|
1613
1613
|
},
|
|
1614
1614
|
},
|
|
1615
1615
|
{
|
|
@@ -1627,13 +1627,13 @@ const EMBEDDED_METHODS = [
|
|
|
1627
1627
|
method: 'client.conversationFlow.delete',
|
|
1628
1628
|
example: "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');",
|
|
1629
1629
|
},
|
|
1630
|
+
http: {
|
|
1631
|
+
example: 'curl https://api.retellai.com/delete-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1632
|
+
},
|
|
1630
1633
|
python: {
|
|
1631
1634
|
method: 'conversation_flow.delete',
|
|
1632
1635
|
example: '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)',
|
|
1633
1636
|
},
|
|
1634
|
-
http: {
|
|
1635
|
-
example: 'curl https://api.retellai.com/delete-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1636
|
-
},
|
|
1637
1637
|
},
|
|
1638
1638
|
},
|
|
1639
1639
|
{
|
|
@@ -1661,13 +1661,13 @@ const EMBEDDED_METHODS = [
|
|
|
1661
1661
|
method: 'client.conversationFlowComponent.create',
|
|
1662
1662
|
example: "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);",
|
|
1663
1663
|
},
|
|
1664
|
+
http: {
|
|
1665
|
+
example: '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 }\'',
|
|
1666
|
+
},
|
|
1664
1667
|
python: {
|
|
1665
1668
|
method: 'conversation_flow_component.create',
|
|
1666
1669
|
example: '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)',
|
|
1667
1670
|
},
|
|
1668
|
-
http: {
|
|
1669
|
-
example: '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 }\'',
|
|
1670
|
-
},
|
|
1671
1671
|
},
|
|
1672
1672
|
},
|
|
1673
1673
|
{
|
|
@@ -1686,13 +1686,13 @@ const EMBEDDED_METHODS = [
|
|
|
1686
1686
|
method: 'client.conversationFlowComponent.retrieve',
|
|
1687
1687
|
example: "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);",
|
|
1688
1688
|
},
|
|
1689
|
+
http: {
|
|
1690
|
+
example: 'curl https://api.retellai.com/get-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1691
|
+
},
|
|
1689
1692
|
python: {
|
|
1690
1693
|
method: 'conversation_flow_component.retrieve',
|
|
1691
1694
|
example: '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)',
|
|
1692
1695
|
},
|
|
1693
|
-
http: {
|
|
1694
|
-
example: 'curl https://api.retellai.com/get-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1695
|
-
},
|
|
1696
1696
|
},
|
|
1697
1697
|
},
|
|
1698
1698
|
{
|
|
@@ -1711,13 +1711,13 @@ const EMBEDDED_METHODS = [
|
|
|
1711
1711
|
method: 'client.conversationFlowComponent.list',
|
|
1712
1712
|
example: "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);",
|
|
1713
1713
|
},
|
|
1714
|
+
http: {
|
|
1715
|
+
example: 'curl https://api.retellai.com/v2/list-conversation-flow-components \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1716
|
+
},
|
|
1714
1717
|
python: {
|
|
1715
1718
|
method: 'conversation_flow_component.list',
|
|
1716
1719
|
example: '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)',
|
|
1717
1720
|
},
|
|
1718
|
-
http: {
|
|
1719
|
-
example: 'curl https://api.retellai.com/v2/list-conversation-flow-components \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1720
|
-
},
|
|
1721
1721
|
},
|
|
1722
1722
|
},
|
|
1723
1723
|
{
|
|
@@ -1746,13 +1746,13 @@ const EMBEDDED_METHODS = [
|
|
|
1746
1746
|
method: 'client.conversationFlowComponent.update',
|
|
1747
1747
|
example: "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);",
|
|
1748
1748
|
},
|
|
1749
|
+
http: {
|
|
1750
|
+
example: '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 }\'',
|
|
1751
|
+
},
|
|
1749
1752
|
python: {
|
|
1750
1753
|
method: 'conversation_flow_component.update',
|
|
1751
1754
|
example: '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)',
|
|
1752
1755
|
},
|
|
1753
|
-
http: {
|
|
1754
|
-
example: '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 }\'',
|
|
1755
|
-
},
|
|
1756
1756
|
},
|
|
1757
1757
|
},
|
|
1758
1758
|
{
|
|
@@ -1770,13 +1770,13 @@ const EMBEDDED_METHODS = [
|
|
|
1770
1770
|
method: 'client.conversationFlowComponent.delete',
|
|
1771
1771
|
example: "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');",
|
|
1772
1772
|
},
|
|
1773
|
+
http: {
|
|
1774
|
+
example: 'curl https://api.retellai.com/delete-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1775
|
+
},
|
|
1773
1776
|
python: {
|
|
1774
1777
|
method: 'conversation_flow_component.delete',
|
|
1775
1778
|
example: '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)',
|
|
1776
1779
|
},
|
|
1777
|
-
http: {
|
|
1778
|
-
example: 'curl https://api.retellai.com/delete-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1779
|
-
},
|
|
1780
1780
|
},
|
|
1781
1781
|
},
|
|
1782
1782
|
{
|
|
@@ -1803,13 +1803,13 @@ const EMBEDDED_METHODS = [
|
|
|
1803
1803
|
method: 'client.knowledgeBase.create',
|
|
1804
1804
|
example: "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);",
|
|
1805
1805
|
},
|
|
1806
|
+
http: {
|
|
1807
|
+
example: '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',
|
|
1808
|
+
},
|
|
1806
1809
|
python: {
|
|
1807
1810
|
method: 'knowledge_base.create',
|
|
1808
1811
|
example: '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)',
|
|
1809
1812
|
},
|
|
1810
|
-
http: {
|
|
1811
|
-
example: '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',
|
|
1812
|
-
},
|
|
1813
1813
|
},
|
|
1814
1814
|
},
|
|
1815
1815
|
{
|
|
@@ -1828,13 +1828,13 @@ const EMBEDDED_METHODS = [
|
|
|
1828
1828
|
method: 'client.knowledgeBase.retrieve',
|
|
1829
1829
|
example: "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);",
|
|
1830
1830
|
},
|
|
1831
|
+
http: {
|
|
1832
|
+
example: 'curl https://api.retellai.com/get-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1833
|
+
},
|
|
1831
1834
|
python: {
|
|
1832
1835
|
method: 'knowledge_base.retrieve',
|
|
1833
1836
|
example: '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)',
|
|
1834
1837
|
},
|
|
1835
|
-
http: {
|
|
1836
|
-
example: 'curl https://api.retellai.com/get-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1837
|
-
},
|
|
1838
1838
|
},
|
|
1839
1839
|
},
|
|
1840
1840
|
{
|
|
@@ -1852,13 +1852,13 @@ const EMBEDDED_METHODS = [
|
|
|
1852
1852
|
method: 'client.knowledgeBase.list',
|
|
1853
1853
|
example: "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);",
|
|
1854
1854
|
},
|
|
1855
|
+
http: {
|
|
1856
|
+
example: 'curl https://api.retellai.com/list-knowledge-bases \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1857
|
+
},
|
|
1855
1858
|
python: {
|
|
1856
1859
|
method: 'knowledge_base.list',
|
|
1857
1860
|
example: '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)',
|
|
1858
1861
|
},
|
|
1859
|
-
http: {
|
|
1860
|
-
example: 'curl https://api.retellai.com/list-knowledge-bases \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1861
|
-
},
|
|
1862
1862
|
},
|
|
1863
1863
|
},
|
|
1864
1864
|
{
|
|
@@ -1876,13 +1876,13 @@ const EMBEDDED_METHODS = [
|
|
|
1876
1876
|
method: 'client.knowledgeBase.delete',
|
|
1877
1877
|
example: "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');",
|
|
1878
1878
|
},
|
|
1879
|
+
http: {
|
|
1880
|
+
example: 'curl https://api.retellai.com/delete-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1881
|
+
},
|
|
1879
1882
|
python: {
|
|
1880
1883
|
method: 'knowledge_base.delete',
|
|
1881
1884
|
example: '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)',
|
|
1882
1885
|
},
|
|
1883
|
-
http: {
|
|
1884
|
-
example: 'curl https://api.retellai.com/delete-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
1885
|
-
},
|
|
1886
1886
|
},
|
|
1887
1887
|
},
|
|
1888
1888
|
{
|
|
@@ -1906,13 +1906,13 @@ const EMBEDDED_METHODS = [
|
|
|
1906
1906
|
method: 'client.knowledgeBase.addSources',
|
|
1907
1907
|
example: "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);",
|
|
1908
1908
|
},
|
|
1909
|
+
http: {
|
|
1910
|
+
example: '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"]\'',
|
|
1911
|
+
},
|
|
1909
1912
|
python: {
|
|
1910
1913
|
method: 'knowledge_base.add_sources',
|
|
1911
1914
|
example: '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)',
|
|
1912
1915
|
},
|
|
1913
|
-
http: {
|
|
1914
|
-
example: '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"]\'',
|
|
1915
|
-
},
|
|
1916
1916
|
},
|
|
1917
1917
|
},
|
|
1918
1918
|
{
|
|
@@ -1931,13 +1931,13 @@ const EMBEDDED_METHODS = [
|
|
|
1931
1931
|
method: 'client.knowledgeBase.deleteSource',
|
|
1932
1932
|
example: "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);",
|
|
1933
1933
|
},
|
|
1934
|
+
http: {
|
|
1935
|
+
example: '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"',
|
|
1936
|
+
},
|
|
1934
1937
|
python: {
|
|
1935
1938
|
method: 'knowledge_base.delete_source',
|
|
1936
1939
|
example: '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)',
|
|
1937
1940
|
},
|
|
1938
|
-
http: {
|
|
1939
|
-
example: '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"',
|
|
1940
|
-
},
|
|
1941
1941
|
},
|
|
1942
1942
|
},
|
|
1943
1943
|
{
|
|
@@ -1961,13 +1961,13 @@ const EMBEDDED_METHODS = [
|
|
|
1961
1961
|
method: 'client.voice.addResource',
|
|
1962
1962
|
example: "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);",
|
|
1963
1963
|
},
|
|
1964
|
+
http: {
|
|
1965
|
+
example: '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 }\'',
|
|
1966
|
+
},
|
|
1964
1967
|
python: {
|
|
1965
1968
|
method: 'voice.add_resource',
|
|
1966
1969
|
example: '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)',
|
|
1967
1970
|
},
|
|
1968
|
-
http: {
|
|
1969
|
-
example: '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 }\'',
|
|
1970
|
-
},
|
|
1971
1971
|
},
|
|
1972
1972
|
},
|
|
1973
1973
|
{
|
|
@@ -1990,13 +1990,13 @@ const EMBEDDED_METHODS = [
|
|
|
1990
1990
|
method: 'client.voice.clone',
|
|
1991
1991
|
example: "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);",
|
|
1992
1992
|
},
|
|
1993
|
+
http: {
|
|
1994
|
+
example: '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',
|
|
1995
|
+
},
|
|
1993
1996
|
python: {
|
|
1994
1997
|
method: 'voice.clone',
|
|
1995
1998
|
example: '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)',
|
|
1996
1999
|
},
|
|
1997
|
-
http: {
|
|
1998
|
-
example: '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',
|
|
1999
|
-
},
|
|
2000
2000
|
},
|
|
2001
2001
|
},
|
|
2002
2002
|
{
|
|
@@ -2015,13 +2015,13 @@ const EMBEDDED_METHODS = [
|
|
|
2015
2015
|
method: 'client.voice.retrieve',
|
|
2016
2016
|
example: "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);",
|
|
2017
2017
|
},
|
|
2018
|
+
http: {
|
|
2019
|
+
example: 'curl https://api.retellai.com/get-voice/$VOICE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2020
|
+
},
|
|
2018
2021
|
python: {
|
|
2019
2022
|
method: 'voice.retrieve',
|
|
2020
2023
|
example: '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)',
|
|
2021
2024
|
},
|
|
2022
|
-
http: {
|
|
2023
|
-
example: 'curl https://api.retellai.com/get-voice/$VOICE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2024
|
-
},
|
|
2025
2025
|
},
|
|
2026
2026
|
},
|
|
2027
2027
|
{
|
|
@@ -2039,13 +2039,13 @@ const EMBEDDED_METHODS = [
|
|
|
2039
2039
|
method: 'client.voice.list',
|
|
2040
2040
|
example: "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);",
|
|
2041
2041
|
},
|
|
2042
|
+
http: {
|
|
2043
|
+
example: 'curl https://api.retellai.com/list-voices \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2044
|
+
},
|
|
2042
2045
|
python: {
|
|
2043
2046
|
method: 'voice.list',
|
|
2044
2047
|
example: '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)',
|
|
2045
2048
|
},
|
|
2046
|
-
http: {
|
|
2047
|
-
example: 'curl https://api.retellai.com/list-voices \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2048
|
-
},
|
|
2049
2049
|
},
|
|
2050
2050
|
},
|
|
2051
2051
|
{
|
|
@@ -2067,13 +2067,13 @@ const EMBEDDED_METHODS = [
|
|
|
2067
2067
|
method: 'client.voice.search',
|
|
2068
2068
|
example: "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);",
|
|
2069
2069
|
},
|
|
2070
|
+
http: {
|
|
2071
|
+
example: '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 }\'',
|
|
2072
|
+
},
|
|
2070
2073
|
python: {
|
|
2071
2074
|
method: 'voice.search',
|
|
2072
2075
|
example: '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)',
|
|
2073
2076
|
},
|
|
2074
|
-
http: {
|
|
2075
|
-
example: '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 }\'',
|
|
2076
|
-
},
|
|
2077
2077
|
},
|
|
2078
2078
|
},
|
|
2079
2079
|
{
|
|
@@ -2091,13 +2091,13 @@ const EMBEDDED_METHODS = [
|
|
|
2091
2091
|
method: 'client.concurrency.retrieve',
|
|
2092
2092
|
example: "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);",
|
|
2093
2093
|
},
|
|
2094
|
+
http: {
|
|
2095
|
+
example: 'curl https://api.retellai.com/get-concurrency \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2096
|
+
},
|
|
2094
2097
|
python: {
|
|
2095
2098
|
method: 'concurrency.retrieve',
|
|
2096
2099
|
example: '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)',
|
|
2097
2100
|
},
|
|
2098
|
-
http: {
|
|
2099
|
-
example: 'curl https://api.retellai.com/get-concurrency \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2100
|
-
},
|
|
2101
2101
|
},
|
|
2102
2102
|
},
|
|
2103
2103
|
{
|
|
@@ -2116,13 +2116,13 @@ const EMBEDDED_METHODS = [
|
|
|
2116
2116
|
method: 'client.exportRequest.list',
|
|
2117
2117
|
example: "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);",
|
|
2118
2118
|
},
|
|
2119
|
+
http: {
|
|
2120
|
+
example: 'curl https://api.retellai.com/v2/list-export-requests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2121
|
+
},
|
|
2119
2122
|
python: {
|
|
2120
2123
|
method: 'export_request.list',
|
|
2121
2124
|
example: '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)',
|
|
2122
2125
|
},
|
|
2123
|
-
http: {
|
|
2124
|
-
example: 'curl https://api.retellai.com/v2/list-export-requests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2125
|
-
},
|
|
2126
2126
|
},
|
|
2127
2127
|
},
|
|
2128
2128
|
{
|
|
@@ -2148,13 +2148,13 @@ const EMBEDDED_METHODS = [
|
|
|
2148
2148
|
method: 'client.batchCall.createBatchCall',
|
|
2149
2149
|
example: "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);",
|
|
2150
2150
|
},
|
|
2151
|
+
http: {
|
|
2152
|
+
example: '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 }\'',
|
|
2153
|
+
},
|
|
2151
2154
|
python: {
|
|
2152
2155
|
method: 'batch_call.create_batch_call',
|
|
2153
2156
|
example: '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)',
|
|
2154
2157
|
},
|
|
2155
|
-
http: {
|
|
2156
|
-
example: '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 }\'',
|
|
2157
|
-
},
|
|
2158
2158
|
},
|
|
2159
2159
|
},
|
|
2160
2160
|
{
|
|
@@ -2181,13 +2181,13 @@ const EMBEDDED_METHODS = [
|
|
|
2181
2181
|
method: 'client.tests.createTestCaseDefinition',
|
|
2182
2182
|
example: "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);",
|
|
2183
2183
|
},
|
|
2184
|
+
http: {
|
|
2185
|
+
example: '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 }\'',
|
|
2186
|
+
},
|
|
2184
2187
|
python: {
|
|
2185
2188
|
method: 'tests.create_test_case_definition',
|
|
2186
2189
|
example: '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)',
|
|
2187
2190
|
},
|
|
2188
|
-
http: {
|
|
2189
|
-
example: '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 }\'',
|
|
2190
|
-
},
|
|
2191
2191
|
},
|
|
2192
2192
|
},
|
|
2193
2193
|
{
|
|
@@ -2206,13 +2206,13 @@ const EMBEDDED_METHODS = [
|
|
|
2206
2206
|
method: 'client.tests.getTestCaseDefinition',
|
|
2207
2207
|
example: "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);",
|
|
2208
2208
|
},
|
|
2209
|
+
http: {
|
|
2210
|
+
example: 'curl https://api.retellai.com/get-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2211
|
+
},
|
|
2209
2212
|
python: {
|
|
2210
2213
|
method: 'tests.get_test_case_definition',
|
|
2211
2214
|
example: '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)',
|
|
2212
2215
|
},
|
|
2213
|
-
http: {
|
|
2214
|
-
example: 'curl https://api.retellai.com/get-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2215
|
-
},
|
|
2216
2216
|
},
|
|
2217
2217
|
},
|
|
2218
2218
|
{
|
|
@@ -2237,13 +2237,13 @@ const EMBEDDED_METHODS = [
|
|
|
2237
2237
|
method: 'client.tests.listTestCaseDefinitions',
|
|
2238
2238
|
example: "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);",
|
|
2239
2239
|
},
|
|
2240
|
+
http: {
|
|
2241
|
+
example: 'curl https://api.retellai.com/v2/list-test-case-definitions \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2242
|
+
},
|
|
2240
2243
|
python: {
|
|
2241
2244
|
method: 'tests.list_test_case_definitions',
|
|
2242
2245
|
example: '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)',
|
|
2243
2246
|
},
|
|
2244
|
-
http: {
|
|
2245
|
-
example: 'curl https://api.retellai.com/v2/list-test-case-definitions \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2246
|
-
},
|
|
2247
2247
|
},
|
|
2248
2248
|
},
|
|
2249
2249
|
{
|
|
@@ -2271,13 +2271,13 @@ const EMBEDDED_METHODS = [
|
|
|
2271
2271
|
method: 'client.tests.updateTestCaseDefinition',
|
|
2272
2272
|
example: "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);",
|
|
2273
2273
|
},
|
|
2274
|
+
http: {
|
|
2275
|
+
example: "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 '{}'",
|
|
2276
|
+
},
|
|
2274
2277
|
python: {
|
|
2275
2278
|
method: 'tests.update_test_case_definition',
|
|
2276
2279
|
example: '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)',
|
|
2277
2280
|
},
|
|
2278
|
-
http: {
|
|
2279
|
-
example: "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 '{}'",
|
|
2280
|
-
},
|
|
2281
2281
|
},
|
|
2282
2282
|
},
|
|
2283
2283
|
{
|
|
@@ -2295,13 +2295,13 @@ const EMBEDDED_METHODS = [
|
|
|
2295
2295
|
method: 'client.tests.deleteTestCaseDefinition',
|
|
2296
2296
|
example: "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');",
|
|
2297
2297
|
},
|
|
2298
|
+
http: {
|
|
2299
|
+
example: 'curl https://api.retellai.com/delete-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2300
|
+
},
|
|
2298
2301
|
python: {
|
|
2299
2302
|
method: 'tests.delete_test_case_definition',
|
|
2300
2303
|
example: '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)',
|
|
2301
2304
|
},
|
|
2302
|
-
http: {
|
|
2303
|
-
example: 'curl https://api.retellai.com/delete-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2304
|
-
},
|
|
2305
2305
|
},
|
|
2306
2306
|
},
|
|
2307
2307
|
{
|
|
@@ -2323,13 +2323,13 @@ const EMBEDDED_METHODS = [
|
|
|
2323
2323
|
method: 'client.tests.createBatchTest',
|
|
2324
2324
|
example: "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);",
|
|
2325
2325
|
},
|
|
2326
|
+
http: {
|
|
2327
|
+
example: '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 }\'',
|
|
2328
|
+
},
|
|
2326
2329
|
python: {
|
|
2327
2330
|
method: 'tests.create_batch_test',
|
|
2328
2331
|
example: '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)',
|
|
2329
2332
|
},
|
|
2330
|
-
http: {
|
|
2331
|
-
example: '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 }\'',
|
|
2332
|
-
},
|
|
2333
2333
|
},
|
|
2334
2334
|
},
|
|
2335
2335
|
{
|
|
@@ -2348,13 +2348,13 @@ const EMBEDDED_METHODS = [
|
|
|
2348
2348
|
method: 'client.tests.getBatchTest',
|
|
2349
2349
|
example: "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);",
|
|
2350
2350
|
},
|
|
2351
|
+
http: {
|
|
2352
|
+
example: 'curl https://api.retellai.com/get-batch-test/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2353
|
+
},
|
|
2351
2354
|
python: {
|
|
2352
2355
|
method: 'tests.get_batch_test',
|
|
2353
2356
|
example: '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)',
|
|
2354
2357
|
},
|
|
2355
|
-
http: {
|
|
2356
|
-
example: 'curl https://api.retellai.com/get-batch-test/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2357
|
-
},
|
|
2358
2358
|
},
|
|
2359
2359
|
},
|
|
2360
2360
|
{
|
|
@@ -2380,13 +2380,13 @@ const EMBEDDED_METHODS = [
|
|
|
2380
2380
|
method: 'client.tests.listBatchTests',
|
|
2381
2381
|
example: "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);",
|
|
2382
2382
|
},
|
|
2383
|
+
http: {
|
|
2384
|
+
example: 'curl https://api.retellai.com/v2/list-batch-tests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2385
|
+
},
|
|
2383
2386
|
python: {
|
|
2384
2387
|
method: 'tests.list_batch_tests',
|
|
2385
2388
|
example: '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)',
|
|
2386
2389
|
},
|
|
2387
|
-
http: {
|
|
2388
|
-
example: 'curl https://api.retellai.com/v2/list-batch-tests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2389
|
-
},
|
|
2390
2390
|
},
|
|
2391
2391
|
},
|
|
2392
2392
|
{
|
|
@@ -2405,13 +2405,13 @@ const EMBEDDED_METHODS = [
|
|
|
2405
2405
|
method: 'client.tests.getTestRun',
|
|
2406
2406
|
example: "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);",
|
|
2407
2407
|
},
|
|
2408
|
+
http: {
|
|
2409
|
+
example: 'curl https://api.retellai.com/get-test-run/$TEST_CASE_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2410
|
+
},
|
|
2408
2411
|
python: {
|
|
2409
2412
|
method: 'tests.get_test_run',
|
|
2410
2413
|
example: '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)',
|
|
2411
2414
|
},
|
|
2412
|
-
http: {
|
|
2413
|
-
example: 'curl https://api.retellai.com/get-test-run/$TEST_CASE_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2414
|
-
},
|
|
2415
2415
|
},
|
|
2416
2416
|
},
|
|
2417
2417
|
{
|
|
@@ -2430,13 +2430,13 @@ const EMBEDDED_METHODS = [
|
|
|
2430
2430
|
method: 'client.tests.listTestRuns',
|
|
2431
2431
|
example: "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);",
|
|
2432
2432
|
},
|
|
2433
|
+
http: {
|
|
2434
|
+
example: 'curl https://api.retellai.com/v2/list-test-runs/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2435
|
+
},
|
|
2433
2436
|
python: {
|
|
2434
2437
|
method: 'tests.list_test_runs',
|
|
2435
2438
|
example: '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)',
|
|
2436
2439
|
},
|
|
2437
|
-
http: {
|
|
2438
|
-
example: 'curl https://api.retellai.com/v2/list-test-runs/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2439
|
-
},
|
|
2440
2440
|
},
|
|
2441
2441
|
},
|
|
2442
2442
|
{
|
|
@@ -2464,13 +2464,13 @@ const EMBEDDED_METHODS = [
|
|
|
2464
2464
|
method: 'client.playground.completion',
|
|
2465
2465
|
example: "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);",
|
|
2466
2466
|
},
|
|
2467
|
+
http: {
|
|
2468
|
+
example: '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 }"',
|
|
2469
|
+
},
|
|
2467
2470
|
python: {
|
|
2468
2471
|
method: 'playground.completion',
|
|
2469
2472
|
example: '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)',
|
|
2470
2473
|
},
|
|
2471
|
-
http: {
|
|
2472
|
-
example: '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 }"',
|
|
2473
|
-
},
|
|
2474
2474
|
},
|
|
2475
2475
|
},
|
|
2476
2476
|
{
|
|
@@ -2489,13 +2489,13 @@ const EMBEDDED_METHODS = [
|
|
|
2489
2489
|
method: 'client.mcpTool.getMcpTools',
|
|
2490
2490
|
example: "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);",
|
|
2491
2491
|
},
|
|
2492
|
+
http: {
|
|
2493
|
+
example: 'curl https://api.retellai.com/get-mcp-tools/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2494
|
+
},
|
|
2492
2495
|
python: {
|
|
2493
2496
|
method: 'mcp_tool.get_mcp_tools',
|
|
2494
2497
|
example: '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)',
|
|
2495
2498
|
},
|
|
2496
|
-
http: {
|
|
2497
|
-
example: 'curl https://api.retellai.com/get-mcp-tools/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
|
|
2498
|
-
},
|
|
2499
2499
|
},
|
|
2500
2500
|
},
|
|
2501
2501
|
];
|