Atualizar assistente
curl --request PUT \
--url https://app.mayahub.ai/api/user/assistant/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_name": "<string>",
"voice_id": 123,
"language": "<string>",
"llm_model": "<string>",
"calls_direction": "<string>",
"engine_type": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"phone_number_id": 123,
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"ambient_sound_volume": 123,
"post_call_evaluation": true,
"send_webhook_only_on_completed": true,
"include_recording_in_webhook": true,
"is_webhook_active": true,
"webhook_url": "<string>",
"use_min_interrupt_words": true,
"min_interrupt_words": 123,
"variables": {},
"post_call_schema": [
{
"post_call_schema[].name": "<string>",
"post_call_schema[].type": "<string>",
"post_call_schema[].description": "<string>"
}
],
"end_call_tool.description": "<string>",
"llm_temperature": 123,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"allow_interruptions": true,
"filler_audios": true,
"re_engagement_interval": 123,
"max_call_duration": 123,
"max_silence_duration": 123,
"end_call_on_voicemail": true,
"noise_cancellation": true,
"record_call": true,
"who_speaks_first": "<string>"
}
'import requests
url = "https://app.mayahub.ai/api/user/assistant/{id}"
payload = {
"assistant_name": "<string>",
"voice_id": 123,
"language": "<string>",
"llm_model": "<string>",
"calls_direction": "<string>",
"engine_type": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"phone_number_id": 123,
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"ambient_sound_volume": 123,
"post_call_evaluation": True,
"send_webhook_only_on_completed": True,
"include_recording_in_webhook": True,
"is_webhook_active": True,
"webhook_url": "<string>",
"use_min_interrupt_words": True,
"min_interrupt_words": 123,
"variables": {},
"post_call_schema": [
{
"post_call_schema[].name": "<string>",
"post_call_schema[].type": "<string>",
"post_call_schema[].description": "<string>"
}
],
"end_call_tool.description": "<string>",
"llm_temperature": 123,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"allow_interruptions": True,
"filler_audios": True,
"re_engagement_interval": 123,
"max_call_duration": 123,
"max_silence_duration": 123,
"end_call_on_voicemail": True,
"noise_cancellation": True,
"record_call": True,
"who_speaks_first": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assistant_name: '<string>',
voice_id: 123,
language: '<string>',
llm_model: '<string>',
calls_direction: '<string>',
engine_type: '<string>',
timezone: '<string>',
initial_message: '<string>',
system_prompt: '<string>',
phone_number_id: 123,
endpoint_type: '<string>',
endpoint_sensitivity: 123,
interrupt_sensitivity: 123,
ambient_sound_volume: 123,
post_call_evaluation: true,
send_webhook_only_on_completed: true,
include_recording_in_webhook: true,
is_webhook_active: true,
webhook_url: '<string>',
use_min_interrupt_words: true,
min_interrupt_words: 123,
variables: {},
post_call_schema: [
{
'post_call_schema[].name': '<string>',
'post_call_schema[].type': '<string>',
'post_call_schema[].description': '<string>'
}
],
'end_call_tool.description': '<string>',
llm_temperature: 123,
voice_stability: 123,
voice_similarity: 123,
speech_speed: 123,
allow_interruptions: true,
filler_audios: true,
re_engagement_interval: 123,
max_call_duration: 123,
max_silence_duration: 123,
end_call_on_voicemail: true,
noise_cancellation: true,
record_call: true,
who_speaks_first: '<string>'
})
};
fetch('https://app.mayahub.ai/api/user/assistant/{id}', 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://app.mayahub.ai/api/user/assistant/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'assistant_name' => '<string>',
'voice_id' => 123,
'language' => '<string>',
'llm_model' => '<string>',
'calls_direction' => '<string>',
'engine_type' => '<string>',
'timezone' => '<string>',
'initial_message' => '<string>',
'system_prompt' => '<string>',
'phone_number_id' => 123,
'endpoint_type' => '<string>',
'endpoint_sensitivity' => 123,
'interrupt_sensitivity' => 123,
'ambient_sound_volume' => 123,
'post_call_evaluation' => true,
'send_webhook_only_on_completed' => true,
'include_recording_in_webhook' => true,
'is_webhook_active' => true,
'webhook_url' => '<string>',
'use_min_interrupt_words' => true,
'min_interrupt_words' => 123,
'variables' => [
],
'post_call_schema' => [
[
'post_call_schema[].name' => '<string>',
'post_call_schema[].type' => '<string>',
'post_call_schema[].description' => '<string>'
]
],
'end_call_tool.description' => '<string>',
'llm_temperature' => 123,
'voice_stability' => 123,
'voice_similarity' => 123,
'speech_speed' => 123,
'allow_interruptions' => true,
'filler_audios' => true,
're_engagement_interval' => 123,
'max_call_duration' => 123,
'max_silence_duration' => 123,
'end_call_on_voicemail' => true,
'noise_cancellation' => true,
'record_call' => true,
'who_speaks_first' => '<string>'
]),
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://app.mayahub.ai/api/user/assistant/{id}"
payload := strings.NewReader("{\n \"assistant_name\": \"<string>\",\n \"voice_id\": 123,\n \"language\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"calls_direction\": \"<string>\",\n \"engine_type\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"phone_number_id\": 123,\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"ambient_sound_volume\": 123,\n \"post_call_evaluation\": true,\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"use_min_interrupt_words\": true,\n \"min_interrupt_words\": 123,\n \"variables\": {},\n \"post_call_schema\": [\n {\n \"post_call_schema[].name\": \"<string>\",\n \"post_call_schema[].type\": \"<string>\",\n \"post_call_schema[].description\": \"<string>\"\n }\n ],\n \"end_call_tool.description\": \"<string>\",\n \"llm_temperature\": 123,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"allow_interruptions\": true,\n \"filler_audios\": true,\n \"re_engagement_interval\": 123,\n \"max_call_duration\": 123,\n \"max_silence_duration\": 123,\n \"end_call_on_voicemail\": true,\n \"noise_cancellation\": true,\n \"record_call\": true,\n \"who_speaks_first\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.mayahub.ai/api/user/assistant/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assistant_name\": \"<string>\",\n \"voice_id\": 123,\n \"language\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"calls_direction\": \"<string>\",\n \"engine_type\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"phone_number_id\": 123,\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"ambient_sound_volume\": 123,\n \"post_call_evaluation\": true,\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"use_min_interrupt_words\": true,\n \"min_interrupt_words\": 123,\n \"variables\": {},\n \"post_call_schema\": [\n {\n \"post_call_schema[].name\": \"<string>\",\n \"post_call_schema[].type\": \"<string>\",\n \"post_call_schema[].description\": \"<string>\"\n }\n ],\n \"end_call_tool.description\": \"<string>\",\n \"llm_temperature\": 123,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"allow_interruptions\": true,\n \"filler_audios\": true,\n \"re_engagement_interval\": 123,\n \"max_call_duration\": 123,\n \"max_silence_duration\": 123,\n \"end_call_on_voicemail\": true,\n \"noise_cancellation\": true,\n \"record_call\": true,\n \"who_speaks_first\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mayahub.ai/api/user/assistant/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assistant_name\": \"<string>\",\n \"voice_id\": 123,\n \"language\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"calls_direction\": \"<string>\",\n \"engine_type\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"phone_number_id\": 123,\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"ambient_sound_volume\": 123,\n \"post_call_evaluation\": true,\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"use_min_interrupt_words\": true,\n \"min_interrupt_words\": 123,\n \"variables\": {},\n \"post_call_schema\": [\n {\n \"post_call_schema[].name\": \"<string>\",\n \"post_call_schema[].type\": \"<string>\",\n \"post_call_schema[].description\": \"<string>\"\n }\n ],\n \"end_call_tool.description\": \"<string>\",\n \"llm_temperature\": 123,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"allow_interruptions\": true,\n \"filler_audios\": true,\n \"re_engagement_interval\": 123,\n \"max_call_duration\": 123,\n \"max_silence_duration\": 123,\n \"end_call_on_voicemail\": true,\n \"noise_cancellation\": true,\n \"record_call\": true,\n \"who_speaks_first\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Assistant updated successfully",
"data": {
"id": 789,
"name": "Updated Sales Assistant",
"status": "active",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Assistant not found"
}
{
"message": "Validation failed",
"errors": {
"speech_speed": [
"The speech speed must be between 0.7 and 1.2."
],
"webhook_url": [
"The webhook url must be a valid URL."
]
}
}
{
"message": "Assistant update failed"
}
Assistentes
Atualizar assistente
Atualizar a configuração de um assistente de IA existente
PUT
/
user
/
assistant
/
{id}
Atualizar assistente
curl --request PUT \
--url https://app.mayahub.ai/api/user/assistant/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_name": "<string>",
"voice_id": 123,
"language": "<string>",
"llm_model": "<string>",
"calls_direction": "<string>",
"engine_type": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"phone_number_id": 123,
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"ambient_sound_volume": 123,
"post_call_evaluation": true,
"send_webhook_only_on_completed": true,
"include_recording_in_webhook": true,
"is_webhook_active": true,
"webhook_url": "<string>",
"use_min_interrupt_words": true,
"min_interrupt_words": 123,
"variables": {},
"post_call_schema": [
{
"post_call_schema[].name": "<string>",
"post_call_schema[].type": "<string>",
"post_call_schema[].description": "<string>"
}
],
"end_call_tool.description": "<string>",
"llm_temperature": 123,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"allow_interruptions": true,
"filler_audios": true,
"re_engagement_interval": 123,
"max_call_duration": 123,
"max_silence_duration": 123,
"end_call_on_voicemail": true,
"noise_cancellation": true,
"record_call": true,
"who_speaks_first": "<string>"
}
'import requests
url = "https://app.mayahub.ai/api/user/assistant/{id}"
payload = {
"assistant_name": "<string>",
"voice_id": 123,
"language": "<string>",
"llm_model": "<string>",
"calls_direction": "<string>",
"engine_type": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"phone_number_id": 123,
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"ambient_sound_volume": 123,
"post_call_evaluation": True,
"send_webhook_only_on_completed": True,
"include_recording_in_webhook": True,
"is_webhook_active": True,
"webhook_url": "<string>",
"use_min_interrupt_words": True,
"min_interrupt_words": 123,
"variables": {},
"post_call_schema": [
{
"post_call_schema[].name": "<string>",
"post_call_schema[].type": "<string>",
"post_call_schema[].description": "<string>"
}
],
"end_call_tool.description": "<string>",
"llm_temperature": 123,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"allow_interruptions": True,
"filler_audios": True,
"re_engagement_interval": 123,
"max_call_duration": 123,
"max_silence_duration": 123,
"end_call_on_voicemail": True,
"noise_cancellation": True,
"record_call": True,
"who_speaks_first": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assistant_name: '<string>',
voice_id: 123,
language: '<string>',
llm_model: '<string>',
calls_direction: '<string>',
engine_type: '<string>',
timezone: '<string>',
initial_message: '<string>',
system_prompt: '<string>',
phone_number_id: 123,
endpoint_type: '<string>',
endpoint_sensitivity: 123,
interrupt_sensitivity: 123,
ambient_sound_volume: 123,
post_call_evaluation: true,
send_webhook_only_on_completed: true,
include_recording_in_webhook: true,
is_webhook_active: true,
webhook_url: '<string>',
use_min_interrupt_words: true,
min_interrupt_words: 123,
variables: {},
post_call_schema: [
{
'post_call_schema[].name': '<string>',
'post_call_schema[].type': '<string>',
'post_call_schema[].description': '<string>'
}
],
'end_call_tool.description': '<string>',
llm_temperature: 123,
voice_stability: 123,
voice_similarity: 123,
speech_speed: 123,
allow_interruptions: true,
filler_audios: true,
re_engagement_interval: 123,
max_call_duration: 123,
max_silence_duration: 123,
end_call_on_voicemail: true,
noise_cancellation: true,
record_call: true,
who_speaks_first: '<string>'
})
};
fetch('https://app.mayahub.ai/api/user/assistant/{id}', 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://app.mayahub.ai/api/user/assistant/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'assistant_name' => '<string>',
'voice_id' => 123,
'language' => '<string>',
'llm_model' => '<string>',
'calls_direction' => '<string>',
'engine_type' => '<string>',
'timezone' => '<string>',
'initial_message' => '<string>',
'system_prompt' => '<string>',
'phone_number_id' => 123,
'endpoint_type' => '<string>',
'endpoint_sensitivity' => 123,
'interrupt_sensitivity' => 123,
'ambient_sound_volume' => 123,
'post_call_evaluation' => true,
'send_webhook_only_on_completed' => true,
'include_recording_in_webhook' => true,
'is_webhook_active' => true,
'webhook_url' => '<string>',
'use_min_interrupt_words' => true,
'min_interrupt_words' => 123,
'variables' => [
],
'post_call_schema' => [
[
'post_call_schema[].name' => '<string>',
'post_call_schema[].type' => '<string>',
'post_call_schema[].description' => '<string>'
]
],
'end_call_tool.description' => '<string>',
'llm_temperature' => 123,
'voice_stability' => 123,
'voice_similarity' => 123,
'speech_speed' => 123,
'allow_interruptions' => true,
'filler_audios' => true,
're_engagement_interval' => 123,
'max_call_duration' => 123,
'max_silence_duration' => 123,
'end_call_on_voicemail' => true,
'noise_cancellation' => true,
'record_call' => true,
'who_speaks_first' => '<string>'
]),
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://app.mayahub.ai/api/user/assistant/{id}"
payload := strings.NewReader("{\n \"assistant_name\": \"<string>\",\n \"voice_id\": 123,\n \"language\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"calls_direction\": \"<string>\",\n \"engine_type\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"phone_number_id\": 123,\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"ambient_sound_volume\": 123,\n \"post_call_evaluation\": true,\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"use_min_interrupt_words\": true,\n \"min_interrupt_words\": 123,\n \"variables\": {},\n \"post_call_schema\": [\n {\n \"post_call_schema[].name\": \"<string>\",\n \"post_call_schema[].type\": \"<string>\",\n \"post_call_schema[].description\": \"<string>\"\n }\n ],\n \"end_call_tool.description\": \"<string>\",\n \"llm_temperature\": 123,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"allow_interruptions\": true,\n \"filler_audios\": true,\n \"re_engagement_interval\": 123,\n \"max_call_duration\": 123,\n \"max_silence_duration\": 123,\n \"end_call_on_voicemail\": true,\n \"noise_cancellation\": true,\n \"record_call\": true,\n \"who_speaks_first\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.mayahub.ai/api/user/assistant/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assistant_name\": \"<string>\",\n \"voice_id\": 123,\n \"language\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"calls_direction\": \"<string>\",\n \"engine_type\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"phone_number_id\": 123,\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"ambient_sound_volume\": 123,\n \"post_call_evaluation\": true,\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"use_min_interrupt_words\": true,\n \"min_interrupt_words\": 123,\n \"variables\": {},\n \"post_call_schema\": [\n {\n \"post_call_schema[].name\": \"<string>\",\n \"post_call_schema[].type\": \"<string>\",\n \"post_call_schema[].description\": \"<string>\"\n }\n ],\n \"end_call_tool.description\": \"<string>\",\n \"llm_temperature\": 123,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"allow_interruptions\": true,\n \"filler_audios\": true,\n \"re_engagement_interval\": 123,\n \"max_call_duration\": 123,\n \"max_silence_duration\": 123,\n \"end_call_on_voicemail\": true,\n \"noise_cancellation\": true,\n \"record_call\": true,\n \"who_speaks_first\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mayahub.ai/api/user/assistant/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assistant_name\": \"<string>\",\n \"voice_id\": 123,\n \"language\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"calls_direction\": \"<string>\",\n \"engine_type\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"phone_number_id\": 123,\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"ambient_sound_volume\": 123,\n \"post_call_evaluation\": true,\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"use_min_interrupt_words\": true,\n \"min_interrupt_words\": 123,\n \"variables\": {},\n \"post_call_schema\": [\n {\n \"post_call_schema[].name\": \"<string>\",\n \"post_call_schema[].type\": \"<string>\",\n \"post_call_schema[].description\": \"<string>\"\n }\n ],\n \"end_call_tool.description\": \"<string>\",\n \"llm_temperature\": 123,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"allow_interruptions\": true,\n \"filler_audios\": true,\n \"re_engagement_interval\": 123,\n \"max_call_duration\": 123,\n \"max_silence_duration\": 123,\n \"end_call_on_voicemail\": true,\n \"noise_cancellation\": true,\n \"record_call\": true,\n \"who_speaks_first\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Assistant updated successfully",
"data": {
"id": 789,
"name": "Updated Sales Assistant",
"status": "active",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Assistant not found"
}
{
"message": "Validation failed",
"errors": {
"speech_speed": [
"The speech speed must be between 0.7 and 1.2."
],
"webhook_url": [
"The webhook url must be a valid URL."
]
}
}
{
"message": "Assistant update failed"
}
Este endpoint permite atualizar a configuração de um assistente de IA existente.
Todos os campos são opcionais – forneça apenas os campos que deseja atualizar.
Todos os campos são opcionais – forneça apenas os campos que deseja atualizar.
Parâmetros de caminho
integer
required
O identificador único do assistente a ser atualizado
Corpo da requisição
Campos principaisstring
O nome do assistente (máx. 255 caracteres)
integer
O ID da voz a ser usada pelo assistente (deve existir entre as vozes disponíveis)
string
O nome do idioma do assistente (máx. 100 caracteres)
string
O nome do modelo LLM a ser usado (máx. 100 caracteres)
string
O tipo de direção da chamada. Opções: receive, make
string
O tipo de motor a ser usado. Opções: pipeline, multimodal
string
O fuso horário do assistente (ex.: “America/New_York”)
string
A mensagem inicial que o assistente irá falar quando a chamada começar
string
O prompt do sistema que define o comportamento e a personalidade do assistente
Optional Configuration
integer
O ID de um número de telefone a ser atribuído ao assistente (defina como null para desatribuir)
string
Tipo de detecção de atividade de voz. Opções: vad, ai
number
Nível de sensibilidade do endpoint (0-5)
number
Nível de sensibilidade de interrupção (0-5)
number
Nível de volume do som ambiente (0-1)
boolean
Se deve habilitar a avaliação após a chamada
boolean
Se deve enviar webhooks apenas em chamadas concluídas
boolean
Se deve incluir a URL da gravação no payload do webhook
Configuração de Webhook
boolean
Se as notificações do webhook estão habilitadas
string
A URL do webhook para notificações após a chamada (pode ser definida como null para remover)
Configuração de Interrupção
boolean
Se deve usar a configuração de palavras mínimas para interrupção
integer
Número mínimo de palavras antes que a interrupção seja permitida (0-10)
Variáveis e Esquema
object
Pares chave-valor de variáveis personalizadas para o assistente
array
Chamada Terminada
string
Descrição da funcionalidade da ferramenta de encerramento de chamada (máx. 500 caracteres)
Configurações de Voz e Fala
number
Configuração de temperatura do LLM (0-1)
number
Configuração de estabilidade da voz (0-1)
number
Configuração de similaridade da voz (0-1)
number
Multiplicador de velocidade da fala (0,7-1,2)
Configurações de Comportamento de Chamada
boolean
Se deve permitir interrupções do chamador
boolean
Se deve usar áudio de preenchimento durante o processamento
integer
Intervalo de reengajamento em segundos (7-600)
integer
Duração máxima da chamada em segundos (20-1200)
integer
Duração máxima de silêncio em segundos (1-120)
boolean
Se deve encerrar a chamada quando um correio de voz for detectado
boolean
Se deve habilitar a redução de ruído
boolean
Se deve gravar a chamada
string
Quem fala primeiro na chamada. Opções: Assistente de IA, Cliente
Respostas
string
Mensagem de sucesso confirmando a atualização do assistente
object
Respostas de erro
Show Respostas de erro
Show Respostas de erro
string
Mensagem de erro quando o assistente não é encontrado ou não pertence ao usuário autenticado
{
"message": "Assistant updated successfully",
"data": {
"id": 789,
"name": "Updated Sales Assistant",
"status": "active",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Assistant not found"
}
{
"message": "Validation failed",
"errors": {
"speech_speed": [
"The speech speed must be between 0.7 and 1.2."
],
"webhook_url": [
"The webhook url must be a valid URL."
]
}
}
{
"message": "Assistant update failed"
}
Observações
- Apenas os campos fornecidos no corpo da requisição serão atualizados.
- Todas as regras de validação se aplicam da mesma forma que ao criar um assistente.
- Para remover a atribuição de um número de telefone, defina phone_number_id como null.
- Para desabilitar o webhook, defina webhook_url como null ou is_webhook_active como false.
- O assistente deve pertencer ao usuário autenticado para ser atualizado.
⌘I

