Criar assistente
curl --request POST \
--url https://suasofia.online/api/user/assistant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"voice_id": 123,
"language_id": 123,
"type": "<string>",
"mode": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"llm_model_id": 123,
"multimodal_model_id": 123,
"chat_llm_fallback_id": 123,
"turn_detection_threshold": 123,
"secondary_language_ids": [
123
],
"knowledgebase_id": 123,
"knowledgebase_mode": "<string>",
"folder_id": 123,
"label_ids": [
123
],
"phone_number_id": 123,
"tool_ids": [
123
],
"tools": [
{}
],
"tts_emotion_enabled": true,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"llm_temperature": 123,
"synthesizer_provider_id": 123,
"transcriber_provider_id": 123,
"allow_interruptions": true,
"fillers": true,
"filler_config": {},
"record": true,
"enable_noise_cancellation": true,
"wait_for_customer": true,
"max_duration": 123,
"max_silence_duration": 123,
"max_initial_silence_duration": 123,
"ringing_time": 123,
"reengagement_interval": 123,
"reengagement_prompt": "<string>",
"end_call_on_voicemail": true,
"voice_mail_message": "<string>",
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"min_interrupt_words": 123,
"ambient_sound": "<string>",
"ambient_sound_volume": 123,
"is_webhook_active": true,
"webhook_url": "<string>",
"send_webhook_only_on_completed": true,
"include_recording_in_webhook": true,
"post_call_evaluation": true,
"post_call_schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"variables": {},
"conversation_inactivity_timeout": 123,
"conversation_ended_retrigger": true,
"conversation_ended_webhook_url": "<string>"
}
'import requests
url = "https://suasofia.online/api/user/assistant"
payload = {
"name": "<string>",
"voice_id": 123,
"language_id": 123,
"type": "<string>",
"mode": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"llm_model_id": 123,
"multimodal_model_id": 123,
"chat_llm_fallback_id": 123,
"turn_detection_threshold": 123,
"secondary_language_ids": [123],
"knowledgebase_id": 123,
"knowledgebase_mode": "<string>",
"folder_id": 123,
"label_ids": [123],
"phone_number_id": 123,
"tool_ids": [123],
"tools": [{}],
"tts_emotion_enabled": True,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"llm_temperature": 123,
"synthesizer_provider_id": 123,
"transcriber_provider_id": 123,
"allow_interruptions": True,
"fillers": True,
"filler_config": {},
"record": True,
"enable_noise_cancellation": True,
"wait_for_customer": True,
"max_duration": 123,
"max_silence_duration": 123,
"max_initial_silence_duration": 123,
"ringing_time": 123,
"reengagement_interval": 123,
"reengagement_prompt": "<string>",
"end_call_on_voicemail": True,
"voice_mail_message": "<string>",
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"min_interrupt_words": 123,
"ambient_sound": "<string>",
"ambient_sound_volume": 123,
"is_webhook_active": True,
"webhook_url": "<string>",
"send_webhook_only_on_completed": True,
"include_recording_in_webhook": True,
"post_call_evaluation": True,
"post_call_schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"variables": {},
"conversation_inactivity_timeout": 123,
"conversation_ended_retrigger": True,
"conversation_ended_webhook_url": "<string>"
}
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({
name: '<string>',
voice_id: 123,
language_id: 123,
type: '<string>',
mode: '<string>',
timezone: '<string>',
initial_message: '<string>',
system_prompt: '<string>',
llm_model_id: 123,
multimodal_model_id: 123,
chat_llm_fallback_id: 123,
turn_detection_threshold: 123,
secondary_language_ids: [123],
knowledgebase_id: 123,
knowledgebase_mode: '<string>',
folder_id: 123,
label_ids: [123],
phone_number_id: 123,
tool_ids: [123],
tools: [{}],
tts_emotion_enabled: true,
voice_stability: 123,
voice_similarity: 123,
speech_speed: 123,
llm_temperature: 123,
synthesizer_provider_id: 123,
transcriber_provider_id: 123,
allow_interruptions: true,
fillers: true,
filler_config: {},
record: true,
enable_noise_cancellation: true,
wait_for_customer: true,
max_duration: 123,
max_silence_duration: 123,
max_initial_silence_duration: 123,
ringing_time: 123,
reengagement_interval: 123,
reengagement_prompt: '<string>',
end_call_on_voicemail: true,
voice_mail_message: '<string>',
endpoint_type: '<string>',
endpoint_sensitivity: 123,
interrupt_sensitivity: 123,
min_interrupt_words: 123,
ambient_sound: '<string>',
ambient_sound_volume: 123,
is_webhook_active: true,
webhook_url: '<string>',
send_webhook_only_on_completed: true,
include_recording_in_webhook: true,
post_call_evaluation: true,
post_call_schema: [{name: '<string>', type: '<string>', description: '<string>'}],
variables: {},
conversation_inactivity_timeout: 123,
conversation_ended_retrigger: true,
conversation_ended_webhook_url: '<string>'
})
};
fetch('https://suasofia.online/api/user/assistant', 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://suasofia.online/api/user/assistant",
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([
'name' => '<string>',
'voice_id' => 123,
'language_id' => 123,
'type' => '<string>',
'mode' => '<string>',
'timezone' => '<string>',
'initial_message' => '<string>',
'system_prompt' => '<string>',
'llm_model_id' => 123,
'multimodal_model_id' => 123,
'chat_llm_fallback_id' => 123,
'turn_detection_threshold' => 123,
'secondary_language_ids' => [
123
],
'knowledgebase_id' => 123,
'knowledgebase_mode' => '<string>',
'folder_id' => 123,
'label_ids' => [
123
],
'phone_number_id' => 123,
'tool_ids' => [
123
],
'tools' => [
[
]
],
'tts_emotion_enabled' => true,
'voice_stability' => 123,
'voice_similarity' => 123,
'speech_speed' => 123,
'llm_temperature' => 123,
'synthesizer_provider_id' => 123,
'transcriber_provider_id' => 123,
'allow_interruptions' => true,
'fillers' => true,
'filler_config' => [
],
'record' => true,
'enable_noise_cancellation' => true,
'wait_for_customer' => true,
'max_duration' => 123,
'max_silence_duration' => 123,
'max_initial_silence_duration' => 123,
'ringing_time' => 123,
'reengagement_interval' => 123,
'reengagement_prompt' => '<string>',
'end_call_on_voicemail' => true,
'voice_mail_message' => '<string>',
'endpoint_type' => '<string>',
'endpoint_sensitivity' => 123,
'interrupt_sensitivity' => 123,
'min_interrupt_words' => 123,
'ambient_sound' => '<string>',
'ambient_sound_volume' => 123,
'is_webhook_active' => true,
'webhook_url' => '<string>',
'send_webhook_only_on_completed' => true,
'include_recording_in_webhook' => true,
'post_call_evaluation' => true,
'post_call_schema' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
],
'variables' => [
],
'conversation_inactivity_timeout' => 123,
'conversation_ended_retrigger' => true,
'conversation_ended_webhook_url' => '<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://suasofia.online/api/user/assistant"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"voice_id\": 123,\n \"language_id\": 123,\n \"type\": \"<string>\",\n \"mode\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"llm_model_id\": 123,\n \"multimodal_model_id\": 123,\n \"chat_llm_fallback_id\": 123,\n \"turn_detection_threshold\": 123,\n \"secondary_language_ids\": [\n 123\n ],\n \"knowledgebase_id\": 123,\n \"knowledgebase_mode\": \"<string>\",\n \"folder_id\": 123,\n \"label_ids\": [\n 123\n ],\n \"phone_number_id\": 123,\n \"tool_ids\": [\n 123\n ],\n \"tools\": [\n {}\n ],\n \"tts_emotion_enabled\": true,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"llm_temperature\": 123,\n \"synthesizer_provider_id\": 123,\n \"transcriber_provider_id\": 123,\n \"allow_interruptions\": true,\n \"fillers\": true,\n \"filler_config\": {},\n \"record\": true,\n \"enable_noise_cancellation\": true,\n \"wait_for_customer\": true,\n \"max_duration\": 123,\n \"max_silence_duration\": 123,\n \"max_initial_silence_duration\": 123,\n \"ringing_time\": 123,\n \"reengagement_interval\": 123,\n \"reengagement_prompt\": \"<string>\",\n \"end_call_on_voicemail\": true,\n \"voice_mail_message\": \"<string>\",\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"min_interrupt_words\": 123,\n \"ambient_sound\": \"<string>\",\n \"ambient_sound_volume\": 123,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"post_call_evaluation\": true,\n \"post_call_schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"variables\": {},\n \"conversation_inactivity_timeout\": 123,\n \"conversation_ended_retrigger\": true,\n \"conversation_ended_webhook_url\": \"<string>\"\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://suasofia.online/api/user/assistant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"voice_id\": 123,\n \"language_id\": 123,\n \"type\": \"<string>\",\n \"mode\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"llm_model_id\": 123,\n \"multimodal_model_id\": 123,\n \"chat_llm_fallback_id\": 123,\n \"turn_detection_threshold\": 123,\n \"secondary_language_ids\": [\n 123\n ],\n \"knowledgebase_id\": 123,\n \"knowledgebase_mode\": \"<string>\",\n \"folder_id\": 123,\n \"label_ids\": [\n 123\n ],\n \"phone_number_id\": 123,\n \"tool_ids\": [\n 123\n ],\n \"tools\": [\n {}\n ],\n \"tts_emotion_enabled\": true,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"llm_temperature\": 123,\n \"synthesizer_provider_id\": 123,\n \"transcriber_provider_id\": 123,\n \"allow_interruptions\": true,\n \"fillers\": true,\n \"filler_config\": {},\n \"record\": true,\n \"enable_noise_cancellation\": true,\n \"wait_for_customer\": true,\n \"max_duration\": 123,\n \"max_silence_duration\": 123,\n \"max_initial_silence_duration\": 123,\n \"ringing_time\": 123,\n \"reengagement_interval\": 123,\n \"reengagement_prompt\": \"<string>\",\n \"end_call_on_voicemail\": true,\n \"voice_mail_message\": \"<string>\",\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"min_interrupt_words\": 123,\n \"ambient_sound\": \"<string>\",\n \"ambient_sound_volume\": 123,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"post_call_evaluation\": true,\n \"post_call_schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"variables\": {},\n \"conversation_inactivity_timeout\": 123,\n \"conversation_ended_retrigger\": true,\n \"conversation_ended_webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://suasofia.online/api/user/assistant")
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 \"name\": \"<string>\",\n \"voice_id\": 123,\n \"language_id\": 123,\n \"type\": \"<string>\",\n \"mode\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"llm_model_id\": 123,\n \"multimodal_model_id\": 123,\n \"chat_llm_fallback_id\": 123,\n \"turn_detection_threshold\": 123,\n \"secondary_language_ids\": [\n 123\n ],\n \"knowledgebase_id\": 123,\n \"knowledgebase_mode\": \"<string>\",\n \"folder_id\": 123,\n \"label_ids\": [\n 123\n ],\n \"phone_number_id\": 123,\n \"tool_ids\": [\n 123\n ],\n \"tools\": [\n {}\n ],\n \"tts_emotion_enabled\": true,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"llm_temperature\": 123,\n \"synthesizer_provider_id\": 123,\n \"transcriber_provider_id\": 123,\n \"allow_interruptions\": true,\n \"fillers\": true,\n \"filler_config\": {},\n \"record\": true,\n \"enable_noise_cancellation\": true,\n \"wait_for_customer\": true,\n \"max_duration\": 123,\n \"max_silence_duration\": 123,\n \"max_initial_silence_duration\": 123,\n \"ringing_time\": 123,\n \"reengagement_interval\": 123,\n \"reengagement_prompt\": \"<string>\",\n \"end_call_on_voicemail\": true,\n \"voice_mail_message\": \"<string>\",\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"min_interrupt_words\": 123,\n \"ambient_sound\": \"<string>\",\n \"ambient_sound_volume\": 123,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"post_call_evaluation\": true,\n \"post_call_schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"variables\": {},\n \"conversation_inactivity_timeout\": 123,\n \"conversation_ended_retrigger\": true,\n \"conversation_ended_webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Assistente criado com sucesso",
"data": {
"id": 789,
"name": "Assistente de Vendas",
"status": "inactive",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Falha na validação",
"errors": {
"name": ["O campo nome é obrigatório."],
"voice_id": ["A voz selecionada não é compatível com o tipo de motor escolhido."],
"knowledgebase_mode": ["Apenas o modo function_call está disponível para assistentes multimodais."]
}
}
Assistentes
Criar assistente
Crie um novo assistente de IA com configurações específicas
POST
/
user
/
assistant
Criar assistente
curl --request POST \
--url https://suasofia.online/api/user/assistant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"voice_id": 123,
"language_id": 123,
"type": "<string>",
"mode": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"llm_model_id": 123,
"multimodal_model_id": 123,
"chat_llm_fallback_id": 123,
"turn_detection_threshold": 123,
"secondary_language_ids": [
123
],
"knowledgebase_id": 123,
"knowledgebase_mode": "<string>",
"folder_id": 123,
"label_ids": [
123
],
"phone_number_id": 123,
"tool_ids": [
123
],
"tools": [
{}
],
"tts_emotion_enabled": true,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"llm_temperature": 123,
"synthesizer_provider_id": 123,
"transcriber_provider_id": 123,
"allow_interruptions": true,
"fillers": true,
"filler_config": {},
"record": true,
"enable_noise_cancellation": true,
"wait_for_customer": true,
"max_duration": 123,
"max_silence_duration": 123,
"max_initial_silence_duration": 123,
"ringing_time": 123,
"reengagement_interval": 123,
"reengagement_prompt": "<string>",
"end_call_on_voicemail": true,
"voice_mail_message": "<string>",
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"min_interrupt_words": 123,
"ambient_sound": "<string>",
"ambient_sound_volume": 123,
"is_webhook_active": true,
"webhook_url": "<string>",
"send_webhook_only_on_completed": true,
"include_recording_in_webhook": true,
"post_call_evaluation": true,
"post_call_schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"variables": {},
"conversation_inactivity_timeout": 123,
"conversation_ended_retrigger": true,
"conversation_ended_webhook_url": "<string>"
}
'import requests
url = "https://suasofia.online/api/user/assistant"
payload = {
"name": "<string>",
"voice_id": 123,
"language_id": 123,
"type": "<string>",
"mode": "<string>",
"timezone": "<string>",
"initial_message": "<string>",
"system_prompt": "<string>",
"llm_model_id": 123,
"multimodal_model_id": 123,
"chat_llm_fallback_id": 123,
"turn_detection_threshold": 123,
"secondary_language_ids": [123],
"knowledgebase_id": 123,
"knowledgebase_mode": "<string>",
"folder_id": 123,
"label_ids": [123],
"phone_number_id": 123,
"tool_ids": [123],
"tools": [{}],
"tts_emotion_enabled": True,
"voice_stability": 123,
"voice_similarity": 123,
"speech_speed": 123,
"llm_temperature": 123,
"synthesizer_provider_id": 123,
"transcriber_provider_id": 123,
"allow_interruptions": True,
"fillers": True,
"filler_config": {},
"record": True,
"enable_noise_cancellation": True,
"wait_for_customer": True,
"max_duration": 123,
"max_silence_duration": 123,
"max_initial_silence_duration": 123,
"ringing_time": 123,
"reengagement_interval": 123,
"reengagement_prompt": "<string>",
"end_call_on_voicemail": True,
"voice_mail_message": "<string>",
"endpoint_type": "<string>",
"endpoint_sensitivity": 123,
"interrupt_sensitivity": 123,
"min_interrupt_words": 123,
"ambient_sound": "<string>",
"ambient_sound_volume": 123,
"is_webhook_active": True,
"webhook_url": "<string>",
"send_webhook_only_on_completed": True,
"include_recording_in_webhook": True,
"post_call_evaluation": True,
"post_call_schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"variables": {},
"conversation_inactivity_timeout": 123,
"conversation_ended_retrigger": True,
"conversation_ended_webhook_url": "<string>"
}
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({
name: '<string>',
voice_id: 123,
language_id: 123,
type: '<string>',
mode: '<string>',
timezone: '<string>',
initial_message: '<string>',
system_prompt: '<string>',
llm_model_id: 123,
multimodal_model_id: 123,
chat_llm_fallback_id: 123,
turn_detection_threshold: 123,
secondary_language_ids: [123],
knowledgebase_id: 123,
knowledgebase_mode: '<string>',
folder_id: 123,
label_ids: [123],
phone_number_id: 123,
tool_ids: [123],
tools: [{}],
tts_emotion_enabled: true,
voice_stability: 123,
voice_similarity: 123,
speech_speed: 123,
llm_temperature: 123,
synthesizer_provider_id: 123,
transcriber_provider_id: 123,
allow_interruptions: true,
fillers: true,
filler_config: {},
record: true,
enable_noise_cancellation: true,
wait_for_customer: true,
max_duration: 123,
max_silence_duration: 123,
max_initial_silence_duration: 123,
ringing_time: 123,
reengagement_interval: 123,
reengagement_prompt: '<string>',
end_call_on_voicemail: true,
voice_mail_message: '<string>',
endpoint_type: '<string>',
endpoint_sensitivity: 123,
interrupt_sensitivity: 123,
min_interrupt_words: 123,
ambient_sound: '<string>',
ambient_sound_volume: 123,
is_webhook_active: true,
webhook_url: '<string>',
send_webhook_only_on_completed: true,
include_recording_in_webhook: true,
post_call_evaluation: true,
post_call_schema: [{name: '<string>', type: '<string>', description: '<string>'}],
variables: {},
conversation_inactivity_timeout: 123,
conversation_ended_retrigger: true,
conversation_ended_webhook_url: '<string>'
})
};
fetch('https://suasofia.online/api/user/assistant', 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://suasofia.online/api/user/assistant",
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([
'name' => '<string>',
'voice_id' => 123,
'language_id' => 123,
'type' => '<string>',
'mode' => '<string>',
'timezone' => '<string>',
'initial_message' => '<string>',
'system_prompt' => '<string>',
'llm_model_id' => 123,
'multimodal_model_id' => 123,
'chat_llm_fallback_id' => 123,
'turn_detection_threshold' => 123,
'secondary_language_ids' => [
123
],
'knowledgebase_id' => 123,
'knowledgebase_mode' => '<string>',
'folder_id' => 123,
'label_ids' => [
123
],
'phone_number_id' => 123,
'tool_ids' => [
123
],
'tools' => [
[
]
],
'tts_emotion_enabled' => true,
'voice_stability' => 123,
'voice_similarity' => 123,
'speech_speed' => 123,
'llm_temperature' => 123,
'synthesizer_provider_id' => 123,
'transcriber_provider_id' => 123,
'allow_interruptions' => true,
'fillers' => true,
'filler_config' => [
],
'record' => true,
'enable_noise_cancellation' => true,
'wait_for_customer' => true,
'max_duration' => 123,
'max_silence_duration' => 123,
'max_initial_silence_duration' => 123,
'ringing_time' => 123,
'reengagement_interval' => 123,
'reengagement_prompt' => '<string>',
'end_call_on_voicemail' => true,
'voice_mail_message' => '<string>',
'endpoint_type' => '<string>',
'endpoint_sensitivity' => 123,
'interrupt_sensitivity' => 123,
'min_interrupt_words' => 123,
'ambient_sound' => '<string>',
'ambient_sound_volume' => 123,
'is_webhook_active' => true,
'webhook_url' => '<string>',
'send_webhook_only_on_completed' => true,
'include_recording_in_webhook' => true,
'post_call_evaluation' => true,
'post_call_schema' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
],
'variables' => [
],
'conversation_inactivity_timeout' => 123,
'conversation_ended_retrigger' => true,
'conversation_ended_webhook_url' => '<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://suasofia.online/api/user/assistant"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"voice_id\": 123,\n \"language_id\": 123,\n \"type\": \"<string>\",\n \"mode\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"llm_model_id\": 123,\n \"multimodal_model_id\": 123,\n \"chat_llm_fallback_id\": 123,\n \"turn_detection_threshold\": 123,\n \"secondary_language_ids\": [\n 123\n ],\n \"knowledgebase_id\": 123,\n \"knowledgebase_mode\": \"<string>\",\n \"folder_id\": 123,\n \"label_ids\": [\n 123\n ],\n \"phone_number_id\": 123,\n \"tool_ids\": [\n 123\n ],\n \"tools\": [\n {}\n ],\n \"tts_emotion_enabled\": true,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"llm_temperature\": 123,\n \"synthesizer_provider_id\": 123,\n \"transcriber_provider_id\": 123,\n \"allow_interruptions\": true,\n \"fillers\": true,\n \"filler_config\": {},\n \"record\": true,\n \"enable_noise_cancellation\": true,\n \"wait_for_customer\": true,\n \"max_duration\": 123,\n \"max_silence_duration\": 123,\n \"max_initial_silence_duration\": 123,\n \"ringing_time\": 123,\n \"reengagement_interval\": 123,\n \"reengagement_prompt\": \"<string>\",\n \"end_call_on_voicemail\": true,\n \"voice_mail_message\": \"<string>\",\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"min_interrupt_words\": 123,\n \"ambient_sound\": \"<string>\",\n \"ambient_sound_volume\": 123,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"post_call_evaluation\": true,\n \"post_call_schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"variables\": {},\n \"conversation_inactivity_timeout\": 123,\n \"conversation_ended_retrigger\": true,\n \"conversation_ended_webhook_url\": \"<string>\"\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://suasofia.online/api/user/assistant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"voice_id\": 123,\n \"language_id\": 123,\n \"type\": \"<string>\",\n \"mode\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"llm_model_id\": 123,\n \"multimodal_model_id\": 123,\n \"chat_llm_fallback_id\": 123,\n \"turn_detection_threshold\": 123,\n \"secondary_language_ids\": [\n 123\n ],\n \"knowledgebase_id\": 123,\n \"knowledgebase_mode\": \"<string>\",\n \"folder_id\": 123,\n \"label_ids\": [\n 123\n ],\n \"phone_number_id\": 123,\n \"tool_ids\": [\n 123\n ],\n \"tools\": [\n {}\n ],\n \"tts_emotion_enabled\": true,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"llm_temperature\": 123,\n \"synthesizer_provider_id\": 123,\n \"transcriber_provider_id\": 123,\n \"allow_interruptions\": true,\n \"fillers\": true,\n \"filler_config\": {},\n \"record\": true,\n \"enable_noise_cancellation\": true,\n \"wait_for_customer\": true,\n \"max_duration\": 123,\n \"max_silence_duration\": 123,\n \"max_initial_silence_duration\": 123,\n \"ringing_time\": 123,\n \"reengagement_interval\": 123,\n \"reengagement_prompt\": \"<string>\",\n \"end_call_on_voicemail\": true,\n \"voice_mail_message\": \"<string>\",\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"min_interrupt_words\": 123,\n \"ambient_sound\": \"<string>\",\n \"ambient_sound_volume\": 123,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"post_call_evaluation\": true,\n \"post_call_schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"variables\": {},\n \"conversation_inactivity_timeout\": 123,\n \"conversation_ended_retrigger\": true,\n \"conversation_ended_webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://suasofia.online/api/user/assistant")
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 \"name\": \"<string>\",\n \"voice_id\": 123,\n \"language_id\": 123,\n \"type\": \"<string>\",\n \"mode\": \"<string>\",\n \"timezone\": \"<string>\",\n \"initial_message\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"llm_model_id\": 123,\n \"multimodal_model_id\": 123,\n \"chat_llm_fallback_id\": 123,\n \"turn_detection_threshold\": 123,\n \"secondary_language_ids\": [\n 123\n ],\n \"knowledgebase_id\": 123,\n \"knowledgebase_mode\": \"<string>\",\n \"folder_id\": 123,\n \"label_ids\": [\n 123\n ],\n \"phone_number_id\": 123,\n \"tool_ids\": [\n 123\n ],\n \"tools\": [\n {}\n ],\n \"tts_emotion_enabled\": true,\n \"voice_stability\": 123,\n \"voice_similarity\": 123,\n \"speech_speed\": 123,\n \"llm_temperature\": 123,\n \"synthesizer_provider_id\": 123,\n \"transcriber_provider_id\": 123,\n \"allow_interruptions\": true,\n \"fillers\": true,\n \"filler_config\": {},\n \"record\": true,\n \"enable_noise_cancellation\": true,\n \"wait_for_customer\": true,\n \"max_duration\": 123,\n \"max_silence_duration\": 123,\n \"max_initial_silence_duration\": 123,\n \"ringing_time\": 123,\n \"reengagement_interval\": 123,\n \"reengagement_prompt\": \"<string>\",\n \"end_call_on_voicemail\": true,\n \"voice_mail_message\": \"<string>\",\n \"endpoint_type\": \"<string>\",\n \"endpoint_sensitivity\": 123,\n \"interrupt_sensitivity\": 123,\n \"min_interrupt_words\": 123,\n \"ambient_sound\": \"<string>\",\n \"ambient_sound_volume\": 123,\n \"is_webhook_active\": true,\n \"webhook_url\": \"<string>\",\n \"send_webhook_only_on_completed\": true,\n \"include_recording_in_webhook\": true,\n \"post_call_evaluation\": true,\n \"post_call_schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"variables\": {},\n \"conversation_inactivity_timeout\": 123,\n \"conversation_ended_retrigger\": true,\n \"conversation_ended_webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Assistente criado com sucesso",
"data": {
"id": 789,
"name": "Assistente de Vendas",
"status": "inactive",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Falha na validação",
"errors": {
"name": ["O campo nome é obrigatório."],
"voice_id": ["A voz selecionada não é compatível com o tipo de motor escolhido."],
"knowledgebase_mode": ["Apenas o modo function_call está disponível para assistentes multimodais."]
}
}
Este endpoint permite que você crie um novo assistente de IA com opções de configuração abrangentes.
Modos de Motor
A API suporta três modos de motor, cada um com diferentes capacidades:| Modo | Descrição | Campos Obrigatórios |
|---|---|---|
pipeline | Pipeline tradicional STT → LLM → TTS | llm_model_id |
multimodal | IA multimodal em tempo real | multimodal_model_id |
dualplex | Cérebro multimodal + voz TTS personalizada | multimodal_model_id |
Corpo da Solicitação
Campos Obrigatórios Principais
string
required
O nome do assistente (máx. 255 caracteres)
integer
required
O ID da voz a ser usada para o assistente. Use o endpoint Obter Vozes com o parâmetro
mode para obter vozes compatíveis com seu modo de motor.integer
required
O ID do idioma para o assistente. Use o endpoint Obter Idiomas para obter idiomas disponíveis.
string
required
O tipo de assistente. Opções:
inbound, outboundstring
required
O modo do motor. Opções:
pipeline, multimodal, dualplexstring
required
O fuso horário para o assistente (ex: “Europe/Bucharest”, “America/New_York”)
string
required
A mensagem inicial que o assistente falará quando a chamada começar (máx. 200 caracteres)
string
required
O prompt do sistema que define o comportamento e a personalidade do assistente
Campos Específicos do Modo
integer
O ID do modelo LLM a ser usado. Obrigatório para o modo
pipeline.Use o endpoint Obter Modelos para obter modelos disponíveis.integer
O ID do modelo multimodal. Obrigatório para os modos
multimodal e dualplex.Use o endpoint Obter Modelos para obter modelos multimodais disponíveis.integer
ID do modelo LLM de fallback para chamadas de ferramentas nos modos multimodal/dualplex. Opcional.
number
Sensibilidade de detecção de turnos para modos multimodal/dualplex (0-1). Padrão: automático
Idiomas Secundários
integer[]
Array de IDs de idiomas adicionais que o assistente pode falar. O assistente detectará e mudará de idioma automaticamente.
"secondary_language_ids": [2, 3, 4]
Configurações de Base de Conhecimento
integer
O ID da base de conhecimento a ser anexada a este assistente
string
Como usar a base de conhecimento. Opções:
function_call- A IA chama uma função para pesquisar (obrigatório para multimodal/dualplex)prompt- O conhecimento é injetado no prompt (apenas pipeline)
Organização
integer
ID de uma pasta para colocar este assistente. Deve pertencer à sua conta. Envie
null para deixar o assistente sem categorização.integer[]
Array de IDs de rótulos a serem aplicados a este assistente. Cada rótulo deve pertencer à sua conta.
"label_ids": [3, 5]
Número de Telefone
integer
O ID de um número de telefone a ser atribuído ao assistente. Deve pertencer à sua conta.
Para assistentes
inbound, o número de telefone não pode ser do tipo Caller ID e não pode já estar atribuído a outro assistente inbound.Ferramentas Personalizadas de Chamada
integer[]
Array de IDs de ferramentas personalizadas de chamada a serem anexadas. Cada ferramenta deve pertencer à sua conta.
"tool_ids": [1, 5, 12]
Ferramentas Integradas
array
Array de ferramentas integradas a serem habilitadas. Cada ferramenta tem um
type e campos específicos da ferramenta.Show Tipos de Ferramentas
Show Tipos de Ferramentas
call_transfer - Transferir a chamada para outro número de telefone
phone_number(obrigatório): Número de telefone para transferir (ex: “+1234567890”)description: Quando transferir a chamadacustom: Se verdadeiro, a IA pode determinar o número de transferência dinamicamentetimezone: Fuso horário para disponibilidade de transferênciawarm_transfer: Enviar uma mensagem ao cliente antes de transferir (padrão:false)warm_transfer_message: Prompt dizendo à IA o que dizer antes de transferir (ex: “Diga ao cliente que a chamada está sendo transferida.”)
supervisor_phone(obrigatório): Número de telefone a discar para a transferência quente (ex: “+14155552001”). Secustom_sipestiver habilitado, este é um endereço SIP ou ramal interno em vez disso.outbound_phone_id(obrigatório): ID do número de telefone usado para discar o supervisor. Use Obter Números de Telefone para encontrar números disponíveis.description(obrigatório): Quando transferir — descreve quando a IA deve iniciar a transferência quente (ex: “Transfira a chamada para um supervisor humano quando o cliente solicitar falar com uma pessoa real.”)custom_sip: Habilitar para inserir um endereço SIP personalizado ou ramal interno em vez de um número de telefone (padrão:false)caller_id_mode: Qual número de telefone o supervisor vê ao receber a chamada. Opções:outbound_number(padrão — mostra o número de telefone de saída),customer_number(mostra o número do chamador),custom(mostra um número personalizado)custom_caller_id: Número de telefone personalizado mostrado ao supervisor. Usado apenas quandocaller_id_modeécustom.hold_music: Áudio tocado para o chamador enquanto está em espera. Opções:hold_music(padrão — toca música de espera padrão),none(silêncio, sem música)hold_music_volume: Nível de volume para música de espera, 0-100 (padrão:80)hold_message: Mensagem falada ao chamador antes de colocá-lo em espera (padrão: “Por favor, aguarde enquanto eu o conecto a um supervisor.”)summary_instructions: Instruções sobre como a IA deve informar o supervisor sobre a chamada (padrão: “Introduza a conversa do seu ponto de vista:\n- QUEM está ligando (nome, empresa se mencionado)\n- POR QUE ligaram (seu objetivo ou problema)\n- POR QUE uma pessoa é necessária neste momento\n\nMantenha breve (2-3 frases).”)briefing_initial_message: A primeira mensagem que a IA diz ao supervisor quando ele atende (padrão: “Olá! Eu tenho um chamador na linha que precisa da sua assistência. Posso informá-lo sobre a situação?”)connected_message: Mensagem falada ao chamador após o supervisor estar conectado (padrão: “Você está agora conectado a um supervisor. Vou deixá-lo com ele.”)
description: Quando a IA deve encerrar a chamada
description: Quando usar a entrada DTMF (para navegação IVR)
timeout: Segundos para esperar pela entrada, 1-30 (padrão: 5)stop_key: Tecla que encerra a entrada. Opções:#(padrão),*
calendar_type: Provedor de calendário. Opções:calcom(padrão),calendlydescription: Quando oferecer agendamento
calendar_type: "calcom"):calcom_api_key(obrigatório): Sua chave de API do Cal.comcalcom_event_slug(obrigatório): O slug do tipo de evento do Cal.comcalcom_team_slug: Slug da equipe se o evento pertencer a uma equipe do Cal.comcalcom_endpoint: Região da API do Cal.com. Opções:us(padrão —https://api.cal.com),eu(https://api.cal.eu),custom(usacalcom_custom_endpoint)calcom_custom_endpoint: URL base da API personalizada do Cal.com. Usado apenas quandocalcom_endpointécustom(ex:https://my-calcom-instance.com).calcom_event_id: ID do tipo de evento do Cal.com. Quando fornecido, o nome do evento é resolvido automaticamente a partir do Cal.com.calcom_event_name: Nome do evento legível por humanos (ex:"Reunião de 30 Minutos (30 min)"). Resolvido a partir do Cal.com quandocalcom_event_idé fornecido, ou definido explicitamente.calcom_booking_fields: Array de campos de reserva personalizados para o evento. Cada campo tem:slug(obrigatório): Identificador do campotype(obrigatório): Tipo de campo (ex: “text”, “email”, “phone”, “select”)label(obrigatório): Rótulo de exibiçãorequired: Se o campo é obrigatório (padrão:false)options: Array de opções para campos de seleção
calendar_type: "calendly"):calendly_api_key(obrigatório): Seu Token de Acesso Pessoal (PAT) do Calendly. Gere um a partir da sua conta do Calendly: Integrações e aplicativos → API e webhooks → Gerar novo token.calendly_event_type_uri(obrigatório): URI completa do tipo de evento do Calendly (ex:"https://api.calendly.com/event_types/{uuid}"). Deve pertencer à conta do PAT autenticado.
assistant_id(obrigatório): ID do assistente alvo. Deve pertencer à sua conta.description: Quando transferir (máx. 500 caracteres, padrão: “Transfira a conversa para este assistente quando apropriado.”)message_before_transfer: Mensagem opcional que a IA fala antes de mudar para o assistente alvo (máx. 500 caracteres).speak_transfer_greeting: Setrue, o assistente alvo fala sua mensagem inicial configurada após a transferência ser concluída (padrão:true).
"tools": [
{
"type": "call_transfer",
"phone_number": "+1234567890",
"description": "Transferir quando o cliente solicitar suporte humano"
},
{
"type": "warm_call_transfer",
"supervisor_phone": "+1234567891",
"outbound_phone_id": 7,
"description": "Transferir a chamada para um supervisor humano quando o cliente solicitar falar com uma pessoa real.",
"custom_sip": false,
"caller_id_mode": "outbound_number",
"hold_music": "hold_music",
"hold_music_volume": 80,
"hold_message": "Por favor, aguarde enquanto eu o conecto a um supervisor.",
"summary_instructions": "Introduza a conversa do seu ponto de vista:\n- QUEM está ligando (nome, empresa se mencionado)\n- POR QUE ligaram (seu objetivo ou problema)\n- POR QUE uma pessoa é necessária neste momento\n\nMantenha breve (2-3 frases).",
"briefing_initial_message": "Olá! Eu tenho um chamador na linha que precisa da sua assistência. Posso informá-lo sobre a situação?",
"connected_message": "Você está agora conectado a um supervisor. Vou deixá-lo com ele."
},
{
"type": "collect_keypad",
"timeout": 5,
"stop_key": "#"
},
{
"type": "assistant_transfer",
"assistant_id": 14765,
"description": "Transferir para o Assistente de Suporte quando o cliente precisar de ajuda técnica.",
"message_before_transfer": "Claro — deixe-me transferi-lo para nosso especialista em suporte.",
"speak_transfer_greeting": true
},
{
"type": "end_call",
"description": "Encerrar a chamada quando o cliente confirmar satisfação"
}
]
Configurações de Voz e TTS
boolean
default:"true"
Se deve habilitar a síntese de texto para fala emocional
number
default:"0.70"
Configuração de estabilidade da voz (0-1). Maior = voz mais consistente
number
default:"0.50"
Configuração de similaridade da voz (0-1). Maior = mais próximo da voz original
number
default:"1.00"
Multiplicador de velocidade da fala (0.7-1.2)
number
default:"0.10"
Configuração de temperatura do LLM (0-1). Menor = mais determinístico
integer
ID do provedor de TTS personalizado. Selecionado automaticamente com base no idioma se não fornecido. Use o endpoint Obter Provedores de Sintetizador para descobrir provedores disponíveis.
integer
ID do provedor de STT personalizado. Selecionado automaticamente com base no idioma se não fornecido. Apenas modo pipeline. Use o endpoint Obter Provedores de Transcrição para descobrir provedores disponíveis.
Configurações de Comportamento da Chamada
boolean
default:"true"
Se deve permitir interrupções do chamador.
Não pode ser desabilitado para modos
multimodal e dualplex.boolean
default:"false"
Se deve usar áudio de preenchimento durante o processamento (ex: “hum”, “deixe-me verificar”).
Disponível apenas para o modo
pipeline.object
Perfis de palavras de preenchimento personalizados por categoria. Se não fornecido, os padrões são definidos com base no idioma do assistente. Cada categoria é um array de frases curtas.
positive: Palavras de preenchimento para respostas positivas/afirmativas (ex: “Ótimo!”, “Perfeito!”)negative: Palavras de preenchimento para respostas negativas/neutras (ex: “Hmm.”, “Entendi.”)question: Palavras de preenchimento ao processar uma pergunta (ex: “Hmm.”, “Deixe-me pensar.”)neutral: Palavras de preenchimento para reconhecimentos neutros (ex: “Ok.”, “Entendi.”)
"filler_config": {
"positive": ["Super!", "Ótimo!", "Perfeito!"],
"negative": ["Hmm.", "Entendi.", "Vejo."],
"question": ["Hmm.", "Deixe-me verificar.", "Boa pergunta."],
"neutral": ["Ok.", "Entendi.", "Anotado."]
}
boolean
default:"false"
Se deve gravar a chamada
boolean
default:"true"
Se deve habilitar a cancelamento de ruído
boolean
default:"false"
Se verdadeiro, o assistente espera que o cliente fale primeiro
Configurações de Tempo
integer
default:"600"
Duração máxima da chamada em segundos (20-1200)
integer
default:"40"
Duração máxima de silêncio antes do reengajamento em segundos (1-360)
integer
Duração máxima de silêncio no início da chamada antes de encerrar (1-120 segundos). Opcional.
integer
default:"30"
Duração máxima de toque antes de desistir (1-60 segundos)
Configurações de Reengajamento
integer
default:"30"
Intervalo de reengajamento em segundos (7-600)
string
Prompt personalizado para mensagens de reengajamento (máx. 1000 caracteres)Exemplo:
"Você ainda está aí? Tem mais alguma pergunta?"Configurações de Correio de Voz
boolean
default:"true"
Se deve encerrar a chamada quando o correio de voz for detectado
string
Mensagem a ser deixada no correio de voz antes de desligar (máx. 1000 caracteres)
Detecção de Endpoint
string
default:"vad"
Tipo de detecção de atividade de voz. Opções:
vad, ainumber
default:"0.5"
Nível de sensibilidade do endpoint (0-5)
number
default:"0.5"
Nível de sensibilidade de interrupção (0-5)
integer
Mínimo de palavras antes que a interrupção seja permitida (0-10). Defina para habilitar.
Som Ambiente
string
Som ambiente de fundo. Opções:
off, office, city, forest, crowded_room, cafe, naturenumber
default:"0.5"
Nível de volume do som ambiente (0-1)
Configuração de Webhook
boolean
default:"false"
Se as notificações de webhook estão habilitadas
string
A URL do webhook para notificações pós-chamada. Obrigatório se
is_webhook_active for verdadeiro.boolean
default:"true"
Se deve enviar webhooks apenas em chamadas concluídas (não falhadas/sem resposta)
boolean
default:"true"
Se deve incluir a URL da gravação na carga útil do webhook
Avaliação Pós-Chamada
boolean
default:"true"
Se deve habilitar a avaliação pós-chamada da IA
array
Definição do esquema para extração de dados pós-chamada
Show propriedades do post_call_schema
Show propriedades do post_call_schema
"post_call_schema": [
{"name": "status", "type": "bool", "description": "O objetivo da chamada foi alcançado"},
{"name": "summary", "type": "string", "description": "Resumo breve da chamada"}
]
Variáveis
object
Pares chave-valor de variáveis personalizadas acessíveis em prompts via
{{variable_name}}"variables": {
"company_name": "Acme Corp",
"product": "Premium Widget",
"support_email": "support@acme.com"
}
Configurações de Conversa Encerrada
integer
default:"30"
Minutos de inatividade do chat antes que a conversa seja considerada encerrada (1-1440)
boolean
default:"false"
Se deve permitir reativar a conversa após ela terminar devido à inatividade
string
URL do webhook chamada quando uma conversa de chat termina devido à inatividade. Separada do webhook principal da chamada.
Exemplos de Solicitações
Assistente em Modo Pipeline
{
"name": "Assistente de Vendas",
"voice_id": 1,
"language_id": 1,
"type": "outbound",
"mode": "pipeline",
"timezone": "Europe/Bucharest",
"initial_message": "Olá! Como posso ajudá-lo hoje?",
"system_prompt": "Você é um assistente de vendas profissional...",
"llm_model_id": 2,
"secondary_language_ids": [2, 3],
"knowledgebase_id": 1,
"knowledgebase_mode": "prompt",
"fillers": true,
"filler_config": {
"positive": ["Ótimo!", "Perfeito!", "Incrível!"],
"negative": ["Hmm.", "Entendi."],
"question": ["Boa pergunta.", "Deixe-me verificar."],
"neutral": ["Ok.", "Anotado.", "Entendi."]
},
"tool_ids": [1, 5],
"tools": [
{
"type": "end_call",
"description": "Encerrar a chamada quando o cliente estiver satisfeito"
},
{
"type": "call_transfer",
"phone_number": "+1234567890",
"description": "Transferir para suporte"
},
{
"type": "warm_call_transfer",
"supervisor_phone": "+1234567891",
"outbound_phone_id": 7,
"description": "Transferir a chamada para um supervisor humano quando o cliente solicitar falar com uma pessoa real.",
"custom_sip": false,
"caller_id_mode": "outbound_number",
"hold_music": "hold_music",
"hold_music_volume": 80,
"hold_message": "Por favor, aguarde enquanto eu o conecto a um supervisor.",
"summary_instructions": "Introduza a conversa do seu ponto de vista:\n- QUEM está ligando (nome, empresa se mencionado)\n- POR QUE ligaram (seu objetivo ou problema)\n- POR QUE uma pessoa é necessária neste momento\n\nMantenha breve (2-3 frases).",
"briefing_initial_message": "Olá! Eu tenho um chamador na linha que precisa da sua assistência. Posso informá-lo sobre a situação?",
"connected_message": "Você está agora conectado a um supervisor. Vou deixá-lo com ele."
},
{
"type": "collect_keypad",
"timeout": 5,
"stop_key": "#"
}
],
"reengagement_interval": 20,
"reengagement_prompt": "Você ainda está aí?"
}
Assistente em Modo Multimodal
{
"name": "Bot de Suporte",
"voice_id": 41,
"language_id": 1,
"type": "inbound",
"mode": "multimodal",
"timezone": "America/New_York",
"initial_message": "Oi! Bem-vindo ao suporte.",
"system_prompt": "Você é um agente de suporte útil...",
"multimodal_model_id": 1,
"chat_llm_fallback_id": 2,
"turn_detection_threshold": 0.7,
"knowledgebase_id": 1,
"knowledgebase_mode": "function_call",
"tts_emotion_enabled": false
}
Assistente em Modo Dualplex
{
"name": "Agente Premium",
"voice_id": 1,
"language_id": 2,
"type": "outbound",
"mode": "dualplex",
"timezone": "Europe/Bucharest",
"initial_message": "Buna ziua!",
"system_prompt": "Você é um assistente profissional...",
"multimodal_model_id": 4,
"chat_llm_fallback_id": 2,
"secondary_language_ids": [1, 3],
"knowledgebase_id": 1,
"knowledgebase_mode": "function_call",
"ambient_sound": "office",
"ambient_sound_volume": 0.3
}
Resposta
string
Mensagem de sucesso confirmando a criação do assistente
object
{
"message": "Assistente criado com sucesso",
"data": {
"id": 789,
"name": "Assistente de Vendas",
"status": "inactive",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Falha na validação",
"errors": {
"name": ["O campo nome é obrigatório."],
"voice_id": ["A voz selecionada não é compatível com o tipo de motor escolhido."],
"knowledgebase_mode": ["Apenas o modo function_call está disponível para assistentes multimodais."]
}
}
Notas
- Todos os campos obrigatórios devem ser fornecidos para a criação bem-sucedida do assistente
- Use o endpoint Obter Vozes com o parâmetro
modepara obter vozes compatíveis - Para modos multimodal/dualplex,
knowledgebase_modedeve serfunction_call - Para modos multimodal/dualplex,
allow_interruptionsestá sempre habilitado - Preenchimentos estão disponíveis apenas no modo pipeline
- O assistente é criado com status
inactivepor padrão

