curl --request POST \
--url https://app.agentika.site/api/v1/workflow/create/definition \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"workflow_definition": {},
"format": "<string>",
"format_version": 123,
"workflow_configurations": {
"ambient_noise_configuration": {
"enabled": false,
"volume": 0.3
},
"voice_degradation_configuration": {
"enabled": false,
"preset": "cellular",
"intensity": 1
},
"error_recovery": {
"enabled": true,
"speech_type": "text",
"text": "Извините, у меня возникли технические неполадки. Повторите, пожалуйста.",
"recording_id": 123,
"max_consecutive_errors": 3
},
"voicemail_detection": {
"mechanism": "legacy_detector",
"enabled": false,
"use_workflow_llm": true,
"provider": "<string>",
"model": "<string>",
"api_key": "<string>",
"folder_id": "<string>",
"system_prompt": "<string>",
"long_speech_timeout": 8,
"wait_greeting_end": true,
"listening_window_ms": 5000,
"human_utterance_max_ms": 5000,
"machine_utterance_cap_ms": 30000,
"classify_budget_ms": 5000,
"screening_wait_ms": 30000,
"max_screening_rearms": 1,
"voicemail_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"screening_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
}
},
"max_call_duration": 300,
"max_user_idle_timeout": 10,
"hello_attempts": 3,
"smart_turn_stop_secs": 2,
"turn_start_strategy": "min_words",
"turn_start_min_words": 2,
"turn_stop_strategy": "transcription",
"dictionary": "",
"context_compaction_enabled": false,
"browser_auto_gain_control": true
},
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
}
}
'import requests
url = "https://app.agentika.site/api/v1/workflow/create/definition"
payload = {
"name": "<string>",
"workflow_definition": {},
"format": "<string>",
"format_version": 123,
"workflow_configurations": {
"ambient_noise_configuration": {
"enabled": False,
"volume": 0.3
},
"voice_degradation_configuration": {
"enabled": False,
"preset": "cellular",
"intensity": 1
},
"error_recovery": {
"enabled": True,
"speech_type": "text",
"text": "Извините, у меня возникли технические неполадки. Повторите, пожалуйста.",
"recording_id": 123,
"max_consecutive_errors": 3
},
"voicemail_detection": {
"mechanism": "legacy_detector",
"enabled": False,
"use_workflow_llm": True,
"provider": "<string>",
"model": "<string>",
"api_key": "<string>",
"folder_id": "<string>",
"system_prompt": "<string>",
"long_speech_timeout": 8,
"wait_greeting_end": True,
"listening_window_ms": 5000,
"human_utterance_max_ms": 5000,
"machine_utterance_cap_ms": 30000,
"classify_budget_ms": 5000,
"screening_wait_ms": 30000,
"max_screening_rearms": 1,
"voicemail_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"screening_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
}
},
"max_call_duration": 300,
"max_user_idle_timeout": 10,
"hello_attempts": 3,
"smart_turn_stop_secs": 2,
"turn_start_strategy": "min_words",
"turn_start_min_words": 2,
"turn_stop_strategy": "transcription",
"dictionary": "",
"context_compaction_enabled": False,
"browser_auto_gain_control": True
},
"template_context_variables": {},
"call_disposition_codes": { "disposition_codes": [] },
"target_actions": { "actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": ["<string>"]
}
] }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
workflow_definition: {},
format: '<string>',
format_version: 123,
workflow_configurations: {
ambient_noise_configuration: {enabled: false, volume: 0.3},
voice_degradation_configuration: {enabled: false, preset: 'cellular', intensity: 1},
error_recovery: {
enabled: true,
speech_type: 'text',
text: 'Извините, у меня возникли технические неполадки. Повторите, пожалуйста.',
recording_id: 123,
max_consecutive_errors: 3
},
voicemail_detection: {
mechanism: 'legacy_detector',
enabled: false,
use_workflow_llm: true,
provider: '<string>',
model: '<string>',
api_key: '<string>',
folder_id: '<string>',
system_prompt: '<string>',
long_speech_timeout: 8,
wait_greeting_end: true,
listening_window_ms: 5000,
human_utterance_max_ms: 5000,
machine_utterance_cap_ms: 30000,
classify_budget_ms: 5000,
screening_wait_ms: 30000,
max_screening_rearms: 1,
voicemail_message: {text: '', recording_id: '<string>', recording_pk: 1},
screening_message: {text: '', recording_id: '<string>', recording_pk: 1}
},
max_call_duration: 300,
max_user_idle_timeout: 10,
hello_attempts: 3,
smart_turn_stop_secs: 2,
turn_start_strategy: 'min_words',
turn_start_min_words: 2,
turn_stop_strategy: 'transcription',
dictionary: '',
context_compaction_enabled: false,
browser_auto_gain_control: true
},
template_context_variables: {},
call_disposition_codes: {disposition_codes: []},
target_actions: {actions: [{id: '<string>', label: '<string>', function_names: ['<string>']}]}
})
};
fetch('https://app.agentika.site/api/v1/workflow/create/definition', 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.agentika.site/api/v1/workflow/create/definition",
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>',
'workflow_definition' => [
],
'format' => '<string>',
'format_version' => 123,
'workflow_configurations' => [
'ambient_noise_configuration' => [
'enabled' => false,
'volume' => 0.3
],
'voice_degradation_configuration' => [
'enabled' => false,
'preset' => 'cellular',
'intensity' => 1
],
'error_recovery' => [
'enabled' => true,
'speech_type' => 'text',
'text' => 'Извините, у меня возникли технические неполадки. Повторите, пожалуйста.',
'recording_id' => 123,
'max_consecutive_errors' => 3
],
'voicemail_detection' => [
'mechanism' => 'legacy_detector',
'enabled' => false,
'use_workflow_llm' => true,
'provider' => '<string>',
'model' => '<string>',
'api_key' => '<string>',
'folder_id' => '<string>',
'system_prompt' => '<string>',
'long_speech_timeout' => 8,
'wait_greeting_end' => true,
'listening_window_ms' => 5000,
'human_utterance_max_ms' => 5000,
'machine_utterance_cap_ms' => 30000,
'classify_budget_ms' => 5000,
'screening_wait_ms' => 30000,
'max_screening_rearms' => 1,
'voicemail_message' => [
'text' => '',
'recording_id' => '<string>',
'recording_pk' => 1
],
'screening_message' => [
'text' => '',
'recording_id' => '<string>',
'recording_pk' => 1
]
],
'max_call_duration' => 300,
'max_user_idle_timeout' => 10,
'hello_attempts' => 3,
'smart_turn_stop_secs' => 2,
'turn_start_strategy' => 'min_words',
'turn_start_min_words' => 2,
'turn_stop_strategy' => 'transcription',
'dictionary' => '',
'context_compaction_enabled' => false,
'browser_auto_gain_control' => true
],
'template_context_variables' => [
],
'call_disposition_codes' => [
'disposition_codes' => [
]
],
'target_actions' => [
'actions' => [
[
'id' => '<string>',
'label' => '<string>',
'function_names' => [
'<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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.agentika.site/api/v1/workflow/create/definition"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"workflow_definition\": {},\n \"format\": \"<string>\",\n \"format_version\": 123,\n \"workflow_configurations\": {\n \"ambient_noise_configuration\": {\n \"enabled\": false,\n \"volume\": 0.3\n },\n \"voice_degradation_configuration\": {\n \"enabled\": false,\n \"preset\": \"cellular\",\n \"intensity\": 1\n },\n \"error_recovery\": {\n \"enabled\": true,\n \"speech_type\": \"text\",\n \"text\": \"Извините, у меня возникли технические неполадки. Повторите, пожалуйста.\",\n \"recording_id\": 123,\n \"max_consecutive_errors\": 3\n },\n \"voicemail_detection\": {\n \"mechanism\": \"legacy_detector\",\n \"enabled\": false,\n \"use_workflow_llm\": true,\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"api_key\": \"<string>\",\n \"folder_id\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"long_speech_timeout\": 8,\n \"wait_greeting_end\": true,\n \"listening_window_ms\": 5000,\n \"human_utterance_max_ms\": 5000,\n \"machine_utterance_cap_ms\": 30000,\n \"classify_budget_ms\": 5000,\n \"screening_wait_ms\": 30000,\n \"max_screening_rearms\": 1,\n \"voicemail_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n },\n \"screening_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n }\n },\n \"max_call_duration\": 300,\n \"max_user_idle_timeout\": 10,\n \"hello_attempts\": 3,\n \"smart_turn_stop_secs\": 2,\n \"turn_start_strategy\": \"min_words\",\n \"turn_start_min_words\": 2,\n \"turn_stop_strategy\": \"transcription\",\n \"dictionary\": \"\",\n \"context_compaction_enabled\": false,\n \"browser_auto_gain_control\": true\n },\n \"template_context_variables\": {},\n \"call_disposition_codes\": {\n \"disposition_codes\": []\n },\n \"target_actions\": {\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"function_names\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.agentika.site/api/v1/workflow/create/definition")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"workflow_definition\": {},\n \"format\": \"<string>\",\n \"format_version\": 123,\n \"workflow_configurations\": {\n \"ambient_noise_configuration\": {\n \"enabled\": false,\n \"volume\": 0.3\n },\n \"voice_degradation_configuration\": {\n \"enabled\": false,\n \"preset\": \"cellular\",\n \"intensity\": 1\n },\n \"error_recovery\": {\n \"enabled\": true,\n \"speech_type\": \"text\",\n \"text\": \"Извините, у меня возникли технические неполадки. Повторите, пожалуйста.\",\n \"recording_id\": 123,\n \"max_consecutive_errors\": 3\n },\n \"voicemail_detection\": {\n \"mechanism\": \"legacy_detector\",\n \"enabled\": false,\n \"use_workflow_llm\": true,\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"api_key\": \"<string>\",\n \"folder_id\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"long_speech_timeout\": 8,\n \"wait_greeting_end\": true,\n \"listening_window_ms\": 5000,\n \"human_utterance_max_ms\": 5000,\n \"machine_utterance_cap_ms\": 30000,\n \"classify_budget_ms\": 5000,\n \"screening_wait_ms\": 30000,\n \"max_screening_rearms\": 1,\n \"voicemail_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n },\n \"screening_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n }\n },\n \"max_call_duration\": 300,\n \"max_user_idle_timeout\": 10,\n \"hello_attempts\": 3,\n \"smart_turn_stop_secs\": 2,\n \"turn_start_strategy\": \"min_words\",\n \"turn_start_min_words\": 2,\n \"turn_stop_strategy\": \"transcription\",\n \"dictionary\": \"\",\n \"context_compaction_enabled\": false,\n \"browser_auto_gain_control\": true\n },\n \"template_context_variables\": {},\n \"call_disposition_codes\": {\n \"disposition_codes\": []\n },\n \"target_actions\": {\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"function_names\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/workflow/create/definition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"workflow_definition\": {},\n \"format\": \"<string>\",\n \"format_version\": 123,\n \"workflow_configurations\": {\n \"ambient_noise_configuration\": {\n \"enabled\": false,\n \"volume\": 0.3\n },\n \"voice_degradation_configuration\": {\n \"enabled\": false,\n \"preset\": \"cellular\",\n \"intensity\": 1\n },\n \"error_recovery\": {\n \"enabled\": true,\n \"speech_type\": \"text\",\n \"text\": \"Извините, у меня возникли технические неполадки. Повторите, пожалуйста.\",\n \"recording_id\": 123,\n \"max_consecutive_errors\": 3\n },\n \"voicemail_detection\": {\n \"mechanism\": \"legacy_detector\",\n \"enabled\": false,\n \"use_workflow_llm\": true,\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"api_key\": \"<string>\",\n \"folder_id\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"long_speech_timeout\": 8,\n \"wait_greeting_end\": true,\n \"listening_window_ms\": 5000,\n \"human_utterance_max_ms\": 5000,\n \"machine_utterance_cap_ms\": 30000,\n \"classify_budget_ms\": 5000,\n \"screening_wait_ms\": 30000,\n \"max_screening_rearms\": 1,\n \"voicemail_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n },\n \"screening_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n }\n },\n \"max_call_duration\": 300,\n \"max_user_idle_timeout\": 10,\n \"hello_attempts\": 3,\n \"smart_turn_stop_secs\": 2,\n \"turn_start_strategy\": \"min_words\",\n \"turn_start_min_words\": 2,\n \"turn_stop_strategy\": \"transcription\",\n \"dictionary\": \"\",\n \"context_compaction_enabled\": false,\n \"browser_auto_gain_control\": true\n },\n \"template_context_variables\": {},\n \"call_disposition_codes\": {\n \"disposition_codes\": []\n },\n \"target_actions\": {\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"function_names\": [\n \"<string>\"\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"workflow_definition": {},
"current_definition_id": 123,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"total_runs": 123,
"workflow_configurations": {},
"version_number": 123,
"version_status": "<string>",
"workflow_uuid": "<string>",
"model_is_realtime": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Создать из определения
Создать голосового агента из явного определения воркфлоу
curl --request POST \
--url https://app.agentika.site/api/v1/workflow/create/definition \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"workflow_definition": {},
"format": "<string>",
"format_version": 123,
"workflow_configurations": {
"ambient_noise_configuration": {
"enabled": false,
"volume": 0.3
},
"voice_degradation_configuration": {
"enabled": false,
"preset": "cellular",
"intensity": 1
},
"error_recovery": {
"enabled": true,
"speech_type": "text",
"text": "Извините, у меня возникли технические неполадки. Повторите, пожалуйста.",
"recording_id": 123,
"max_consecutive_errors": 3
},
"voicemail_detection": {
"mechanism": "legacy_detector",
"enabled": false,
"use_workflow_llm": true,
"provider": "<string>",
"model": "<string>",
"api_key": "<string>",
"folder_id": "<string>",
"system_prompt": "<string>",
"long_speech_timeout": 8,
"wait_greeting_end": true,
"listening_window_ms": 5000,
"human_utterance_max_ms": 5000,
"machine_utterance_cap_ms": 30000,
"classify_budget_ms": 5000,
"screening_wait_ms": 30000,
"max_screening_rearms": 1,
"voicemail_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"screening_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
}
},
"max_call_duration": 300,
"max_user_idle_timeout": 10,
"hello_attempts": 3,
"smart_turn_stop_secs": 2,
"turn_start_strategy": "min_words",
"turn_start_min_words": 2,
"turn_stop_strategy": "transcription",
"dictionary": "",
"context_compaction_enabled": false,
"browser_auto_gain_control": true
},
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
}
}
'import requests
url = "https://app.agentika.site/api/v1/workflow/create/definition"
payload = {
"name": "<string>",
"workflow_definition": {},
"format": "<string>",
"format_version": 123,
"workflow_configurations": {
"ambient_noise_configuration": {
"enabled": False,
"volume": 0.3
},
"voice_degradation_configuration": {
"enabled": False,
"preset": "cellular",
"intensity": 1
},
"error_recovery": {
"enabled": True,
"speech_type": "text",
"text": "Извините, у меня возникли технические неполадки. Повторите, пожалуйста.",
"recording_id": 123,
"max_consecutive_errors": 3
},
"voicemail_detection": {
"mechanism": "legacy_detector",
"enabled": False,
"use_workflow_llm": True,
"provider": "<string>",
"model": "<string>",
"api_key": "<string>",
"folder_id": "<string>",
"system_prompt": "<string>",
"long_speech_timeout": 8,
"wait_greeting_end": True,
"listening_window_ms": 5000,
"human_utterance_max_ms": 5000,
"machine_utterance_cap_ms": 30000,
"classify_budget_ms": 5000,
"screening_wait_ms": 30000,
"max_screening_rearms": 1,
"voicemail_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"screening_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
}
},
"max_call_duration": 300,
"max_user_idle_timeout": 10,
"hello_attempts": 3,
"smart_turn_stop_secs": 2,
"turn_start_strategy": "min_words",
"turn_start_min_words": 2,
"turn_stop_strategy": "transcription",
"dictionary": "",
"context_compaction_enabled": False,
"browser_auto_gain_control": True
},
"template_context_variables": {},
"call_disposition_codes": { "disposition_codes": [] },
"target_actions": { "actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": ["<string>"]
}
] }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
workflow_definition: {},
format: '<string>',
format_version: 123,
workflow_configurations: {
ambient_noise_configuration: {enabled: false, volume: 0.3},
voice_degradation_configuration: {enabled: false, preset: 'cellular', intensity: 1},
error_recovery: {
enabled: true,
speech_type: 'text',
text: 'Извините, у меня возникли технические неполадки. Повторите, пожалуйста.',
recording_id: 123,
max_consecutive_errors: 3
},
voicemail_detection: {
mechanism: 'legacy_detector',
enabled: false,
use_workflow_llm: true,
provider: '<string>',
model: '<string>',
api_key: '<string>',
folder_id: '<string>',
system_prompt: '<string>',
long_speech_timeout: 8,
wait_greeting_end: true,
listening_window_ms: 5000,
human_utterance_max_ms: 5000,
machine_utterance_cap_ms: 30000,
classify_budget_ms: 5000,
screening_wait_ms: 30000,
max_screening_rearms: 1,
voicemail_message: {text: '', recording_id: '<string>', recording_pk: 1},
screening_message: {text: '', recording_id: '<string>', recording_pk: 1}
},
max_call_duration: 300,
max_user_idle_timeout: 10,
hello_attempts: 3,
smart_turn_stop_secs: 2,
turn_start_strategy: 'min_words',
turn_start_min_words: 2,
turn_stop_strategy: 'transcription',
dictionary: '',
context_compaction_enabled: false,
browser_auto_gain_control: true
},
template_context_variables: {},
call_disposition_codes: {disposition_codes: []},
target_actions: {actions: [{id: '<string>', label: '<string>', function_names: ['<string>']}]}
})
};
fetch('https://app.agentika.site/api/v1/workflow/create/definition', 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.agentika.site/api/v1/workflow/create/definition",
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>',
'workflow_definition' => [
],
'format' => '<string>',
'format_version' => 123,
'workflow_configurations' => [
'ambient_noise_configuration' => [
'enabled' => false,
'volume' => 0.3
],
'voice_degradation_configuration' => [
'enabled' => false,
'preset' => 'cellular',
'intensity' => 1
],
'error_recovery' => [
'enabled' => true,
'speech_type' => 'text',
'text' => 'Извините, у меня возникли технические неполадки. Повторите, пожалуйста.',
'recording_id' => 123,
'max_consecutive_errors' => 3
],
'voicemail_detection' => [
'mechanism' => 'legacy_detector',
'enabled' => false,
'use_workflow_llm' => true,
'provider' => '<string>',
'model' => '<string>',
'api_key' => '<string>',
'folder_id' => '<string>',
'system_prompt' => '<string>',
'long_speech_timeout' => 8,
'wait_greeting_end' => true,
'listening_window_ms' => 5000,
'human_utterance_max_ms' => 5000,
'machine_utterance_cap_ms' => 30000,
'classify_budget_ms' => 5000,
'screening_wait_ms' => 30000,
'max_screening_rearms' => 1,
'voicemail_message' => [
'text' => '',
'recording_id' => '<string>',
'recording_pk' => 1
],
'screening_message' => [
'text' => '',
'recording_id' => '<string>',
'recording_pk' => 1
]
],
'max_call_duration' => 300,
'max_user_idle_timeout' => 10,
'hello_attempts' => 3,
'smart_turn_stop_secs' => 2,
'turn_start_strategy' => 'min_words',
'turn_start_min_words' => 2,
'turn_stop_strategy' => 'transcription',
'dictionary' => '',
'context_compaction_enabled' => false,
'browser_auto_gain_control' => true
],
'template_context_variables' => [
],
'call_disposition_codes' => [
'disposition_codes' => [
]
],
'target_actions' => [
'actions' => [
[
'id' => '<string>',
'label' => '<string>',
'function_names' => [
'<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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.agentika.site/api/v1/workflow/create/definition"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"workflow_definition\": {},\n \"format\": \"<string>\",\n \"format_version\": 123,\n \"workflow_configurations\": {\n \"ambient_noise_configuration\": {\n \"enabled\": false,\n \"volume\": 0.3\n },\n \"voice_degradation_configuration\": {\n \"enabled\": false,\n \"preset\": \"cellular\",\n \"intensity\": 1\n },\n \"error_recovery\": {\n \"enabled\": true,\n \"speech_type\": \"text\",\n \"text\": \"Извините, у меня возникли технические неполадки. Повторите, пожалуйста.\",\n \"recording_id\": 123,\n \"max_consecutive_errors\": 3\n },\n \"voicemail_detection\": {\n \"mechanism\": \"legacy_detector\",\n \"enabled\": false,\n \"use_workflow_llm\": true,\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"api_key\": \"<string>\",\n \"folder_id\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"long_speech_timeout\": 8,\n \"wait_greeting_end\": true,\n \"listening_window_ms\": 5000,\n \"human_utterance_max_ms\": 5000,\n \"machine_utterance_cap_ms\": 30000,\n \"classify_budget_ms\": 5000,\n \"screening_wait_ms\": 30000,\n \"max_screening_rearms\": 1,\n \"voicemail_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n },\n \"screening_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n }\n },\n \"max_call_duration\": 300,\n \"max_user_idle_timeout\": 10,\n \"hello_attempts\": 3,\n \"smart_turn_stop_secs\": 2,\n \"turn_start_strategy\": \"min_words\",\n \"turn_start_min_words\": 2,\n \"turn_stop_strategy\": \"transcription\",\n \"dictionary\": \"\",\n \"context_compaction_enabled\": false,\n \"browser_auto_gain_control\": true\n },\n \"template_context_variables\": {},\n \"call_disposition_codes\": {\n \"disposition_codes\": []\n },\n \"target_actions\": {\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"function_names\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.agentika.site/api/v1/workflow/create/definition")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"workflow_definition\": {},\n \"format\": \"<string>\",\n \"format_version\": 123,\n \"workflow_configurations\": {\n \"ambient_noise_configuration\": {\n \"enabled\": false,\n \"volume\": 0.3\n },\n \"voice_degradation_configuration\": {\n \"enabled\": false,\n \"preset\": \"cellular\",\n \"intensity\": 1\n },\n \"error_recovery\": {\n \"enabled\": true,\n \"speech_type\": \"text\",\n \"text\": \"Извините, у меня возникли технические неполадки. Повторите, пожалуйста.\",\n \"recording_id\": 123,\n \"max_consecutive_errors\": 3\n },\n \"voicemail_detection\": {\n \"mechanism\": \"legacy_detector\",\n \"enabled\": false,\n \"use_workflow_llm\": true,\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"api_key\": \"<string>\",\n \"folder_id\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"long_speech_timeout\": 8,\n \"wait_greeting_end\": true,\n \"listening_window_ms\": 5000,\n \"human_utterance_max_ms\": 5000,\n \"machine_utterance_cap_ms\": 30000,\n \"classify_budget_ms\": 5000,\n \"screening_wait_ms\": 30000,\n \"max_screening_rearms\": 1,\n \"voicemail_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n },\n \"screening_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n }\n },\n \"max_call_duration\": 300,\n \"max_user_idle_timeout\": 10,\n \"hello_attempts\": 3,\n \"smart_turn_stop_secs\": 2,\n \"turn_start_strategy\": \"min_words\",\n \"turn_start_min_words\": 2,\n \"turn_stop_strategy\": \"transcription\",\n \"dictionary\": \"\",\n \"context_compaction_enabled\": false,\n \"browser_auto_gain_control\": true\n },\n \"template_context_variables\": {},\n \"call_disposition_codes\": {\n \"disposition_codes\": []\n },\n \"target_actions\": {\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"function_names\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/workflow/create/definition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"workflow_definition\": {},\n \"format\": \"<string>\",\n \"format_version\": 123,\n \"workflow_configurations\": {\n \"ambient_noise_configuration\": {\n \"enabled\": false,\n \"volume\": 0.3\n },\n \"voice_degradation_configuration\": {\n \"enabled\": false,\n \"preset\": \"cellular\",\n \"intensity\": 1\n },\n \"error_recovery\": {\n \"enabled\": true,\n \"speech_type\": \"text\",\n \"text\": \"Извините, у меня возникли технические неполадки. Повторите, пожалуйста.\",\n \"recording_id\": 123,\n \"max_consecutive_errors\": 3\n },\n \"voicemail_detection\": {\n \"mechanism\": \"legacy_detector\",\n \"enabled\": false,\n \"use_workflow_llm\": true,\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"api_key\": \"<string>\",\n \"folder_id\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"long_speech_timeout\": 8,\n \"wait_greeting_end\": true,\n \"listening_window_ms\": 5000,\n \"human_utterance_max_ms\": 5000,\n \"machine_utterance_cap_ms\": 30000,\n \"classify_budget_ms\": 5000,\n \"screening_wait_ms\": 30000,\n \"max_screening_rearms\": 1,\n \"voicemail_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n },\n \"screening_message\": {\n \"text\": \"\",\n \"recording_id\": \"<string>\",\n \"recording_pk\": 1\n }\n },\n \"max_call_duration\": 300,\n \"max_user_idle_timeout\": 10,\n \"hello_attempts\": 3,\n \"smart_turn_stop_secs\": 2,\n \"turn_start_strategy\": \"min_words\",\n \"turn_start_min_words\": 2,\n \"turn_stop_strategy\": \"transcription\",\n \"dictionary\": \"\",\n \"context_compaction_enabled\": false,\n \"browser_auto_gain_control\": true\n },\n \"template_context_variables\": {},\n \"call_disposition_codes\": {\n \"disposition_codes\": []\n },\n \"target_actions\": {\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"function_names\": [\n \"<string>\"\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"workflow_definition": {},
"current_definition_id": 123,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"total_runs": 123,
"workflow_configurations": {},
"version_number": 123,
"version_status": "<string>",
"workflow_uuid": "<string>",
"model_is_realtime": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}workflow_definition содержит nodes (шаги разговора) и edges (переходы между шагами). Структура полей показана в схеме запроса на этой странице. Для ручной работы в панели используйте редактор сценария.Body
Create a workflow from a definition.
The legacy body is {name, workflow_definition}. Every other field is
optional (Ф7, ADR agent-creation-wizard-functionality §10.2): a
PortableAgentDocument from GET /workflow/{id}/export can be posted
as is — its format/format_version header is validated and
unknown keys (exported_at, stripped_refs, …) are ignored.
Response
Successful Response
Whether the effective model of the returned workflow_configurations (draft if any, else published) is realtime — the runtime's resolution: the workflow's model_configuration_v2_override, else the organization's configuration with legacy model_overrides. A realtime model does not support conversation_start_policy wait_client / wait_then_greeting (saving that combination is 422 start_policy_unsupported_for_realtime). null: not computed by this endpoint, or the model configuration does not resolve.