curl --request GET \
--url https://api.example.com/api/v1/assistants/by-phone/{phone_number} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/assistants/by-phone/{phone_number}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/assistants/by-phone/{phone_number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/assistants/by-phone/{phone_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/assistants/by-phone/{phone_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/assistants/by-phone/{phone_number}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/assistants/by-phone/{phone_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": 123,
"organization_id": 123,
"user_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"llm_provider": "openai",
"llm_provider_config": {
"api_key": "<string>",
"base_url": "<string>",
"model": "gpt-4o-mini",
"custom_config": {}
},
"twilio_config": {
"account_sid": "<string>",
"auth_token": "<string>"
},
"llm_settings": {
"temperature": 0.5,
"max_tokens": 1000,
"system_prompt": "You are a helpful assistant that can answer questions and help with tasks.",
"welcome_message": "<string>",
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop_sequences": [
"<string>"
]
},
"webhook_url": "<string>",
"interruption_settings": {
"interruption_threshold": 3,
"min_speaking_time": 0.5,
"interruption_cooldown": 2
},
"tts_settings": {
"provider": "elevenlabs",
"voice_id": "rachel",
"model_id": "turbo",
"latency": 1,
"stability": 0.5,
"similarity_boost": 0.75,
"style": 0,
"use_speaker_boost": true,
"provider_config": {}
},
"stt_settings": {
"model": "nova-2",
"language": "en-US",
"punctuate": true,
"interim_results": true,
"endpointing": {
"silence_threshold": 500,
"min_silence_duration": 500
},
"utterance_end_ms": 1000,
"vad_turnoff": 500,
"smart_format": true,
"keywords": [
{
"keyword": "<string>",
"intensifier": 1
}
],
"keyterms": [
"<string>"
],
"audio_denoising": false
},
"end_call_message": "<string>",
"transfer_call_message": "<string>",
"idle_message": "Are you still there? I'm here to help if you need anything.",
"max_idle_messages": 123,
"idle_timeout": 123,
"tools_settings": {
"enabled_tools": [
"<string>"
],
"end_call": {
"enabled": false,
"scenarios": [
"<string>"
],
"custom_message": "<string>"
},
"transfer_call": {
"enabled": false,
"scenarios": [
"<string>"
],
"transfer_numbers": [
"<string>"
],
"custom_message": "<string>"
},
"custom_tools": [
{}
]
},
"rag_settings": {
"enabled": false,
"search_limit": 3,
"similarity_threshold": 0.7,
"embedding_model": "text-embedding-3-small",
"chunking_strategy": "recursive",
"chunk_size": 1000,
"chunk_overlap": 200,
"auto_process": true,
"include_metadata": true,
"context_window_tokens": 4000
},
"llm_fallback_providers": {
"enabled": false,
"fallbacks": [
{
"provider": "<string>",
"api_key": "<string>",
"base_url": "<string>",
"model": "<string>"
}
]
},
"custom_settings": {},
"is_active": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Assistant by Phone
Get a specific assistant by phone number.
Returns the assistant details if it belongs to your organization. Uses the new PhoneNumber table for lookups.
curl --request GET \
--url https://api.example.com/api/v1/assistants/by-phone/{phone_number} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/assistants/by-phone/{phone_number}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/assistants/by-phone/{phone_number}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/assistants/by-phone/{phone_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/assistants/by-phone/{phone_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/assistants/by-phone/{phone_number}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/assistants/by-phone/{phone_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": 123,
"organization_id": 123,
"user_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"llm_provider": "openai",
"llm_provider_config": {
"api_key": "<string>",
"base_url": "<string>",
"model": "gpt-4o-mini",
"custom_config": {}
},
"twilio_config": {
"account_sid": "<string>",
"auth_token": "<string>"
},
"llm_settings": {
"temperature": 0.5,
"max_tokens": 1000,
"system_prompt": "You are a helpful assistant that can answer questions and help with tasks.",
"welcome_message": "<string>",
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop_sequences": [
"<string>"
]
},
"webhook_url": "<string>",
"interruption_settings": {
"interruption_threshold": 3,
"min_speaking_time": 0.5,
"interruption_cooldown": 2
},
"tts_settings": {
"provider": "elevenlabs",
"voice_id": "rachel",
"model_id": "turbo",
"latency": 1,
"stability": 0.5,
"similarity_boost": 0.75,
"style": 0,
"use_speaker_boost": true,
"provider_config": {}
},
"stt_settings": {
"model": "nova-2",
"language": "en-US",
"punctuate": true,
"interim_results": true,
"endpointing": {
"silence_threshold": 500,
"min_silence_duration": 500
},
"utterance_end_ms": 1000,
"vad_turnoff": 500,
"smart_format": true,
"keywords": [
{
"keyword": "<string>",
"intensifier": 1
}
],
"keyterms": [
"<string>"
],
"audio_denoising": false
},
"end_call_message": "<string>",
"transfer_call_message": "<string>",
"idle_message": "Are you still there? I'm here to help if you need anything.",
"max_idle_messages": 123,
"idle_timeout": 123,
"tools_settings": {
"enabled_tools": [
"<string>"
],
"end_call": {
"enabled": false,
"scenarios": [
"<string>"
],
"custom_message": "<string>"
},
"transfer_call": {
"enabled": false,
"scenarios": [
"<string>"
],
"transfer_numbers": [
"<string>"
],
"custom_message": "<string>"
},
"custom_tools": [
{}
]
},
"rag_settings": {
"enabled": false,
"search_limit": 3,
"similarity_threshold": 0.7,
"embedding_model": "text-embedding-3-small",
"chunking_strategy": "recursive",
"chunk_size": 1000,
"chunk_overlap": 200,
"auto_process": true,
"include_metadata": true,
"context_window_tokens": 4000
},
"llm_fallback_providers": {
"enabled": false,
"fallbacks": [
{
"provider": "<string>",
"api_key": "<string>",
"base_url": "<string>",
"model": "<string>"
}
]
},
"custom_settings": {},
"is_active": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Schema for assistant response.
LLM provider: openai, anthropic, gemini, xai, groq, custom
Configuration for the selected LLM provider.
Show child attributes
Show child attributes
Twilio account configuration.
Show child attributes
Show child attributes
Settings for the Large Language Model.
Show child attributes
Show child attributes
Settings for call interruption behavior.
Show child attributes
Show child attributes
Settings for Text-to-Speech (TTS) service.
Show child attributes
Show child attributes
Settings for Speech-to-Text (STT) service.
Show child attributes
Show child attributes
Settings for integrated tools.
Show child attributes
Show child attributes
Settings for Retrieval-Augmented Generation (RAG).
Show child attributes
Show child attributes
Settings for LLM fallback providers.
Show child attributes
Show child attributes