agent-configuration
Configure Agent
Update agent configuration with enhanced settings.
POST
/
config
/
agents
/
{agent_id}
/
configure
Configure Agent
curl --request POST \
--url https://api.example.com/config/agents/{agent_id}/configure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_configuration": {
"provider": "openai",
"model_name": "gpt-4o-mini",
"temperature": 0.7,
"max_tokens": 150,
"first_message_mode": true,
"first_message_script": "<string>"
},
"voice_config": {
"provider": "elevenlabs",
"voice_id": "<string>",
"background_sound_url": "<string>",
"input_min_characters": 30
},
"transcriber_config": {
"provider": "deepgram",
"model": "nova-3",
"background_denoising": true,
"confidence_threshold": 0.4
},
"conversation_control": {
"wait_seconds": 0.4,
"smart_endpointing": true,
"interruption_words": 3,
"punctuation_boundary_ms": 100,
"no_punctuation_boundary_ms": 1500
},
"call_timeout": {
"silence_timeout_seconds": 30,
"max_duration_seconds": 600,
"idle_messages_enabled": true,
"max_idle_messages": 3,
"idle_timeout_seconds": 7.5
},
"analysis_config": {
"analysis_prompt": "<string>",
"analysis_timeout_sec": 10,
"min_messages_for_analysis": 2
},
"voicemail_config": {
"voicemail_detection_enabled": true,
"voicemail_message": "<string>",
"end_call_message": "<string>"
},
"keypad_config": {
"keypad_input_enabled": false,
"keypad_timeout_seconds": 2,
"keypad_delimiters": "#"
}
}
'import requests
url = "https://api.example.com/config/agents/{agent_id}/configure"
payload = {
"model_configuration": {
"provider": "openai",
"model_name": "gpt-4o-mini",
"temperature": 0.7,
"max_tokens": 150,
"first_message_mode": True,
"first_message_script": "<string>"
},
"voice_config": {
"provider": "elevenlabs",
"voice_id": "<string>",
"background_sound_url": "<string>",
"input_min_characters": 30
},
"transcriber_config": {
"provider": "deepgram",
"model": "nova-3",
"background_denoising": True,
"confidence_threshold": 0.4
},
"conversation_control": {
"wait_seconds": 0.4,
"smart_endpointing": True,
"interruption_words": 3,
"punctuation_boundary_ms": 100,
"no_punctuation_boundary_ms": 1500
},
"call_timeout": {
"silence_timeout_seconds": 30,
"max_duration_seconds": 600,
"idle_messages_enabled": True,
"max_idle_messages": 3,
"idle_timeout_seconds": 7.5
},
"analysis_config": {
"analysis_prompt": "<string>",
"analysis_timeout_sec": 10,
"min_messages_for_analysis": 2
},
"voicemail_config": {
"voicemail_detection_enabled": True,
"voicemail_message": "<string>",
"end_call_message": "<string>"
},
"keypad_config": {
"keypad_input_enabled": False,
"keypad_timeout_seconds": 2,
"keypad_delimiters": "#"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_configuration: {
provider: 'openai',
model_name: 'gpt-4o-mini',
temperature: 0.7,
max_tokens: 150,
first_message_mode: true,
first_message_script: '<string>'
},
voice_config: {
provider: 'elevenlabs',
voice_id: '<string>',
background_sound_url: '<string>',
input_min_characters: 30
},
transcriber_config: {
provider: 'deepgram',
model: 'nova-3',
background_denoising: true,
confidence_threshold: 0.4
},
conversation_control: {
wait_seconds: 0.4,
smart_endpointing: true,
interruption_words: 3,
punctuation_boundary_ms: 100,
no_punctuation_boundary_ms: 1500
},
call_timeout: {
silence_timeout_seconds: 30,
max_duration_seconds: 600,
idle_messages_enabled: true,
max_idle_messages: 3,
idle_timeout_seconds: 7.5
},
analysis_config: {
analysis_prompt: '<string>',
analysis_timeout_sec: 10,
min_messages_for_analysis: 2
},
voicemail_config: {
voicemail_detection_enabled: true,
voicemail_message: '<string>',
end_call_message: '<string>'
},
keypad_config: {keypad_input_enabled: false, keypad_timeout_seconds: 2, keypad_delimiters: '#'}
})
};
fetch('https://api.example.com/config/agents/{agent_id}/configure', 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/config/agents/{agent_id}/configure",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model_configuration' => [
'provider' => 'openai',
'model_name' => 'gpt-4o-mini',
'temperature' => 0.7,
'max_tokens' => 150,
'first_message_mode' => true,
'first_message_script' => '<string>'
],
'voice_config' => [
'provider' => 'elevenlabs',
'voice_id' => '<string>',
'background_sound_url' => '<string>',
'input_min_characters' => 30
],
'transcriber_config' => [
'provider' => 'deepgram',
'model' => 'nova-3',
'background_denoising' => true,
'confidence_threshold' => 0.4
],
'conversation_control' => [
'wait_seconds' => 0.4,
'smart_endpointing' => true,
'interruption_words' => 3,
'punctuation_boundary_ms' => 100,
'no_punctuation_boundary_ms' => 1500
],
'call_timeout' => [
'silence_timeout_seconds' => 30,
'max_duration_seconds' => 600,
'idle_messages_enabled' => true,
'max_idle_messages' => 3,
'idle_timeout_seconds' => 7.5
],
'analysis_config' => [
'analysis_prompt' => '<string>',
'analysis_timeout_sec' => 10,
'min_messages_for_analysis' => 2
],
'voicemail_config' => [
'voicemail_detection_enabled' => true,
'voicemail_message' => '<string>',
'end_call_message' => '<string>'
],
'keypad_config' => [
'keypad_input_enabled' => false,
'keypad_timeout_seconds' => 2,
'keypad_delimiters' => '#'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/config/agents/{agent_id}/configure"
payload := strings.NewReader("{\n \"model_configuration\": {\n \"provider\": \"openai\",\n \"model_name\": \"gpt-4o-mini\",\n \"temperature\": 0.7,\n \"max_tokens\": 150,\n \"first_message_mode\": true,\n \"first_message_script\": \"<string>\"\n },\n \"voice_config\": {\n \"provider\": \"elevenlabs\",\n \"voice_id\": \"<string>\",\n \"background_sound_url\": \"<string>\",\n \"input_min_characters\": 30\n },\n \"transcriber_config\": {\n \"provider\": \"deepgram\",\n \"model\": \"nova-3\",\n \"background_denoising\": true,\n \"confidence_threshold\": 0.4\n },\n \"conversation_control\": {\n \"wait_seconds\": 0.4,\n \"smart_endpointing\": true,\n \"interruption_words\": 3,\n \"punctuation_boundary_ms\": 100,\n \"no_punctuation_boundary_ms\": 1500\n },\n \"call_timeout\": {\n \"silence_timeout_seconds\": 30,\n \"max_duration_seconds\": 600,\n \"idle_messages_enabled\": true,\n \"max_idle_messages\": 3,\n \"idle_timeout_seconds\": 7.5\n },\n \"analysis_config\": {\n \"analysis_prompt\": \"<string>\",\n \"analysis_timeout_sec\": 10,\n \"min_messages_for_analysis\": 2\n },\n \"voicemail_config\": {\n \"voicemail_detection_enabled\": true,\n \"voicemail_message\": \"<string>\",\n \"end_call_message\": \"<string>\"\n },\n \"keypad_config\": {\n \"keypad_input_enabled\": false,\n \"keypad_timeout_seconds\": 2,\n \"keypad_delimiters\": \"#\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/config/agents/{agent_id}/configure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_configuration\": {\n \"provider\": \"openai\",\n \"model_name\": \"gpt-4o-mini\",\n \"temperature\": 0.7,\n \"max_tokens\": 150,\n \"first_message_mode\": true,\n \"first_message_script\": \"<string>\"\n },\n \"voice_config\": {\n \"provider\": \"elevenlabs\",\n \"voice_id\": \"<string>\",\n \"background_sound_url\": \"<string>\",\n \"input_min_characters\": 30\n },\n \"transcriber_config\": {\n \"provider\": \"deepgram\",\n \"model\": \"nova-3\",\n \"background_denoising\": true,\n \"confidence_threshold\": 0.4\n },\n \"conversation_control\": {\n \"wait_seconds\": 0.4,\n \"smart_endpointing\": true,\n \"interruption_words\": 3,\n \"punctuation_boundary_ms\": 100,\n \"no_punctuation_boundary_ms\": 1500\n },\n \"call_timeout\": {\n \"silence_timeout_seconds\": 30,\n \"max_duration_seconds\": 600,\n \"idle_messages_enabled\": true,\n \"max_idle_messages\": 3,\n \"idle_timeout_seconds\": 7.5\n },\n \"analysis_config\": {\n \"analysis_prompt\": \"<string>\",\n \"analysis_timeout_sec\": 10,\n \"min_messages_for_analysis\": 2\n },\n \"voicemail_config\": {\n \"voicemail_detection_enabled\": true,\n \"voicemail_message\": \"<string>\",\n \"end_call_message\": \"<string>\"\n },\n \"keypad_config\": {\n \"keypad_input_enabled\": false,\n \"keypad_timeout_seconds\": 2,\n \"keypad_delimiters\": \"#\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/config/agents/{agent_id}/configure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_configuration\": {\n \"provider\": \"openai\",\n \"model_name\": \"gpt-4o-mini\",\n \"temperature\": 0.7,\n \"max_tokens\": 150,\n \"first_message_mode\": true,\n \"first_message_script\": \"<string>\"\n },\n \"voice_config\": {\n \"provider\": \"elevenlabs\",\n \"voice_id\": \"<string>\",\n \"background_sound_url\": \"<string>\",\n \"input_min_characters\": 30\n },\n \"transcriber_config\": {\n \"provider\": \"deepgram\",\n \"model\": \"nova-3\",\n \"background_denoising\": true,\n \"confidence_threshold\": 0.4\n },\n \"conversation_control\": {\n \"wait_seconds\": 0.4,\n \"smart_endpointing\": true,\n \"interruption_words\": 3,\n \"punctuation_boundary_ms\": 100,\n \"no_punctuation_boundary_ms\": 1500\n },\n \"call_timeout\": {\n \"silence_timeout_seconds\": 30,\n \"max_duration_seconds\": 600,\n \"idle_messages_enabled\": true,\n \"max_idle_messages\": 3,\n \"idle_timeout_seconds\": 7.5\n },\n \"analysis_config\": {\n \"analysis_prompt\": \"<string>\",\n \"analysis_timeout_sec\": 10,\n \"min_messages_for_analysis\": 2\n },\n \"voicemail_config\": {\n \"voicemail_detection_enabled\": true,\n \"voicemail_message\": \"<string>\",\n \"end_call_message\": \"<string>\"\n },\n \"keypad_config\": {\n \"keypad_input_enabled\": false,\n \"keypad_timeout_seconds\": 2,\n \"keypad_delimiters\": \"#\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Complete agent configuration update model.
Model configuration for agents.
Show child attributes
Show child attributes
Voice configuration for agents.
Show child attributes
Show child attributes
Transcriber configuration for agents.
Show child attributes
Show child attributes
Conversation control settings.
Show child attributes
Show child attributes
Call timeout and duration settings.
Show child attributes
Show child attributes
Call analysis configuration.
Show child attributes
Show child attributes
Voicemail and end call message configuration via LiveKit + Agent Workflow.
Show child attributes
Show child attributes
Keypad input configuration.
Show child attributes
Show child attributes
Response
Successful Response
⌘I
Configure Agent
curl --request POST \
--url https://api.example.com/config/agents/{agent_id}/configure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_configuration": {
"provider": "openai",
"model_name": "gpt-4o-mini",
"temperature": 0.7,
"max_tokens": 150,
"first_message_mode": true,
"first_message_script": "<string>"
},
"voice_config": {
"provider": "elevenlabs",
"voice_id": "<string>",
"background_sound_url": "<string>",
"input_min_characters": 30
},
"transcriber_config": {
"provider": "deepgram",
"model": "nova-3",
"background_denoising": true,
"confidence_threshold": 0.4
},
"conversation_control": {
"wait_seconds": 0.4,
"smart_endpointing": true,
"interruption_words": 3,
"punctuation_boundary_ms": 100,
"no_punctuation_boundary_ms": 1500
},
"call_timeout": {
"silence_timeout_seconds": 30,
"max_duration_seconds": 600,
"idle_messages_enabled": true,
"max_idle_messages": 3,
"idle_timeout_seconds": 7.5
},
"analysis_config": {
"analysis_prompt": "<string>",
"analysis_timeout_sec": 10,
"min_messages_for_analysis": 2
},
"voicemail_config": {
"voicemail_detection_enabled": true,
"voicemail_message": "<string>",
"end_call_message": "<string>"
},
"keypad_config": {
"keypad_input_enabled": false,
"keypad_timeout_seconds": 2,
"keypad_delimiters": "#"
}
}
'import requests
url = "https://api.example.com/config/agents/{agent_id}/configure"
payload = {
"model_configuration": {
"provider": "openai",
"model_name": "gpt-4o-mini",
"temperature": 0.7,
"max_tokens": 150,
"first_message_mode": True,
"first_message_script": "<string>"
},
"voice_config": {
"provider": "elevenlabs",
"voice_id": "<string>",
"background_sound_url": "<string>",
"input_min_characters": 30
},
"transcriber_config": {
"provider": "deepgram",
"model": "nova-3",
"background_denoising": True,
"confidence_threshold": 0.4
},
"conversation_control": {
"wait_seconds": 0.4,
"smart_endpointing": True,
"interruption_words": 3,
"punctuation_boundary_ms": 100,
"no_punctuation_boundary_ms": 1500
},
"call_timeout": {
"silence_timeout_seconds": 30,
"max_duration_seconds": 600,
"idle_messages_enabled": True,
"max_idle_messages": 3,
"idle_timeout_seconds": 7.5
},
"analysis_config": {
"analysis_prompt": "<string>",
"analysis_timeout_sec": 10,
"min_messages_for_analysis": 2
},
"voicemail_config": {
"voicemail_detection_enabled": True,
"voicemail_message": "<string>",
"end_call_message": "<string>"
},
"keypad_config": {
"keypad_input_enabled": False,
"keypad_timeout_seconds": 2,
"keypad_delimiters": "#"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_configuration: {
provider: 'openai',
model_name: 'gpt-4o-mini',
temperature: 0.7,
max_tokens: 150,
first_message_mode: true,
first_message_script: '<string>'
},
voice_config: {
provider: 'elevenlabs',
voice_id: '<string>',
background_sound_url: '<string>',
input_min_characters: 30
},
transcriber_config: {
provider: 'deepgram',
model: 'nova-3',
background_denoising: true,
confidence_threshold: 0.4
},
conversation_control: {
wait_seconds: 0.4,
smart_endpointing: true,
interruption_words: 3,
punctuation_boundary_ms: 100,
no_punctuation_boundary_ms: 1500
},
call_timeout: {
silence_timeout_seconds: 30,
max_duration_seconds: 600,
idle_messages_enabled: true,
max_idle_messages: 3,
idle_timeout_seconds: 7.5
},
analysis_config: {
analysis_prompt: '<string>',
analysis_timeout_sec: 10,
min_messages_for_analysis: 2
},
voicemail_config: {
voicemail_detection_enabled: true,
voicemail_message: '<string>',
end_call_message: '<string>'
},
keypad_config: {keypad_input_enabled: false, keypad_timeout_seconds: 2, keypad_delimiters: '#'}
})
};
fetch('https://api.example.com/config/agents/{agent_id}/configure', 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/config/agents/{agent_id}/configure",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model_configuration' => [
'provider' => 'openai',
'model_name' => 'gpt-4o-mini',
'temperature' => 0.7,
'max_tokens' => 150,
'first_message_mode' => true,
'first_message_script' => '<string>'
],
'voice_config' => [
'provider' => 'elevenlabs',
'voice_id' => '<string>',
'background_sound_url' => '<string>',
'input_min_characters' => 30
],
'transcriber_config' => [
'provider' => 'deepgram',
'model' => 'nova-3',
'background_denoising' => true,
'confidence_threshold' => 0.4
],
'conversation_control' => [
'wait_seconds' => 0.4,
'smart_endpointing' => true,
'interruption_words' => 3,
'punctuation_boundary_ms' => 100,
'no_punctuation_boundary_ms' => 1500
],
'call_timeout' => [
'silence_timeout_seconds' => 30,
'max_duration_seconds' => 600,
'idle_messages_enabled' => true,
'max_idle_messages' => 3,
'idle_timeout_seconds' => 7.5
],
'analysis_config' => [
'analysis_prompt' => '<string>',
'analysis_timeout_sec' => 10,
'min_messages_for_analysis' => 2
],
'voicemail_config' => [
'voicemail_detection_enabled' => true,
'voicemail_message' => '<string>',
'end_call_message' => '<string>'
],
'keypad_config' => [
'keypad_input_enabled' => false,
'keypad_timeout_seconds' => 2,
'keypad_delimiters' => '#'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/config/agents/{agent_id}/configure"
payload := strings.NewReader("{\n \"model_configuration\": {\n \"provider\": \"openai\",\n \"model_name\": \"gpt-4o-mini\",\n \"temperature\": 0.7,\n \"max_tokens\": 150,\n \"first_message_mode\": true,\n \"first_message_script\": \"<string>\"\n },\n \"voice_config\": {\n \"provider\": \"elevenlabs\",\n \"voice_id\": \"<string>\",\n \"background_sound_url\": \"<string>\",\n \"input_min_characters\": 30\n },\n \"transcriber_config\": {\n \"provider\": \"deepgram\",\n \"model\": \"nova-3\",\n \"background_denoising\": true,\n \"confidence_threshold\": 0.4\n },\n \"conversation_control\": {\n \"wait_seconds\": 0.4,\n \"smart_endpointing\": true,\n \"interruption_words\": 3,\n \"punctuation_boundary_ms\": 100,\n \"no_punctuation_boundary_ms\": 1500\n },\n \"call_timeout\": {\n \"silence_timeout_seconds\": 30,\n \"max_duration_seconds\": 600,\n \"idle_messages_enabled\": true,\n \"max_idle_messages\": 3,\n \"idle_timeout_seconds\": 7.5\n },\n \"analysis_config\": {\n \"analysis_prompt\": \"<string>\",\n \"analysis_timeout_sec\": 10,\n \"min_messages_for_analysis\": 2\n },\n \"voicemail_config\": {\n \"voicemail_detection_enabled\": true,\n \"voicemail_message\": \"<string>\",\n \"end_call_message\": \"<string>\"\n },\n \"keypad_config\": {\n \"keypad_input_enabled\": false,\n \"keypad_timeout_seconds\": 2,\n \"keypad_delimiters\": \"#\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/config/agents/{agent_id}/configure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_configuration\": {\n \"provider\": \"openai\",\n \"model_name\": \"gpt-4o-mini\",\n \"temperature\": 0.7,\n \"max_tokens\": 150,\n \"first_message_mode\": true,\n \"first_message_script\": \"<string>\"\n },\n \"voice_config\": {\n \"provider\": \"elevenlabs\",\n \"voice_id\": \"<string>\",\n \"background_sound_url\": \"<string>\",\n \"input_min_characters\": 30\n },\n \"transcriber_config\": {\n \"provider\": \"deepgram\",\n \"model\": \"nova-3\",\n \"background_denoising\": true,\n \"confidence_threshold\": 0.4\n },\n \"conversation_control\": {\n \"wait_seconds\": 0.4,\n \"smart_endpointing\": true,\n \"interruption_words\": 3,\n \"punctuation_boundary_ms\": 100,\n \"no_punctuation_boundary_ms\": 1500\n },\n \"call_timeout\": {\n \"silence_timeout_seconds\": 30,\n \"max_duration_seconds\": 600,\n \"idle_messages_enabled\": true,\n \"max_idle_messages\": 3,\n \"idle_timeout_seconds\": 7.5\n },\n \"analysis_config\": {\n \"analysis_prompt\": \"<string>\",\n \"analysis_timeout_sec\": 10,\n \"min_messages_for_analysis\": 2\n },\n \"voicemail_config\": {\n \"voicemail_detection_enabled\": true,\n \"voicemail_message\": \"<string>\",\n \"end_call_message\": \"<string>\"\n },\n \"keypad_config\": {\n \"keypad_input_enabled\": false,\n \"keypad_timeout_seconds\": 2,\n \"keypad_delimiters\": \"#\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/config/agents/{agent_id}/configure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_configuration\": {\n \"provider\": \"openai\",\n \"model_name\": \"gpt-4o-mini\",\n \"temperature\": 0.7,\n \"max_tokens\": 150,\n \"first_message_mode\": true,\n \"first_message_script\": \"<string>\"\n },\n \"voice_config\": {\n \"provider\": \"elevenlabs\",\n \"voice_id\": \"<string>\",\n \"background_sound_url\": \"<string>\",\n \"input_min_characters\": 30\n },\n \"transcriber_config\": {\n \"provider\": \"deepgram\",\n \"model\": \"nova-3\",\n \"background_denoising\": true,\n \"confidence_threshold\": 0.4\n },\n \"conversation_control\": {\n \"wait_seconds\": 0.4,\n \"smart_endpointing\": true,\n \"interruption_words\": 3,\n \"punctuation_boundary_ms\": 100,\n \"no_punctuation_boundary_ms\": 1500\n },\n \"call_timeout\": {\n \"silence_timeout_seconds\": 30,\n \"max_duration_seconds\": 600,\n \"idle_messages_enabled\": true,\n \"max_idle_messages\": 3,\n \"idle_timeout_seconds\": 7.5\n },\n \"analysis_config\": {\n \"analysis_prompt\": \"<string>\",\n \"analysis_timeout_sec\": 10,\n \"min_messages_for_analysis\": 2\n },\n \"voicemail_config\": {\n \"voicemail_detection_enabled\": true,\n \"voicemail_message\": \"<string>\",\n \"end_call_message\": \"<string>\"\n },\n \"keypad_config\": {\n \"keypad_input_enabled\": false,\n \"keypad_timeout_seconds\": 2,\n \"keypad_delimiters\": \"#\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}