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>",
"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"
}
}
}
],
"greeting": "<string>",
"llm_api_key_ref": "<string>",
"voice_settings": {
"voice": "<string>",
"voice_speed": 1,
"api_key_ref": "<string>",
"background_audio": {
"type": "predefined_media",
"value": "silence"
}
},
"transcription": {
"model": "deepgram/flux",
"language": "<string>",
"region": "<string>",
"settings": {
"smart_format": true,
"numerals": true,
"eot_threshold": 123,
"eot_timeout_ms": 123
}
},
"telephony_settings": {
"default_texml_app_id": "<string>",
"supports_unauthenticated_web_calls": true
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>"
},
"enabled_features": [
"telephony"
],
"insight_settings": {
"insight_group_id": "<string>"
},
"privacy_settings": {
"data_retention": true
},
"dynamic_variables_webhook_url": "<string>",
"dynamic_variables": {},
"import_metadata": {
"import_provider": "elevenlabs",
"import_id": "<string>"
}
}
]
}Import assistants from external providers. Any assistant that has already been imported will be overwritten with its latest version from the importing provider.
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>",
"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"
}
}
}
],
"greeting": "<string>",
"llm_api_key_ref": "<string>",
"voice_settings": {
"voice": "<string>",
"voice_speed": 1,
"api_key_ref": "<string>",
"background_audio": {
"type": "predefined_media",
"value": "silence"
}
},
"transcription": {
"model": "deepgram/flux",
"language": "<string>",
"region": "<string>",
"settings": {
"smart_format": true,
"numerals": true,
"eot_threshold": 123,
"eot_timeout_ms": 123
}
},
"telephony_settings": {
"default_texml_app_id": "<string>",
"supports_unauthenticated_web_calls": true
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>"
},
"enabled_features": [
"telephony"
],
"insight_settings": {
"insight_group_id": "<string>"
},
"privacy_settings": {
"data_retention": true
},
"dynamic_variables_webhook_url": "<string>",
"dynamic_variables": {},
"import_metadata": {
"import_provider": "elevenlabs",
"import_id": "<string>"
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The external provider to import assistants from.
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.
Successful Response
Show child attributes
Was this page helpful?