Import assistants from external provider
Import assistants from external providers. Any assistant that has already been imported will be overwritten with its latest version from the importing provider.
POST
/
ai
/
assistants
/
import
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const assistantsList = await client.ai.assistants.imports({
api_key_ref: 'api_key_ref',
provider: 'elevenlabs',
});
console.log(assistantsList.data);{
"data": [
{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"instructions": "<string>",
"version_id": "<string>",
"version_created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tools": [
{
"type": "webhook",
"webhook": {
"name": "<string>",
"description": "<string>",
"url": "https://example.com/api/v1/function",
"method": "POST",
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_parameters": {
"properties": {
"age": {
"description": "The age of the customer.",
"type": "integer"
},
"location": {
"description": "The location of the customer.",
"type": "string"
}
},
"required": [
"age",
"location"
],
"type": "object"
},
"path_parameters": {
"properties": {
"id": {
"description": "The id of the customer.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"query_parameters": {
"properties": {
"page": {
"description": "The page number.",
"type": "integer"
}
},
"required": [
"page"
],
"type": "object"
},
"async": false,
"async_timeout_ms": 7500,
"timeout_ms": 5250,
"store_fields_as_variables": [
{
"name": "<string>",
"value_path": "<string>"
}
]
}
}
],
"mcp_servers": [],
"greeting": "<string>",
"llm_api_key_ref": "<string>",
"external_llm": {
"model": "<string>",
"base_url": "<string>",
"llm_api_key_ref": "<string>",
"authentication_method": "token",
"certificate_ref": "<string>",
"token_retrieval_url": "<string>",
"forward_metadata": false
},
"fallback_config": {
"model": "<string>",
"llm_api_key_ref": "<string>",
"external_llm": {
"model": "<string>",
"base_url": "<string>",
"llm_api_key_ref": "<string>",
"authentication_method": "token",
"certificate_ref": "<string>",
"token_retrieval_url": "<string>",
"forward_metadata": false
}
},
"voice_settings": {
"voice": "<string>",
"voice_speed": 1,
"api_key_ref": "<string>",
"temperature": 0.5,
"similarity_boost": 0.75,
"use_speaker_boost": true,
"style": 0,
"speed": 1,
"language_boost": null,
"expressive_mode": false,
"background_audio": {
"type": "predefined_media",
"value": "silence",
"volume": 1
}
},
"transcription": {
"language": "<string>",
"api_key_ref": "<string>",
"region": "<string>",
"settings": {
"smart_format": true,
"numerals": true,
"eot_threshold": 0.8,
"eot_timeout_ms": 5000,
"eager_eot_threshold": 0.8,
"keyterm": "<string>",
"end_of_turn_confidence_threshold": 0.4,
"min_turn_silence": 400,
"max_turn_silence": 1280,
"interim_results": false,
"enable_endpoint_detection": false,
"max_endpoint_delay_ms": 1750
}
},
"telephony_settings": {
"default_texml_app_id": "<string>",
"supports_unauthenticated_web_calls": true,
"noise_suppression_config": {
"attenuation_limit": 100,
"mode": "advanced"
},
"time_limit_secs": 1800,
"user_idle_timeout_secs": 7205,
"user_idle_reply_secs": 10,
"voicemail_detection": {
"on_voicemail_detected": {
"voicemail_message": {
"prompt": "<string>",
"message": "<string>"
}
}
},
"recording_settings": {
"enabled": true,
"channels": "dual",
"format": "mp3",
"stop_on_conversation_end": false
}
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>",
"conversation_inactivity_minutes": 5000000
},
"enabled_features": [],
"insight_settings": {
"insight_group_id": "<string>"
},
"privacy_settings": {
"data_retention": true
},
"dynamic_variables_webhook_url": "<string>",
"dynamic_variables_webhook_timeout_ms": 1500,
"dynamic_variables": {},
"import_metadata": {
"import_id": "<string>"
},
"widget_settings": {
"audio_visualizer_config": {
"preset": "<string>"
},
"start_call_text": "<string>",
"view_history_url": "<string>",
"report_issue_url": "<string>",
"give_feedback_url": "<string>",
"agent_thinking_text": "<string>",
"speak_to_interrupt_text": "<string>",
"logo_icon_url": "<string>"
},
"interruption_settings": {
"enable": true,
"disable_greeting_interruption": true,
"start_speaking_plan": {
"wait_seconds": 0.4,
"transcription_endpointing_plan": {
"on_punctuation_seconds": 0.1,
"on_no_punctuation_seconds": 1.5,
"on_number_seconds": 0.5
}
}
},
"integrations": [],
"observability_settings": {
"status": "disabled",
"secret_key_ref": "<string>",
"public_key_ref": "<string>",
"host": "<string>",
"prompt_name": "<string>",
"prompt_version": 2,
"prompt_label": "<string>",
"prompt_sync": "disabled"
},
"version_name": "New assistant",
"related_mission_ids": [],
"tags": [],
"post_conversation_settings": {
"enabled": false
},
"conversation_flow": {
"edges": [
{
"condition": {
"prompt": "The caller is asking about a bill or charge.",
"type": "llm"
},
"id": "e_intake_to_billing",
"start_node_id": "n_intake",
"target": {
"node_id": "n_billing",
"type": "node"
}
},
{
"condition": {
"prompt": "The caller has explicitly asked for a human.",
"type": "llm"
},
"id": "e_intake_to_escalation_assistant",
"start_node_id": "n_intake",
"target": {
"assistant_id": "assistant-human-handoff",
"position": {
"x": 600,
"y": 80
},
"type": "assistant",
"voice_mode": "distinct"
}
}
],
"nodes": [
{
"type": "prompt",
"id": "n_intake",
"instructions": "Greet the caller and ask what they're calling about.",
"name": "Intake",
"position": {
"x": 120,
"y": 80
},
"shared_tool_ids": [
"tool-faq-kb"
]
},
{
"type": "prompt",
"id": "n_billing",
"instructions": "Focus on billing questions. Look up the caller's latest invoice with the billing tool before answering.",
"instructions_mode": "append",
"model": "moonshotai/Kimi-K2.6",
"name": "Billing",
"position": {
"x": 420,
"y": 80
},
"shared_tool_ids": [
"tool-billing-lookup"
],
"tools_mode": "append"
}
],
"start_node_id": "n_intake"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The external provider to import assistants from.
Available options:
elevenlabs, vapi, retell Integration secret pointer that refers to the API key for the external provider. This should be an identifier for an integration secret created via /v2/integration_secrets.
Optional list of assistant IDs to import from the external provider. If not provided, all assistants will be imported.
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const assistantsList = await client.ai.assistants.imports({
api_key_ref: 'api_key_ref',
provider: 'elevenlabs',
});
console.log(assistantsList.data);{
"data": [
{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"instructions": "<string>",
"version_id": "<string>",
"version_created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tools": [
{
"type": "webhook",
"webhook": {
"name": "<string>",
"description": "<string>",
"url": "https://example.com/api/v1/function",
"method": "POST",
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_parameters": {
"properties": {
"age": {
"description": "The age of the customer.",
"type": "integer"
},
"location": {
"description": "The location of the customer.",
"type": "string"
}
},
"required": [
"age",
"location"
],
"type": "object"
},
"path_parameters": {
"properties": {
"id": {
"description": "The id of the customer.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"query_parameters": {
"properties": {
"page": {
"description": "The page number.",
"type": "integer"
}
},
"required": [
"page"
],
"type": "object"
},
"async": false,
"async_timeout_ms": 7500,
"timeout_ms": 5250,
"store_fields_as_variables": [
{
"name": "<string>",
"value_path": "<string>"
}
]
}
}
],
"mcp_servers": [],
"greeting": "<string>",
"llm_api_key_ref": "<string>",
"external_llm": {
"model": "<string>",
"base_url": "<string>",
"llm_api_key_ref": "<string>",
"authentication_method": "token",
"certificate_ref": "<string>",
"token_retrieval_url": "<string>",
"forward_metadata": false
},
"fallback_config": {
"model": "<string>",
"llm_api_key_ref": "<string>",
"external_llm": {
"model": "<string>",
"base_url": "<string>",
"llm_api_key_ref": "<string>",
"authentication_method": "token",
"certificate_ref": "<string>",
"token_retrieval_url": "<string>",
"forward_metadata": false
}
},
"voice_settings": {
"voice": "<string>",
"voice_speed": 1,
"api_key_ref": "<string>",
"temperature": 0.5,
"similarity_boost": 0.75,
"use_speaker_boost": true,
"style": 0,
"speed": 1,
"language_boost": null,
"expressive_mode": false,
"background_audio": {
"type": "predefined_media",
"value": "silence",
"volume": 1
}
},
"transcription": {
"language": "<string>",
"api_key_ref": "<string>",
"region": "<string>",
"settings": {
"smart_format": true,
"numerals": true,
"eot_threshold": 0.8,
"eot_timeout_ms": 5000,
"eager_eot_threshold": 0.8,
"keyterm": "<string>",
"end_of_turn_confidence_threshold": 0.4,
"min_turn_silence": 400,
"max_turn_silence": 1280,
"interim_results": false,
"enable_endpoint_detection": false,
"max_endpoint_delay_ms": 1750
}
},
"telephony_settings": {
"default_texml_app_id": "<string>",
"supports_unauthenticated_web_calls": true,
"noise_suppression_config": {
"attenuation_limit": 100,
"mode": "advanced"
},
"time_limit_secs": 1800,
"user_idle_timeout_secs": 7205,
"user_idle_reply_secs": 10,
"voicemail_detection": {
"on_voicemail_detected": {
"voicemail_message": {
"prompt": "<string>",
"message": "<string>"
}
}
},
"recording_settings": {
"enabled": true,
"channels": "dual",
"format": "mp3",
"stop_on_conversation_end": false
}
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>",
"conversation_inactivity_minutes": 5000000
},
"enabled_features": [],
"insight_settings": {
"insight_group_id": "<string>"
},
"privacy_settings": {
"data_retention": true
},
"dynamic_variables_webhook_url": "<string>",
"dynamic_variables_webhook_timeout_ms": 1500,
"dynamic_variables": {},
"import_metadata": {
"import_id": "<string>"
},
"widget_settings": {
"audio_visualizer_config": {
"preset": "<string>"
},
"start_call_text": "<string>",
"view_history_url": "<string>",
"report_issue_url": "<string>",
"give_feedback_url": "<string>",
"agent_thinking_text": "<string>",
"speak_to_interrupt_text": "<string>",
"logo_icon_url": "<string>"
},
"interruption_settings": {
"enable": true,
"disable_greeting_interruption": true,
"start_speaking_plan": {
"wait_seconds": 0.4,
"transcription_endpointing_plan": {
"on_punctuation_seconds": 0.1,
"on_no_punctuation_seconds": 1.5,
"on_number_seconds": 0.5
}
}
},
"integrations": [],
"observability_settings": {
"status": "disabled",
"secret_key_ref": "<string>",
"public_key_ref": "<string>",
"host": "<string>",
"prompt_name": "<string>",
"prompt_version": 2,
"prompt_label": "<string>",
"prompt_sync": "disabled"
},
"version_name": "New assistant",
"related_mission_ids": [],
"tags": [],
"post_conversation_settings": {
"enabled": false
},
"conversation_flow": {
"edges": [
{
"condition": {
"prompt": "The caller is asking about a bill or charge.",
"type": "llm"
},
"id": "e_intake_to_billing",
"start_node_id": "n_intake",
"target": {
"node_id": "n_billing",
"type": "node"
}
},
{
"condition": {
"prompt": "The caller has explicitly asked for a human.",
"type": "llm"
},
"id": "e_intake_to_escalation_assistant",
"start_node_id": "n_intake",
"target": {
"assistant_id": "assistant-human-handoff",
"position": {
"x": 600,
"y": 80
},
"type": "assistant",
"voice_mode": "distinct"
}
}
],
"nodes": [
{
"type": "prompt",
"id": "n_intake",
"instructions": "Greet the caller and ask what they're calling about.",
"name": "Intake",
"position": {
"x": 120,
"y": 80
},
"shared_tool_ids": [
"tool-faq-kb"
]
},
{
"type": "prompt",
"id": "n_billing",
"instructions": "Focus on billing questions. Look up the caller's latest invoice with the billing tool before answering.",
"instructions_mode": "append",
"model": "moonshotai/Kimi-K2.6",
"name": "Billing",
"position": {
"x": 420,
"y": 80
},
"shared_tool_ids": [
"tool-billing-lookup"
],
"tools_mode": "append"
}
],
"start_node_id": "n_intake"
}
}
]
}