Criar um Assistente
curl --request POST \
--url https://app.mayahub.ai/api/user/assistant \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
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([
'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"
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("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://app.mayahub.ai/api/user/assistant")
.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")
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 \"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 created successfully",
"data": {
"id": 789,
"name": "Sales Assistant",
"status": "active",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Validation failed",
"errors": {
"assistant_name": [
"The assistant name field is required."
],
"webhook_url": [
"The webhook url field is required when is webhook active is true."
]
}
}
{
"message": "Assistant creation failed"
}
Assistentes
Criar um Assistente
Crie um novo assistente de IA com a configuração especificada
POST
/
user
/
assistant
Criar um Assistente
curl --request POST \
--url https://app.mayahub.ai/api/user/assistant \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
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([
'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"
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("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://app.mayahub.ai/api/user/assistant")
.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")
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 \"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 created successfully",
"data": {
"id": 789,
"name": "Sales Assistant",
"status": "active",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Validation failed",
"errors": {
"assistant_name": [
"The assistant name field is required."
],
"webhook_url": [
"The webhook url field is required when is webhook active is true."
]
}
}
{
"message": "Assistant creation failed"
}
Este endpoint permite criar um novo assistente de IA com opções de configuração completas.
Corpo da Requisição
Campos Principais Obrigatóriosstring
required
O nome do assistente (máximo de 255 caracteres)
integer
required
O ID da voz a ser usada pelo assistente (deve existir nas vozes disponíveis)
string
required
O nome do idioma do assistente (máximo de 100 caracteres)
string
required
O nome do modelo LLM a ser utilizado (máximo de 100 caracteres)
string
required
O tipo de direção da chamada. Opções: receive (receber), make (realizar)
string
required
O tipo de engine a ser utilizado. Opções: pipeline, multimodal
string
required
O fuso horário do assistente (ex.: “America/New_York”)
string
required
A mensagem inicial que o assistente dirá quando a chamada começar
string
required
O system prompt que define o comportamento e a personalidade do assistente
Configuração Opicional
integer
O ID de um número de telefone a ser atribuído ao assistente (deve existir nos números de telefone do usuário)
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
Indica se a avaliação pós-chamada deve ser ativada
boolean
Indica se os webhooks devem ser enviados apenas em chamadas concluídas
boolean
Indica se o URL da gravação deve ser incluído no payload do webhook
Configuração de Webhook
boolean
Indica se as notificações de webhook estão ativadas
string
A URL do webhook para notificações pós-chamada (obrigatória se is_webhook_active for verdadeiro)
Configurações de Interrupção
boolean
Indica se deve usar a configuração de palavras mínimas de interrupção
integer
Número mínimo de palavras antes que a interrupção seja permitida (0-10)
Variáveis e Esquema
object
Pares de chave-valor de variáveis personalizadas para o assistente
array
Ferramenta de Encerrar Chamada
string
Descrição da funcionalidade da ferramenta de encerramento de chamada (máximo de 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 da Chamada
boolean
Indica se as interrupções do chamador são permitidas
boolean
Indica 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
Indica se a chamada deve ser encerrada quando um correio de voz for detectado
boolean
Indica se a redução de ruído deve ser ativada
boolean
Indica se a chamada deve ser gravada
string
Quem fala primeiro na chamada. Opções: Assistente de IA, Cliente
Resposta
string
Mensagem de sucesso confirmando a criação do assistente
object
Respostas de Erro
{
"message": "Assistant created successfully",
"data": {
"id": 789,
"name": "Sales Assistant",
"status": "active",
"type": "outbound",
"mode": "pipeline"
}
}
{
"message": "Validation failed",
"errors": {
"assistant_name": [
"The assistant name field is required."
],
"webhook_url": [
"The webhook url field is required when is webhook active is true."
]
}
}
{
"message": "Assistant creation failed"
}
Observações
- Todos os campos obrigatórios devem ser fornecidos para a criação bem-sucedida do assistente.
- O assistente será criado com configurações padrão para quaisquer campos opcionais não especificados.
- A atribuição de número de telefone é opcional, mas o número deve pertencer ao usuário autenticado.
- A URL do webhook é obrigatória apenas quando is_webhook_active estiver configurado como verdadeiro.
- Os identificadores de voz e idioma devem corresponder às opções disponíveis no sistema.
⌘I

