Актуализиране на асистент
curl --request PUT \
--url https://call.aiployees.com/api/user/assistant/{id} \
--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>",
"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://call.aiployees.com/api/user/assistant/{id}"
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>",
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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>',
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://call.aiployees.com/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://call.aiployees.com/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([
'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>',
'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://call.aiployees.com/api/user/assistant/{id}"
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 \"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("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://call.aiployees.com/api/user/assistant/{id}")
.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 \"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://call.aiployees.com/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 \"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 \"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": "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."],
"voice_id": ["The selected voice is not compatible with the chosen engine type."],
"allow_interruptions": ["Interruptions cannot be disabled in multimodal or dualplex mode."]
}
}
Асистенти
Актуализиране на асистент
Актуализиране на конфигурацията на съществуващ AI асистент
PUT
/
user
/
assistant
/
{id}
Актуализиране на асистент
curl --request PUT \
--url https://call.aiployees.com/api/user/assistant/{id} \
--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>",
"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://call.aiployees.com/api/user/assistant/{id}"
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>",
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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>',
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://call.aiployees.com/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://call.aiployees.com/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([
'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>',
'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://call.aiployees.com/api/user/assistant/{id}"
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 \"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("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://call.aiployees.com/api/user/assistant/{id}")
.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 \"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://call.aiployees.com/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 \"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 \"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": "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."],
"voice_id": ["The selected voice is not compatible with the chosen engine type."],
"allow_interruptions": ["Interruptions cannot be disabled in multimodal or dualplex mode."]
}
}
Този endpoint ви позволява да актуализирате конфигурацията на съществуващ AI асистент. Всички полета са опционални - предоставете само полетата, които искате да актуализирате.
Параметри в пътя
integer
required
Уникалният идентификатор на асистента за актуализиране
Тяло на заявката
Основни полета
string
Името на асистента (максимум 255 символа)
integer
ID на гласа за използване от асистента. Използвайте endpoint-а Get Voices с параметъра
mode, за да получите съвместими гласове за вашия режим на двигателя.integer
ID на езика за асистента. Използвайте endpoint-а Get Languages, за да получите наличните езици.
string
Типът на асистента. Опции:
inbound, outboundstring
Режимът на двигателя. Опции:
pipeline, multimodal, dualplexПромяната на режима ще нулира настройките, специфични за режима, към настройките по подразбиране за новия режим.
string
Часовата зона за асистента (напр. “Europe/Bucharest”, “America/New_York”)
string
Първоначалното съобщение, което асистентът ще произнесе, когато разговорът започне (максимум 200 символа)
string
Системният prompt, който дефинира поведението и личността на асистента
Полета, специфични за режима
integer
ID на LLM модела за използване. Приложимо само за режим
pipeline.Използвайте endpoint-а Get Models, за да получите наличните модели.integer
ID на multimodal модела. Приложимо само за режими
multimodal и dualplex.Използвайте endpoint-а Get Models, за да получите наличните multimodal модели.integer
Резервен LLM модел ID за извиквания на инструменти в multimodal/dualplex режими. Задайте
null за премахване.number
Чувствителност за разпознаване на реда за multimodal/dualplex режими (0-1). Задайте
null за автоматично.Вторични езици
integer[]
Масив от допълнителни ID на езици, на които асистентът може да говори. Заменя съществуващите вторични езици. Подайте празен масив
[] за премахване на всички вторични езици."secondary_language_ids": [2, 3, 4]
Настройки за knowledgebase
integer
ID на knowledgebase за прикачване. Задайте
null за премахване на knowledgebase.string
Как да се използва knowledgebase. Опции:
function_call- AI извиква функция за търсене (необходимо за multimodal/dualplex)prompt- Знанията се инжектират в prompt-а (само pipeline)
Телефонен номер
integer
ID на телефонен номер за назначаване. Задайте
null за отмяна на назначението. Трябва да принадлежи на вашия профил.За
inbound асистенти телефонният номер не може да бъде от тип Caller ID и не може да бъде вече назначен към друг inbound асистент.Персонализирани инструменти по време на разговор
integer[]
Масив от ID на персонализирани инструменти за синхронизиране по време на разговор. Заменя всички съществуващи назначения на инструменти. Подайте празен масив
[] за премахване на всички инструменти. Всеки инструмент трябва да принадлежи на вашия профил."tool_ids": [1, 5, 12]
Вградени инструменти
array
Масив от вградени инструменти. Заменя всички съществуващи вградени инструменти. Подайте празен масив
[] за премахване на всички инструменти.Show Типове инструменти
Show Типове инструменти
call_transfer - Прехвърляне на разговора към друг телефонен номер
phone_number(задължително): Телефонен номер за прехвърлянеdescription: Кога да се прехвърли разговорътcustom: Ако е true, AI може да определи номера за прехвърляне динамичноtimezone: Часова зона за наличност на прехвърлянеwarm_transfer: Изпрати съобщение до клиента преди прехвърляне (по подразбиране:false)warm_transfer_message: Prompt, който казва на AI какво да каже преди прехвърляне (напр. “Кажете на клиента, че разговорът се прехвърля.”)
supervisor_phone(задължително): Телефонен номер за набиране при топло прехвърляне (напр. “+14155552001”). Акоcustom_sipе активирано, това е SIP адрес или вътрешен номер.outbound_phone_id(задължително): ID на телефонния номер, използван за набиране на супервайзора.description(задължително): Кога да се прехвърли — описва кога AI трябва да започне топло прехвърляне (напр. “Прехвърли разговора към човешки супервайзор, когато клиентът поиска да говори с истински човек.”)custom_sip: Активиране за въвеждане на персонализиран SIP адрес или вътрешен номер вместо телефонен номер (по подразбиране:false)caller_id_mode: Какъв телефонен номер вижда супервайзорът при получаване на обаждането. Опции:outbound_number(по подразбиране — показва изходящия телефонен номер),customer_number(показва номера на обаждащия се),custom(показва персонализиран номер)custom_caller_id: Персонализиран телефонен номер, показван на супервайзора. Използва се само когатоcaller_id_modeеcustom.hold_music: Аудио, възпроизвеждано на обаждащия се, докато чака. Опции:hold_music(по подразбиране — възпроизвежда музика по подразбиране за чакане),none(тишина, без музика)hold_music_volume: Ниво на звука за музиката при чакане, 0-100 (по подразбиране:80)hold_message: Съобщение, произнесено на обаждащия се преди да бъде поставен на изчакване (по подразбиране: “Моля, изчакайте, докато ви свържа със супервайзор.”)summary_instructions: Инструкции за това как AI трябва да инструктира супервайзора относно разговора (по подразбиране: “Представете разговора от ваша гледна точка:\n- КОЙ обажда се (име, фирма ако е споменато)\n- ЗАЩО се обадиха (тяхната цел или проблем)\n- ЗАЩО е нужен човек в този момент\n\nБъдете кратки (2-3 изречения).”)briefing_initial_message: Първото съобщение, което AI казва на супервайзора, когато той отговори (по подразбиране: “Здравейте! Имам обаждащ се, който се нуждае от вашата помощ. Мога ли да ви запозная със ситуацията?”)connected_message: Съобщение, произнесено на обаждащия се след свързване със супервайзора (по подразбиране: “Вече сте свързани със супервайзор. Ще ви оставя да си говорите.”)
description: Кога AI трябва да приключи разговора
description: Кога да се използва DTMF въвеждане (за навигация в IVR)
timeout: Секунди за чакане на въвеждане, 1-30 (по подразбиране: 5)stop_key: Клавиш, който приключва въвеждането. Опции:#(по подразбиране),*
calcom_api_key(задължително): Вашият Cal.com API ключcalcom_event_slug(задължително): Slug на типа събитие от Cal.comcalcom_team_slug: Team slug, ако събитието принадлежи на Cal.com екипcalcom_endpoint: Cal.com API регион. Опции:us(по подразбиране —https://api.cal.com),eu(https://api.cal.eu),custom(използваcalcom_custom_endpoint)calcom_custom_endpoint: Персонализиран Cal.com API базов URL. Използва се само когатоcalcom_endpointеcustom(напр.https://my-calcom-instance.com).calcom_booking_fields: Масив от персонализирани полета за резервация за събитието. Всяко поле има:slug(задължително): Идентификатор на полетоtype(задължително): Тип на полето (напр. “text”, “email”, “phone”, “select”)label(задължително): Етикет за показванеrequired: Дали полето е задължително (по подразбиране:false)options: Масив от опции за select полета
description: Кога да се предлага планиране
"tools": [
{
"type": "dtmf_input",
"description": "Navigate IVR when needed"
},
{
"type": "warm_call_transfer",
"supervisor_phone": "+1234567890",
"outbound_phone_id": 7,
"description": "Transfer the call to a human supervisor when the customer requests to speak with a real person.",
"custom_sip": false,
"caller_id_mode": "outbound_number",
"hold_music": "hold_music",
"hold_music_volume": 80,
"hold_message": "Please hold while I connect you with a supervisor.",
"summary_instructions": "Introduce the conversation from your perspective:\n- WHO is calling (name, company if mentioned)\n- WHY they called (their goal or problem)\n- WHY a human is needed at this point\n\nKeep it brief (2-3 sentences).",
"briefing_initial_message": "Hello! I have a caller on the line who needs your assistance. May I brief you on the situation?",
"connected_message": "You are now connected with a supervisor. I'll leave you to it."
},
{
"type": "collect_keypad",
"timeout": 5,
"stop_key": "#"
},
{
"type": "end_call",
"description": "End call when done"
}
]
Настройки за глас и TTS
boolean
Дали да се активира емоционална text-to-speech синтеза
number
Настройка за стабилност на гласа (0-1). По-високо = по-последователен глас
number
Настройка за приличност на гласа (0-1). По-високо = по-близо до оригиналния глас
number
Множител за скорост на говора (0.7-1.2)
number
Настройка за LLM температура (0-1). По-ниско = по-детерминистично
integer
ID на персонализиран TTS доставчик. Задайте
null, за да използвате езиковия по подразбиране. Използвайте endpoint-а Get Synthesizer Providers, за да откриете наличните доставчици.integer
ID на персонализиран STT доставчик. Само за Pipeline режим. Задайте
null, за да използвате езиковия по подразбиране. Използвайте endpoint-а Get Transcriber Providers, за да откриете наличните доставчици.Настройки за поведение при разговор
boolean
Дали да се позволят прекъсвания от обаждащия се.
Не може да се деактивира за режими
multimodal и dualplex.boolean
Дали да се използва filler аудио по време на обработка.
Налично само за режим
pipeline.object
Персонализирани профили за filler думи по категория. Заменя съществуващата filler конфигурация. Всяка категория е масив от кратки фрази.
positive: Filler думи за позитивни/утвърдителни отговориnegative: Filler думи за негативни/неутрални отговориquestion: Filler думи при обработване на въпросneutral: Filler думи за неутрални потвърждения
"filler_config": {
"positive": ["Great!", "Perfect!"],
"negative": ["Hmm.", "I see."],
"question": ["Good question.", "Let me check."],
"neutral": ["Ok.", "Noted."]
}
boolean
Дали да се записва разговорът
boolean
Дали да се активира потискане на шума
boolean
Ако е true, асистентът чака клиентът първо да заговори
Настройки за време
integer
Максимална продължителност на разговора в секунди (20-1200)
integer
Максимална продължителност на тишината преди повторно ангажиране в секунди (1-360)
integer
Максимална тишина в началото на разговора преди приключване (1-120 секунди). Задайте
null за деактивиране.integer
Максимално време за звънене преди отказване (1-60 секунди)
Настройки за повторно ангажиране
integer
Интервал за повторно ангажиране в секунди (7-600)
string
Персонализиран prompt за съобщения за повторно ангажиране (максимум 1000 символа). Задайте
null, за да използвате по подразбиране.Настройки за гласова поща
boolean
Дали да се приключи разговорът, когато се открие гласова поща
string
Съобщение за оставяне в гласовата поща преди затваряне (максимум 1000 символа). Задайте
null за деактивиране.Разпознаване на край
string
Тип разпознаване на гласова активност. Опции:
vad, ainumber
Ниво на чувствителност за край (0-5)
number
Ниво на чувствителност за прекъсване (0-5)
integer
Минимален брой думи преди разрешаване на прекъсване (0-10). Задайте
null за деактивиране.Фонов звук
string
Фонов звук. Опции:
off, office, city, forest, crowded_room, cafe, naturenumber
Ниво на звука на фоновия звук (0-1)
Конфигурация за webhook
boolean
Дали webhook нотификациите са активирани
string
URL на webhook за нотификации след разговор. Задайте
null за премахване.boolean
Дали да се изпращат webhook-и само при завършени разговори (не неуспешни/без отговор)
boolean
Дали да се включи URL за записа в webhook payload-а
Оценка след разговор
boolean
Дали да се активира AI оценка след разговор
array
Схема за дефиниция за извличане на данни след разговор. Заменя съществуващата схема.
Променливи
object
Ключ-стойност двойки от персонализирани променливи. Заменя всички съществуващи променливи.
"variables": {
"company_name": "Acme Corp",
"product": "Premium Widget"
}
Настройки за приключен разговор
integer
Минути на неактивност в чата преди разговорът да се счита за приключен (1-1440). Задайте
null за деактивиране. По подразбиране: 30boolean
Дали да се позволи повторно задействане на разговора след приключване поради неактивност
string
URL на webhook, извикван когато чат разговорът приключи поради неактивност. Задайте
null за премахване. Отделно от основния разговорен webhook.Примерни заявки
Актуализиране на основни настройки
{
"name": "Актуализирано име на асистент",
"initial_message": "Здравейте! Как мога да ви помогна?",
"max_duration": 900
}
Превключване към Multimodal режим
{
"mode": "multimodal",
"voice_id": 41,
"multimodal_model_id": 1,
"chat_llm_fallback_id": 2,
"knowledgebase_mode": "function_call"
}
Актуализиране на инструменти и knowledgebase
{
"tool_ids": [1, 5, 12],
"knowledgebase_id": 3,
"knowledgebase_mode": "prompt"
}
Актуализиране на повторно ангажиране и гласова поща
{
"reengagement_interval": 15,
"reengagement_prompt": "Все още ли сте там? Тук съм, за да помогна.",
"end_call_on_voicemail": true,
"voice_mail_message": "Здравейте, моля, обадете ни се отново, когато ви е удобно."
}
Премахване на опционални настройки
{
"phone_number_id": null,
"webhook_url": null,
"tool_ids": [],
"secondary_language_ids": []
}
Отговор
string
Съобщение за успех, потвърждаващо актуализацията на асистента
object
{
"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."],
"voice_id": ["The selected voice is not compatible with the chosen engine type."],
"allow_interruptions": ["Interruptions cannot be disabled in multimodal or dualplex mode."]
}
}
Бележки
- Само полетата, които предоставите в тялото на заявката, ще бъдат актуализирани
- За премахване на опционални полета, изрично ги задайте на
null - За изчистване на масиви (инструменти, вторични езици), подайте празен масив
[] - Асистентът трябва да принадлежи на удостоверения потребител
- Използвайте Get Voices endpoint с параметър
modeза получаване на съвместими гласове - За multimodal/dualplex режими,
knowledgebase_modeтрябва да бъдеfunction_call - За multimodal/dualplex режими,
allow_interruptionsне може да се деактивира - Промяната на режима нулира настройките, специфични за режима (LLM модел, multimodal модел, доставчици)

