Agents
Update Agent Version
Update a specific version of an agent.
PUT
/
core
/
agents
/
{id}
/
versions
/
{version}
Update Agent Version
curl --request PUT \
--url https://api.anyreach.ai/core/agents/{id}/versions/{version} \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"config": {
"agent": {
"starting_message": {
"type": "user_initiates",
"action_grid": {
"title": "<string>",
"items": [
{
"label": "<string>",
"icon": "<string>"
}
]
}
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"actions": [
{
"message": "<string>",
"type": "play_message",
"generate": false,
"wait_for_playout": true,
"allow_interruptions": true,
"condition": "<string>"
}
],
"properties": {},
"required": [
"<string>"
],
"actions_on_error": [
{
"message": "<string>",
"type": "play_message",
"generate": false,
"wait_for_playout": true,
"allow_interruptions": true,
"condition": "<string>"
}
],
"output": "<string>"
}
],
"stack": {
"turn_detection": {
"models": [
{
"model": {
"name": "english"
},
"provider": "livekit"
}
]
},
"stt": {
"models": [
{
"model": {
"name": "nova-2-general",
"parameters": {
"keywords": [
{
"keyword": "<string>",
"intensifier": 123
}
]
}
},
"provider": "deepgram"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_stt": 1,
"retry_interval": 1
}
},
"llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_llm": 1,
"retry_interval": 1
}
},
"tts": {
"models": [
{
"model": {
"parameters": {
"voice": "<string>",
"language": "en",
"speed": 1,
"volume": 1
},
"name": "sonic-3"
},
"provider": "cartesia"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_tts": 1,
"retry_interval": 1
},
"pronunciations": {}
},
"type": "stt_llm_tts",
"vad": {
"models": [
{
"model": {
"name": "default"
},
"provider": "silero"
}
]
},
"vision_llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"frame_rate": 1
},
"interruption": {
"mode": "adaptive",
"enabled": true,
"min_duration": 123,
"min_words": 123,
"false_interruption_timeout": 2,
"resume_false_interruption": true
},
"endpointing": {
"min_delay": 0.05,
"max_delay": 1.5
},
"text_normalization": {
"enabled": false,
"price_verbosity": "formal",
"shorthand_cents_extra": [
123
]
}
},
"type": "static_prompt",
"instructions": "",
"built_in_tools": {
"time_tool": {
"default_timezone": "<string>"
},
"widgets": {
"allowed": []
},
"forms": {
"forms": [
{
"id": "<string>",
"name": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"placeholder": "<string>",
"required": false,
"default_value": "<unknown>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"allow_other": true,
"true_label": "<string>",
"false_label": "<string>",
"max_rating": 123,
"validation": "<string>",
"validation_message": "<string>"
}
],
"description": "<string>",
"title": "<string>",
"submit_label": "Submit"
}
]
},
"web_search": {},
"retrieve_webpage": {},
"continue_on_phone": {
"agent_id": "<string>",
"version": 123,
"agent_number": "<string>"
},
"images": {
"routes": [
{
"image_type": "<string>",
"description": "<string>",
"fields_schema": {},
"tier": "<string>"
}
],
"default_tier": "fast",
"tiers": {
"fast": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
},
"frontier": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
},
"max_escalations_per_conversation": 3,
"max_analyses_per_conversation": 20,
"allow_user_uploads": true,
"floor_overrides": {},
"pii_fields": [
"<string>"
],
"on_blocked": "refuse"
}
},
"language": {
"languages": [
"<string>"
]
},
"allow_interruptions": true,
"video_input": false,
"screen_share_input": false,
"max_tool_steps": 2,
"channel_overrides": {},
"channel_properties": {}
},
"version": "1",
"metadata": {},
"noise_cancellation": {
"models": [
{
"model": {
"name": "bvc"
},
"provider": "livekit"
}
]
},
"custom_recording_locations": [
{
"bucket": "<string>",
"region": "<string>",
"access_key": "<string>",
"secret_access_key": "<string>",
"provider": "s3",
"file_type": "ogg"
}
],
"pre_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": false
},
"post_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": false
},
"scorecard_ids": [
"<string>"
],
"voicemail_detection": {
"beep_detection_threshold": 0.5,
"beep_detection_timeout": 123,
"tool_call_overrides": {
"beep_detection_threshold": 0.9,
"beep_detection_timeout": 10,
"name": "voicemail_detected",
"description": "whenever you hear 'you have reached a voicemail'"
},
"play_message": {
"message": "<string>",
"generate": false
}
},
"inactivity_nudge": {
"timeout_seconds": 30,
"nudge_interval_seconds": 15,
"nudges": [
{
"text": "<string>",
"type": "bot_initiates_static"
}
]
}
},
"instruction_builder_inputs": {
"industry": "<string>",
"purpose": "<string>",
"personality": [
"<string>"
],
"conversation_flow": "<string>",
"guardrails": "<string>",
"disallowed_topics": "<string>",
"safety_rules": [
"<string>"
],
"enrichment_data": {}
}
}
EOFimport requests
url = "https://api.anyreach.ai/core/agents/{id}/versions/{version}"
payload = {
"config": {
"agent": {
"starting_message": {
"type": "user_initiates",
"action_grid": {
"title": "<string>",
"items": [
{
"label": "<string>",
"icon": "<string>"
}
]
}
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"actions": [
{
"message": "<string>",
"type": "play_message",
"generate": False,
"wait_for_playout": True,
"allow_interruptions": True,
"condition": "<string>"
}
],
"properties": {},
"required": ["<string>"],
"actions_on_error": [
{
"message": "<string>",
"type": "play_message",
"generate": False,
"wait_for_playout": True,
"allow_interruptions": True,
"condition": "<string>"
}
],
"output": "<string>"
}
],
"stack": {
"turn_detection": { "models": [
{
"model": { "name": "english" },
"provider": "livekit"
}
] },
"stt": {
"models": [
{
"model": {
"name": "nova-2-general",
"parameters": { "keywords": [
{
"keyword": "<string>",
"intensifier": 123
}
] }
},
"provider": "deepgram"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_stt": 1,
"retry_interval": 1
}
},
"llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_llm": 1,
"retry_interval": 1
}
},
"tts": {
"models": [
{
"model": {
"parameters": {
"voice": "<string>",
"language": "en",
"speed": 1,
"volume": 1
},
"name": "sonic-3"
},
"provider": "cartesia"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_tts": 1,
"retry_interval": 1
},
"pronunciations": {}
},
"type": "stt_llm_tts",
"vad": { "models": [
{
"model": { "name": "default" },
"provider": "silero"
}
] },
"vision_llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"frame_rate": 1
},
"interruption": {
"mode": "adaptive",
"enabled": True,
"min_duration": 123,
"min_words": 123,
"false_interruption_timeout": 2,
"resume_false_interruption": True
},
"endpointing": {
"min_delay": 0.05,
"max_delay": 1.5
},
"text_normalization": {
"enabled": False,
"price_verbosity": "formal",
"shorthand_cents_extra": [123]
}
},
"type": "static_prompt",
"instructions": "",
"built_in_tools": {
"time_tool": { "default_timezone": "<string>" },
"widgets": { "allowed": [] },
"forms": { "forms": [
{
"id": "<string>",
"name": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"placeholder": "<string>",
"required": False,
"default_value": "<unknown>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"allow_other": True,
"true_label": "<string>",
"false_label": "<string>",
"max_rating": 123,
"validation": "<string>",
"validation_message": "<string>"
}
],
"description": "<string>",
"title": "<string>",
"submit_label": "Submit"
}
] },
"web_search": {},
"retrieve_webpage": {},
"continue_on_phone": {
"agent_id": "<string>",
"version": 123,
"agent_number": "<string>"
},
"images": {
"routes": [
{
"image_type": "<string>",
"description": "<string>",
"fields_schema": {},
"tier": "<string>"
}
],
"default_tier": "fast",
"tiers": {
"fast": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
},
"frontier": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
},
"max_escalations_per_conversation": 3,
"max_analyses_per_conversation": 20,
"allow_user_uploads": True,
"floor_overrides": {},
"pii_fields": ["<string>"],
"on_blocked": "refuse"
}
},
"language": { "languages": ["<string>"] },
"allow_interruptions": True,
"video_input": False,
"screen_share_input": False,
"max_tool_steps": 2,
"channel_overrides": {},
"channel_properties": {}
},
"version": "1",
"metadata": {},
"noise_cancellation": { "models": [
{
"model": { "name": "bvc" },
"provider": "livekit"
}
] },
"custom_recording_locations": [
{
"bucket": "<string>",
"region": "<string>",
"access_key": "<string>",
"secret_access_key": "<string>",
"provider": "s3",
"file_type": "ogg"
}
],
"pre_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": False
},
"post_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": False
},
"scorecard_ids": ["<string>"],
"voicemail_detection": {
"beep_detection_threshold": 0.5,
"beep_detection_timeout": 123,
"tool_call_overrides": {
"beep_detection_threshold": 0.9,
"beep_detection_timeout": 10,
"name": "voicemail_detected",
"description": "whenever you hear 'you have reached a voicemail'"
},
"play_message": {
"message": "<string>",
"generate": False
}
},
"inactivity_nudge": {
"timeout_seconds": 30,
"nudge_interval_seconds": 15,
"nudges": [
{
"text": "<string>",
"type": "bot_initiates_static"
}
]
}
},
"instruction_builder_inputs": {
"industry": "<string>",
"purpose": "<string>",
"personality": ["<string>"],
"conversation_flow": "<string>",
"guardrails": "<string>",
"disallowed_topics": "<string>",
"safety_rules": ["<string>"],
"enrichment_data": {}
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
agent: {
starting_message: {
type: 'user_initiates',
action_grid: {title: '<string>', items: [{label: '<string>', icon: '<string>'}]}
},
tools: [
{
name: '<string>',
description: '<string>',
actions: [
{
message: '<string>',
type: 'play_message',
generate: false,
wait_for_playout: true,
allow_interruptions: true,
condition: '<string>'
}
],
properties: {},
required: ['<string>'],
actions_on_error: [
{
message: '<string>',
type: 'play_message',
generate: false,
wait_for_playout: true,
allow_interruptions: true,
condition: '<string>'
}
],
output: '<string>'
}
],
stack: {
turn_detection: {models: [{model: {name: 'english'}, provider: 'livekit'}]},
stt: {
models: [
{
model: {
name: 'nova-2-general',
parameters: {keywords: [{keyword: '<string>', intensifier: 123}]}
},
provider: 'deepgram'
}
],
on_failure: {attempt_timeout: 1, max_retry_per_stt: 1, retry_interval: 1}
},
llm: {
models: [
{
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
}
],
on_failure: {attempt_timeout: 1, max_retry_per_llm: 1, retry_interval: 1}
},
tts: {
models: [
{
model: {
parameters: {voice: '<string>', language: 'en', speed: 1, volume: 1},
name: 'sonic-3'
},
provider: 'cartesia'
}
],
on_failure: {attempt_timeout: 1, max_retry_per_tts: 1, retry_interval: 1},
pronunciations: {}
},
type: 'stt_llm_tts',
vad: {models: [{model: {name: 'default'}, provider: 'silero'}]},
vision_llm: {
models: [
{
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
}
],
frame_rate: 1
},
interruption: {
mode: 'adaptive',
enabled: true,
min_duration: 123,
min_words: 123,
false_interruption_timeout: 2,
resume_false_interruption: true
},
endpointing: {min_delay: 0.05, max_delay: 1.5},
text_normalization: {enabled: false, price_verbosity: 'formal', shorthand_cents_extra: [123]}
},
type: 'static_prompt',
instructions: '',
built_in_tools: {
time_tool: {default_timezone: '<string>'},
widgets: {allowed: []},
forms: {
forms: [
{
id: '<string>',
name: '<string>',
fields: [
{
id: '<string>',
label: '<string>',
placeholder: '<string>',
required: false,
default_value: '<unknown>',
options: [{label: '<string>', value: '<string>'}],
allow_other: true,
true_label: '<string>',
false_label: '<string>',
max_rating: 123,
validation: '<string>',
validation_message: '<string>'
}
],
description: '<string>',
title: '<string>',
submit_label: 'Submit'
}
]
},
web_search: {},
retrieve_webpage: {},
continue_on_phone: {agent_id: '<string>', version: 123, agent_number: '<string>'},
images: {
routes: [
{
image_type: '<string>',
description: '<string>',
fields_schema: {},
tier: '<string>'
}
],
default_tier: 'fast',
tiers: {
fast: {
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
},
frontier: {
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
}
},
max_escalations_per_conversation: 3,
max_analyses_per_conversation: 20,
allow_user_uploads: true,
floor_overrides: {},
pii_fields: ['<string>'],
on_blocked: 'refuse'
}
},
language: {languages: ['<string>']},
allow_interruptions: true,
video_input: false,
screen_share_input: false,
max_tool_steps: 2,
channel_overrides: {},
channel_properties: {}
},
version: '1',
metadata: {},
noise_cancellation: {models: [{model: {name: 'bvc'}, provider: 'livekit'}]},
custom_recording_locations: [
{
bucket: '<string>',
region: '<string>',
access_key: '<string>',
secret_access_key: '<string>',
provider: 's3',
file_type: 'ogg'
}
],
pre_conversation_workflow: {
type: 'workflow',
workflow_id: '<string>',
workflow_version: 123,
initial_step: '<string>',
definition: {},
condition: '<string>',
reject_on_error: false
},
post_conversation_workflow: {
type: 'workflow',
workflow_id: '<string>',
workflow_version: 123,
initial_step: '<string>',
definition: {},
condition: '<string>',
reject_on_error: false
},
scorecard_ids: ['<string>'],
voicemail_detection: {
beep_detection_threshold: 0.5,
beep_detection_timeout: 123,
tool_call_overrides: {
beep_detection_threshold: 0.9,
beep_detection_timeout: 10,
name: 'voicemail_detected',
description: 'whenever you hear \'you have reached a voicemail\''
},
play_message: {message: '<string>', generate: false}
},
inactivity_nudge: {
timeout_seconds: 30,
nudge_interval_seconds: 15,
nudges: [{text: '<string>', type: 'bot_initiates_static'}]
}
},
instruction_builder_inputs: {
industry: '<string>',
purpose: '<string>',
personality: ['<string>'],
conversation_flow: '<string>',
guardrails: '<string>',
disallowed_topics: '<string>',
safety_rules: ['<string>'],
enrichment_data: {}
}
})
};
fetch('https://api.anyreach.ai/core/agents/{id}/versions/{version}', 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://api.anyreach.ai/core/agents/{id}/versions/{version}",
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([
'config' => [
'agent' => [
'starting_message' => [
'type' => 'user_initiates',
'action_grid' => [
'title' => '<string>',
'items' => [
[
'label' => '<string>',
'icon' => '<string>'
]
]
]
],
'tools' => [
[
'name' => '<string>',
'description' => '<string>',
'actions' => [
[
'message' => '<string>',
'type' => 'play_message',
'generate' => false,
'wait_for_playout' => true,
'allow_interruptions' => true,
'condition' => '<string>'
]
],
'properties' => [
],
'required' => [
'<string>'
],
'actions_on_error' => [
[
'message' => '<string>',
'type' => 'play_message',
'generate' => false,
'wait_for_playout' => true,
'allow_interruptions' => true,
'condition' => '<string>'
]
],
'output' => '<string>'
]
],
'stack' => [
'turn_detection' => [
'models' => [
[
'model' => [
'name' => 'english'
],
'provider' => 'livekit'
]
]
],
'stt' => [
'models' => [
[
'model' => [
'name' => 'nova-2-general',
'parameters' => [
'keywords' => [
[
'keyword' => '<string>',
'intensifier' => 123
]
]
]
],
'provider' => 'deepgram'
]
],
'on_failure' => [
'attempt_timeout' => 1,
'max_retry_per_stt' => 1,
'retry_interval' => 1
]
],
'llm' => [
'models' => [
[
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
]
],
'on_failure' => [
'attempt_timeout' => 1,
'max_retry_per_llm' => 1,
'retry_interval' => 1
]
],
'tts' => [
'models' => [
[
'model' => [
'parameters' => [
'voice' => '<string>',
'language' => 'en',
'speed' => 1,
'volume' => 1
],
'name' => 'sonic-3'
],
'provider' => 'cartesia'
]
],
'on_failure' => [
'attempt_timeout' => 1,
'max_retry_per_tts' => 1,
'retry_interval' => 1
],
'pronunciations' => [
]
],
'type' => 'stt_llm_tts',
'vad' => [
'models' => [
[
'model' => [
'name' => 'default'
],
'provider' => 'silero'
]
]
],
'vision_llm' => [
'models' => [
[
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
]
],
'frame_rate' => 1
],
'interruption' => [
'mode' => 'adaptive',
'enabled' => true,
'min_duration' => 123,
'min_words' => 123,
'false_interruption_timeout' => 2,
'resume_false_interruption' => true
],
'endpointing' => [
'min_delay' => 0.05,
'max_delay' => 1.5
],
'text_normalization' => [
'enabled' => false,
'price_verbosity' => 'formal',
'shorthand_cents_extra' => [
123
]
]
],
'type' => 'static_prompt',
'instructions' => '',
'built_in_tools' => [
'time_tool' => [
'default_timezone' => '<string>'
],
'widgets' => [
'allowed' => [
]
],
'forms' => [
'forms' => [
[
'id' => '<string>',
'name' => '<string>',
'fields' => [
[
'id' => '<string>',
'label' => '<string>',
'placeholder' => '<string>',
'required' => false,
'default_value' => '<unknown>',
'options' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'allow_other' => true,
'true_label' => '<string>',
'false_label' => '<string>',
'max_rating' => 123,
'validation' => '<string>',
'validation_message' => '<string>'
]
],
'description' => '<string>',
'title' => '<string>',
'submit_label' => 'Submit'
]
]
],
'web_search' => [
],
'retrieve_webpage' => [
],
'continue_on_phone' => [
'agent_id' => '<string>',
'version' => 123,
'agent_number' => '<string>'
],
'images' => [
'routes' => [
[
'image_type' => '<string>',
'description' => '<string>',
'fields_schema' => [
],
'tier' => '<string>'
]
],
'default_tier' => 'fast',
'tiers' => [
'fast' => [
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
],
'frontier' => [
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
]
],
'max_escalations_per_conversation' => 3,
'max_analyses_per_conversation' => 20,
'allow_user_uploads' => true,
'floor_overrides' => [
],
'pii_fields' => [
'<string>'
],
'on_blocked' => 'refuse'
]
],
'language' => [
'languages' => [
'<string>'
]
],
'allow_interruptions' => true,
'video_input' => false,
'screen_share_input' => false,
'max_tool_steps' => 2,
'channel_overrides' => [
],
'channel_properties' => [
]
],
'version' => '1',
'metadata' => [
],
'noise_cancellation' => [
'models' => [
[
'model' => [
'name' => 'bvc'
],
'provider' => 'livekit'
]
]
],
'custom_recording_locations' => [
[
'bucket' => '<string>',
'region' => '<string>',
'access_key' => '<string>',
'secret_access_key' => '<string>',
'provider' => 's3',
'file_type' => 'ogg'
]
],
'pre_conversation_workflow' => [
'type' => 'workflow',
'workflow_id' => '<string>',
'workflow_version' => 123,
'initial_step' => '<string>',
'definition' => [
],
'condition' => '<string>',
'reject_on_error' => false
],
'post_conversation_workflow' => [
'type' => 'workflow',
'workflow_id' => '<string>',
'workflow_version' => 123,
'initial_step' => '<string>',
'definition' => [
],
'condition' => '<string>',
'reject_on_error' => false
],
'scorecard_ids' => [
'<string>'
],
'voicemail_detection' => [
'beep_detection_threshold' => 0.5,
'beep_detection_timeout' => 123,
'tool_call_overrides' => [
'beep_detection_threshold' => 0.9,
'beep_detection_timeout' => 10,
'name' => 'voicemail_detected',
'description' => 'whenever you hear \'you have reached a voicemail\''
],
'play_message' => [
'message' => '<string>',
'generate' => false
]
],
'inactivity_nudge' => [
'timeout_seconds' => 30,
'nudge_interval_seconds' => 15,
'nudges' => [
[
'text' => '<string>',
'type' => 'bot_initiates_static'
]
]
]
],
'instruction_builder_inputs' => [
'industry' => '<string>',
'purpose' => '<string>',
'personality' => [
'<string>'
],
'conversation_flow' => '<string>',
'guardrails' => '<string>',
'disallowed_topics' => '<string>',
'safety_rules' => [
'<string>'
],
'enrichment_data' => [
]
]
]),
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://api.anyreach.ai/core/agents/{id}/versions/{version}"
payload := strings.NewReader("{\n \"config\": {\n \"agent\": {\n \"starting_message\": {\n \"type\": \"user_initiates\",\n \"action_grid\": {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"label\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"actions\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ],\n \"actions_on_error\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"output\": \"<string>\"\n }\n ],\n \"stack\": {\n \"turn_detection\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"english\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"stt\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"nova-2-general\",\n \"parameters\": {\n \"keywords\": [\n {\n \"keyword\": \"<string>\",\n \"intensifier\": 123\n }\n ]\n }\n },\n \"provider\": \"deepgram\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_stt\": 1,\n \"retry_interval\": 1\n }\n },\n \"llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_llm\": 1,\n \"retry_interval\": 1\n }\n },\n \"tts\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"voice\": \"<string>\",\n \"language\": \"en\",\n \"speed\": 1,\n \"volume\": 1\n },\n \"name\": \"sonic-3\"\n },\n \"provider\": \"cartesia\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_tts\": 1,\n \"retry_interval\": 1\n },\n \"pronunciations\": {}\n },\n \"type\": \"stt_llm_tts\",\n \"vad\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"default\"\n },\n \"provider\": \"silero\"\n }\n ]\n },\n \"vision_llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"frame_rate\": 1\n },\n \"interruption\": {\n \"mode\": \"adaptive\",\n \"enabled\": true,\n \"min_duration\": 123,\n \"min_words\": 123,\n \"false_interruption_timeout\": 2,\n \"resume_false_interruption\": true\n },\n \"endpointing\": {\n \"min_delay\": 0.05,\n \"max_delay\": 1.5\n },\n \"text_normalization\": {\n \"enabled\": false,\n \"price_verbosity\": \"formal\",\n \"shorthand_cents_extra\": [\n 123\n ]\n }\n },\n \"type\": \"static_prompt\",\n \"instructions\": \"\",\n \"built_in_tools\": {\n \"time_tool\": {\n \"default_timezone\": \"<string>\"\n },\n \"widgets\": {\n \"allowed\": []\n },\n \"forms\": {\n \"forms\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"required\": false,\n \"default_value\": \"<unknown>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"allow_other\": true,\n \"true_label\": \"<string>\",\n \"false_label\": \"<string>\",\n \"max_rating\": 123,\n \"validation\": \"<string>\",\n \"validation_message\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"title\": \"<string>\",\n \"submit_label\": \"Submit\"\n }\n ]\n },\n \"web_search\": {},\n \"retrieve_webpage\": {},\n \"continue_on_phone\": {\n \"agent_id\": \"<string>\",\n \"version\": 123,\n \"agent_number\": \"<string>\"\n },\n \"images\": {\n \"routes\": [\n {\n \"image_type\": \"<string>\",\n \"description\": \"<string>\",\n \"fields_schema\": {},\n \"tier\": \"<string>\"\n }\n ],\n \"default_tier\": \"fast\",\n \"tiers\": {\n \"fast\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n },\n \"frontier\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n },\n \"max_escalations_per_conversation\": 3,\n \"max_analyses_per_conversation\": 20,\n \"allow_user_uploads\": true,\n \"floor_overrides\": {},\n \"pii_fields\": [\n \"<string>\"\n ],\n \"on_blocked\": \"refuse\"\n }\n },\n \"language\": {\n \"languages\": [\n \"<string>\"\n ]\n },\n \"allow_interruptions\": true,\n \"video_input\": false,\n \"screen_share_input\": false,\n \"max_tool_steps\": 2,\n \"channel_overrides\": {},\n \"channel_properties\": {}\n },\n \"version\": \"1\",\n \"metadata\": {},\n \"noise_cancellation\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"bvc\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"custom_recording_locations\": [\n {\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"access_key\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"provider\": \"s3\",\n \"file_type\": \"ogg\"\n }\n ],\n \"pre_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"post_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"scorecard_ids\": [\n \"<string>\"\n ],\n \"voicemail_detection\": {\n \"beep_detection_threshold\": 0.5,\n \"beep_detection_timeout\": 123,\n \"tool_call_overrides\": {\n \"beep_detection_threshold\": 0.9,\n \"beep_detection_timeout\": 10,\n \"name\": \"voicemail_detected\",\n \"description\": \"whenever you hear 'you have reached a voicemail'\"\n },\n \"play_message\": {\n \"message\": \"<string>\",\n \"generate\": false\n }\n },\n \"inactivity_nudge\": {\n \"timeout_seconds\": 30,\n \"nudge_interval_seconds\": 15,\n \"nudges\": [\n {\n \"text\": \"<string>\",\n \"type\": \"bot_initiates_static\"\n }\n ]\n }\n },\n \"instruction_builder_inputs\": {\n \"industry\": \"<string>\",\n \"purpose\": \"<string>\",\n \"personality\": [\n \"<string>\"\n ],\n \"conversation_flow\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"disallowed_topics\": \"<string>\",\n \"safety_rules\": [\n \"<string>\"\n ],\n \"enrichment_data\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.anyreach.ai/core/agents/{id}/versions/{version}")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"agent\": {\n \"starting_message\": {\n \"type\": \"user_initiates\",\n \"action_grid\": {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"label\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"actions\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ],\n \"actions_on_error\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"output\": \"<string>\"\n }\n ],\n \"stack\": {\n \"turn_detection\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"english\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"stt\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"nova-2-general\",\n \"parameters\": {\n \"keywords\": [\n {\n \"keyword\": \"<string>\",\n \"intensifier\": 123\n }\n ]\n }\n },\n \"provider\": \"deepgram\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_stt\": 1,\n \"retry_interval\": 1\n }\n },\n \"llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_llm\": 1,\n \"retry_interval\": 1\n }\n },\n \"tts\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"voice\": \"<string>\",\n \"language\": \"en\",\n \"speed\": 1,\n \"volume\": 1\n },\n \"name\": \"sonic-3\"\n },\n \"provider\": \"cartesia\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_tts\": 1,\n \"retry_interval\": 1\n },\n \"pronunciations\": {}\n },\n \"type\": \"stt_llm_tts\",\n \"vad\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"default\"\n },\n \"provider\": \"silero\"\n }\n ]\n },\n \"vision_llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"frame_rate\": 1\n },\n \"interruption\": {\n \"mode\": \"adaptive\",\n \"enabled\": true,\n \"min_duration\": 123,\n \"min_words\": 123,\n \"false_interruption_timeout\": 2,\n \"resume_false_interruption\": true\n },\n \"endpointing\": {\n \"min_delay\": 0.05,\n \"max_delay\": 1.5\n },\n \"text_normalization\": {\n \"enabled\": false,\n \"price_verbosity\": \"formal\",\n \"shorthand_cents_extra\": [\n 123\n ]\n }\n },\n \"type\": \"static_prompt\",\n \"instructions\": \"\",\n \"built_in_tools\": {\n \"time_tool\": {\n \"default_timezone\": \"<string>\"\n },\n \"widgets\": {\n \"allowed\": []\n },\n \"forms\": {\n \"forms\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"required\": false,\n \"default_value\": \"<unknown>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"allow_other\": true,\n \"true_label\": \"<string>\",\n \"false_label\": \"<string>\",\n \"max_rating\": 123,\n \"validation\": \"<string>\",\n \"validation_message\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"title\": \"<string>\",\n \"submit_label\": \"Submit\"\n }\n ]\n },\n \"web_search\": {},\n \"retrieve_webpage\": {},\n \"continue_on_phone\": {\n \"agent_id\": \"<string>\",\n \"version\": 123,\n \"agent_number\": \"<string>\"\n },\n \"images\": {\n \"routes\": [\n {\n \"image_type\": \"<string>\",\n \"description\": \"<string>\",\n \"fields_schema\": {},\n \"tier\": \"<string>\"\n }\n ],\n \"default_tier\": \"fast\",\n \"tiers\": {\n \"fast\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n },\n \"frontier\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n },\n \"max_escalations_per_conversation\": 3,\n \"max_analyses_per_conversation\": 20,\n \"allow_user_uploads\": true,\n \"floor_overrides\": {},\n \"pii_fields\": [\n \"<string>\"\n ],\n \"on_blocked\": \"refuse\"\n }\n },\n \"language\": {\n \"languages\": [\n \"<string>\"\n ]\n },\n \"allow_interruptions\": true,\n \"video_input\": false,\n \"screen_share_input\": false,\n \"max_tool_steps\": 2,\n \"channel_overrides\": {},\n \"channel_properties\": {}\n },\n \"version\": \"1\",\n \"metadata\": {},\n \"noise_cancellation\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"bvc\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"custom_recording_locations\": [\n {\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"access_key\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"provider\": \"s3\",\n \"file_type\": \"ogg\"\n }\n ],\n \"pre_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"post_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"scorecard_ids\": [\n \"<string>\"\n ],\n \"voicemail_detection\": {\n \"beep_detection_threshold\": 0.5,\n \"beep_detection_timeout\": 123,\n \"tool_call_overrides\": {\n \"beep_detection_threshold\": 0.9,\n \"beep_detection_timeout\": 10,\n \"name\": \"voicemail_detected\",\n \"description\": \"whenever you hear 'you have reached a voicemail'\"\n },\n \"play_message\": {\n \"message\": \"<string>\",\n \"generate\": false\n }\n },\n \"inactivity_nudge\": {\n \"timeout_seconds\": 30,\n \"nudge_interval_seconds\": 15,\n \"nudges\": [\n {\n \"text\": \"<string>\",\n \"type\": \"bot_initiates_static\"\n }\n ]\n }\n },\n \"instruction_builder_inputs\": {\n \"industry\": \"<string>\",\n \"purpose\": \"<string>\",\n \"personality\": [\n \"<string>\"\n ],\n \"conversation_flow\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"disallowed_topics\": \"<string>\",\n \"safety_rules\": [\n \"<string>\"\n ],\n \"enrichment_data\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anyreach.ai/core/agents/{id}/versions/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"agent\": {\n \"starting_message\": {\n \"type\": \"user_initiates\",\n \"action_grid\": {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"label\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"actions\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ],\n \"actions_on_error\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"output\": \"<string>\"\n }\n ],\n \"stack\": {\n \"turn_detection\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"english\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"stt\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"nova-2-general\",\n \"parameters\": {\n \"keywords\": [\n {\n \"keyword\": \"<string>\",\n \"intensifier\": 123\n }\n ]\n }\n },\n \"provider\": \"deepgram\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_stt\": 1,\n \"retry_interval\": 1\n }\n },\n \"llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_llm\": 1,\n \"retry_interval\": 1\n }\n },\n \"tts\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"voice\": \"<string>\",\n \"language\": \"en\",\n \"speed\": 1,\n \"volume\": 1\n },\n \"name\": \"sonic-3\"\n },\n \"provider\": \"cartesia\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_tts\": 1,\n \"retry_interval\": 1\n },\n \"pronunciations\": {}\n },\n \"type\": \"stt_llm_tts\",\n \"vad\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"default\"\n },\n \"provider\": \"silero\"\n }\n ]\n },\n \"vision_llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"frame_rate\": 1\n },\n \"interruption\": {\n \"mode\": \"adaptive\",\n \"enabled\": true,\n \"min_duration\": 123,\n \"min_words\": 123,\n \"false_interruption_timeout\": 2,\n \"resume_false_interruption\": true\n },\n \"endpointing\": {\n \"min_delay\": 0.05,\n \"max_delay\": 1.5\n },\n \"text_normalization\": {\n \"enabled\": false,\n \"price_verbosity\": \"formal\",\n \"shorthand_cents_extra\": [\n 123\n ]\n }\n },\n \"type\": \"static_prompt\",\n \"instructions\": \"\",\n \"built_in_tools\": {\n \"time_tool\": {\n \"default_timezone\": \"<string>\"\n },\n \"widgets\": {\n \"allowed\": []\n },\n \"forms\": {\n \"forms\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"required\": false,\n \"default_value\": \"<unknown>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"allow_other\": true,\n \"true_label\": \"<string>\",\n \"false_label\": \"<string>\",\n \"max_rating\": 123,\n \"validation\": \"<string>\",\n \"validation_message\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"title\": \"<string>\",\n \"submit_label\": \"Submit\"\n }\n ]\n },\n \"web_search\": {},\n \"retrieve_webpage\": {},\n \"continue_on_phone\": {\n \"agent_id\": \"<string>\",\n \"version\": 123,\n \"agent_number\": \"<string>\"\n },\n \"images\": {\n \"routes\": [\n {\n \"image_type\": \"<string>\",\n \"description\": \"<string>\",\n \"fields_schema\": {},\n \"tier\": \"<string>\"\n }\n ],\n \"default_tier\": \"fast\",\n \"tiers\": {\n \"fast\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n },\n \"frontier\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n },\n \"max_escalations_per_conversation\": 3,\n \"max_analyses_per_conversation\": 20,\n \"allow_user_uploads\": true,\n \"floor_overrides\": {},\n \"pii_fields\": [\n \"<string>\"\n ],\n \"on_blocked\": \"refuse\"\n }\n },\n \"language\": {\n \"languages\": [\n \"<string>\"\n ]\n },\n \"allow_interruptions\": true,\n \"video_input\": false,\n \"screen_share_input\": false,\n \"max_tool_steps\": 2,\n \"channel_overrides\": {},\n \"channel_properties\": {}\n },\n \"version\": \"1\",\n \"metadata\": {},\n \"noise_cancellation\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"bvc\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"custom_recording_locations\": [\n {\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"access_key\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"provider\": \"s3\",\n \"file_type\": \"ogg\"\n }\n ],\n \"pre_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"post_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"scorecard_ids\": [\n \"<string>\"\n ],\n \"voicemail_detection\": {\n \"beep_detection_threshold\": 0.5,\n \"beep_detection_timeout\": 123,\n \"tool_call_overrides\": {\n \"beep_detection_threshold\": 0.9,\n \"beep_detection_timeout\": 10,\n \"name\": \"voicemail_detected\",\n \"description\": \"whenever you hear 'you have reached a voicemail'\"\n },\n \"play_message\": {\n \"message\": \"<string>\",\n \"generate\": false\n }\n },\n \"inactivity_nudge\": {\n \"timeout_seconds\": 30,\n \"nudge_interval_seconds\": 15,\n \"nudges\": [\n {\n \"text\": \"<string>\",\n \"type\": \"bot_initiates_static\"\n }\n ]\n }\n },\n \"instruction_builder_inputs\": {\n \"industry\": \"<string>\",\n \"purpose\": \"<string>\",\n \"personality\": [\n \"<string>\"\n ],\n \"conversation_flow\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"disallowed_topics\": \"<string>\",\n \"safety_rules\": [\n \"<string>\"\n ],\n \"enrichment_data\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 1,
"config": {
"version": "1",
"agent": {
"type": null,
"instructions": null,
"starting_message": null,
"tools": null,
"built_in_tools": null,
"language": null,
"stack": null,
"allow_interruptions": null,
"video_input": null,
"screen_share_input": null,
"max_tool_steps": null,
"channel_overrides": null,
"channel_properties": null
},
"metadata": {},
"noise_cancellation": {
"models": null
},
"custom_recording_locations": [],
"pre_conversation_workflow": {
"type": null,
"workflow_id": null,
"workflow_version": null,
"initial_step": null,
"definition": null,
"condition": null,
"reject_on_error": null
},
"post_conversation_workflow": {
"type": null,
"workflow_id": null,
"workflow_version": null,
"initial_step": null,
"definition": null,
"condition": null,
"reject_on_error": null
},
"scorecard_ids": [
"string"
],
"voicemail_detection": {
"beep_detection_threshold": null,
"beep_detection_timeout": null,
"tool_call_overrides": null,
"play_message": null
},
"inactivity_nudge": {
"timeout_seconds": 30,
"nudge_interval_seconds": 15,
"nudges": []
}
},
"published": false,
"instruction_builder_inputs": {},
"trained_instruction_builder_inputs": {},
"generation_timestamp": "2026-01-15T09:30:00Z",
"manually_edited": false,
"is_updated": false,
"cache_fingerprints": [
"string"
],
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"created_by": "user:3fa85f64-5717-4562-b3fc-2c963f66afa6",
"modified_by": "user:3fa85f64-5717-4562-b3fc-2c963f66afa6"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Organization ID for user PATs (pat_ prefix tokens)
Body
application/json
Response
Successful Response
Agent version entity representing a version of an agent with configuration.
Top-level agent configuration.
Show child attributes
Show child attributes
⌘I
Update Agent Version
curl --request PUT \
--url https://api.anyreach.ai/core/agents/{id}/versions/{version} \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"config": {
"agent": {
"starting_message": {
"type": "user_initiates",
"action_grid": {
"title": "<string>",
"items": [
{
"label": "<string>",
"icon": "<string>"
}
]
}
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"actions": [
{
"message": "<string>",
"type": "play_message",
"generate": false,
"wait_for_playout": true,
"allow_interruptions": true,
"condition": "<string>"
}
],
"properties": {},
"required": [
"<string>"
],
"actions_on_error": [
{
"message": "<string>",
"type": "play_message",
"generate": false,
"wait_for_playout": true,
"allow_interruptions": true,
"condition": "<string>"
}
],
"output": "<string>"
}
],
"stack": {
"turn_detection": {
"models": [
{
"model": {
"name": "english"
},
"provider": "livekit"
}
]
},
"stt": {
"models": [
{
"model": {
"name": "nova-2-general",
"parameters": {
"keywords": [
{
"keyword": "<string>",
"intensifier": 123
}
]
}
},
"provider": "deepgram"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_stt": 1,
"retry_interval": 1
}
},
"llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_llm": 1,
"retry_interval": 1
}
},
"tts": {
"models": [
{
"model": {
"parameters": {
"voice": "<string>",
"language": "en",
"speed": 1,
"volume": 1
},
"name": "sonic-3"
},
"provider": "cartesia"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_tts": 1,
"retry_interval": 1
},
"pronunciations": {}
},
"type": "stt_llm_tts",
"vad": {
"models": [
{
"model": {
"name": "default"
},
"provider": "silero"
}
]
},
"vision_llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"frame_rate": 1
},
"interruption": {
"mode": "adaptive",
"enabled": true,
"min_duration": 123,
"min_words": 123,
"false_interruption_timeout": 2,
"resume_false_interruption": true
},
"endpointing": {
"min_delay": 0.05,
"max_delay": 1.5
},
"text_normalization": {
"enabled": false,
"price_verbosity": "formal",
"shorthand_cents_extra": [
123
]
}
},
"type": "static_prompt",
"instructions": "",
"built_in_tools": {
"time_tool": {
"default_timezone": "<string>"
},
"widgets": {
"allowed": []
},
"forms": {
"forms": [
{
"id": "<string>",
"name": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"placeholder": "<string>",
"required": false,
"default_value": "<unknown>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"allow_other": true,
"true_label": "<string>",
"false_label": "<string>",
"max_rating": 123,
"validation": "<string>",
"validation_message": "<string>"
}
],
"description": "<string>",
"title": "<string>",
"submit_label": "Submit"
}
]
},
"web_search": {},
"retrieve_webpage": {},
"continue_on_phone": {
"agent_id": "<string>",
"version": 123,
"agent_number": "<string>"
},
"images": {
"routes": [
{
"image_type": "<string>",
"description": "<string>",
"fields_schema": {},
"tier": "<string>"
}
],
"default_tier": "fast",
"tiers": {
"fast": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
},
"frontier": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
},
"max_escalations_per_conversation": 3,
"max_analyses_per_conversation": 20,
"allow_user_uploads": true,
"floor_overrides": {},
"pii_fields": [
"<string>"
],
"on_blocked": "refuse"
}
},
"language": {
"languages": [
"<string>"
]
},
"allow_interruptions": true,
"video_input": false,
"screen_share_input": false,
"max_tool_steps": 2,
"channel_overrides": {},
"channel_properties": {}
},
"version": "1",
"metadata": {},
"noise_cancellation": {
"models": [
{
"model": {
"name": "bvc"
},
"provider": "livekit"
}
]
},
"custom_recording_locations": [
{
"bucket": "<string>",
"region": "<string>",
"access_key": "<string>",
"secret_access_key": "<string>",
"provider": "s3",
"file_type": "ogg"
}
],
"pre_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": false
},
"post_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": false
},
"scorecard_ids": [
"<string>"
],
"voicemail_detection": {
"beep_detection_threshold": 0.5,
"beep_detection_timeout": 123,
"tool_call_overrides": {
"beep_detection_threshold": 0.9,
"beep_detection_timeout": 10,
"name": "voicemail_detected",
"description": "whenever you hear 'you have reached a voicemail'"
},
"play_message": {
"message": "<string>",
"generate": false
}
},
"inactivity_nudge": {
"timeout_seconds": 30,
"nudge_interval_seconds": 15,
"nudges": [
{
"text": "<string>",
"type": "bot_initiates_static"
}
]
}
},
"instruction_builder_inputs": {
"industry": "<string>",
"purpose": "<string>",
"personality": [
"<string>"
],
"conversation_flow": "<string>",
"guardrails": "<string>",
"disallowed_topics": "<string>",
"safety_rules": [
"<string>"
],
"enrichment_data": {}
}
}
EOFimport requests
url = "https://api.anyreach.ai/core/agents/{id}/versions/{version}"
payload = {
"config": {
"agent": {
"starting_message": {
"type": "user_initiates",
"action_grid": {
"title": "<string>",
"items": [
{
"label": "<string>",
"icon": "<string>"
}
]
}
},
"tools": [
{
"name": "<string>",
"description": "<string>",
"actions": [
{
"message": "<string>",
"type": "play_message",
"generate": False,
"wait_for_playout": True,
"allow_interruptions": True,
"condition": "<string>"
}
],
"properties": {},
"required": ["<string>"],
"actions_on_error": [
{
"message": "<string>",
"type": "play_message",
"generate": False,
"wait_for_playout": True,
"allow_interruptions": True,
"condition": "<string>"
}
],
"output": "<string>"
}
],
"stack": {
"turn_detection": { "models": [
{
"model": { "name": "english" },
"provider": "livekit"
}
] },
"stt": {
"models": [
{
"model": {
"name": "nova-2-general",
"parameters": { "keywords": [
{
"keyword": "<string>",
"intensifier": 123
}
] }
},
"provider": "deepgram"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_stt": 1,
"retry_interval": 1
}
},
"llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_llm": 1,
"retry_interval": 1
}
},
"tts": {
"models": [
{
"model": {
"parameters": {
"voice": "<string>",
"language": "en",
"speed": 1,
"volume": 1
},
"name": "sonic-3"
},
"provider": "cartesia"
}
],
"on_failure": {
"attempt_timeout": 1,
"max_retry_per_tts": 1,
"retry_interval": 1
},
"pronunciations": {}
},
"type": "stt_llm_tts",
"vad": { "models": [
{
"model": { "name": "default" },
"provider": "silero"
}
] },
"vision_llm": {
"models": [
{
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
],
"frame_rate": 1
},
"interruption": {
"mode": "adaptive",
"enabled": True,
"min_duration": 123,
"min_words": 123,
"false_interruption_timeout": 2,
"resume_false_interruption": True
},
"endpointing": {
"min_delay": 0.05,
"max_delay": 1.5
},
"text_normalization": {
"enabled": False,
"price_verbosity": "formal",
"shorthand_cents_extra": [123]
}
},
"type": "static_prompt",
"instructions": "",
"built_in_tools": {
"time_tool": { "default_timezone": "<string>" },
"widgets": { "allowed": [] },
"forms": { "forms": [
{
"id": "<string>",
"name": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"placeholder": "<string>",
"required": False,
"default_value": "<unknown>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"allow_other": True,
"true_label": "<string>",
"false_label": "<string>",
"max_rating": 123,
"validation": "<string>",
"validation_message": "<string>"
}
],
"description": "<string>",
"title": "<string>",
"submit_label": "Submit"
}
] },
"web_search": {},
"retrieve_webpage": {},
"continue_on_phone": {
"agent_id": "<string>",
"version": 123,
"agent_number": "<string>"
},
"images": {
"routes": [
{
"image_type": "<string>",
"description": "<string>",
"fields_schema": {},
"tier": "<string>"
}
],
"default_tier": "fast",
"tiers": {
"fast": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
},
"frontier": {
"model": {
"parameters": {
"azure_deployment": "<string>",
"temperature": 1,
"max_tokens": 2
},
"name": "gpt-4o"
},
"provider": "azure_openai"
}
},
"max_escalations_per_conversation": 3,
"max_analyses_per_conversation": 20,
"allow_user_uploads": True,
"floor_overrides": {},
"pii_fields": ["<string>"],
"on_blocked": "refuse"
}
},
"language": { "languages": ["<string>"] },
"allow_interruptions": True,
"video_input": False,
"screen_share_input": False,
"max_tool_steps": 2,
"channel_overrides": {},
"channel_properties": {}
},
"version": "1",
"metadata": {},
"noise_cancellation": { "models": [
{
"model": { "name": "bvc" },
"provider": "livekit"
}
] },
"custom_recording_locations": [
{
"bucket": "<string>",
"region": "<string>",
"access_key": "<string>",
"secret_access_key": "<string>",
"provider": "s3",
"file_type": "ogg"
}
],
"pre_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": False
},
"post_conversation_workflow": {
"type": "workflow",
"workflow_id": "<string>",
"workflow_version": 123,
"initial_step": "<string>",
"definition": {},
"condition": "<string>",
"reject_on_error": False
},
"scorecard_ids": ["<string>"],
"voicemail_detection": {
"beep_detection_threshold": 0.5,
"beep_detection_timeout": 123,
"tool_call_overrides": {
"beep_detection_threshold": 0.9,
"beep_detection_timeout": 10,
"name": "voicemail_detected",
"description": "whenever you hear 'you have reached a voicemail'"
},
"play_message": {
"message": "<string>",
"generate": False
}
},
"inactivity_nudge": {
"timeout_seconds": 30,
"nudge_interval_seconds": 15,
"nudges": [
{
"text": "<string>",
"type": "bot_initiates_static"
}
]
}
},
"instruction_builder_inputs": {
"industry": "<string>",
"purpose": "<string>",
"personality": ["<string>"],
"conversation_flow": "<string>",
"guardrails": "<string>",
"disallowed_topics": "<string>",
"safety_rules": ["<string>"],
"enrichment_data": {}
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
agent: {
starting_message: {
type: 'user_initiates',
action_grid: {title: '<string>', items: [{label: '<string>', icon: '<string>'}]}
},
tools: [
{
name: '<string>',
description: '<string>',
actions: [
{
message: '<string>',
type: 'play_message',
generate: false,
wait_for_playout: true,
allow_interruptions: true,
condition: '<string>'
}
],
properties: {},
required: ['<string>'],
actions_on_error: [
{
message: '<string>',
type: 'play_message',
generate: false,
wait_for_playout: true,
allow_interruptions: true,
condition: '<string>'
}
],
output: '<string>'
}
],
stack: {
turn_detection: {models: [{model: {name: 'english'}, provider: 'livekit'}]},
stt: {
models: [
{
model: {
name: 'nova-2-general',
parameters: {keywords: [{keyword: '<string>', intensifier: 123}]}
},
provider: 'deepgram'
}
],
on_failure: {attempt_timeout: 1, max_retry_per_stt: 1, retry_interval: 1}
},
llm: {
models: [
{
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
}
],
on_failure: {attempt_timeout: 1, max_retry_per_llm: 1, retry_interval: 1}
},
tts: {
models: [
{
model: {
parameters: {voice: '<string>', language: 'en', speed: 1, volume: 1},
name: 'sonic-3'
},
provider: 'cartesia'
}
],
on_failure: {attempt_timeout: 1, max_retry_per_tts: 1, retry_interval: 1},
pronunciations: {}
},
type: 'stt_llm_tts',
vad: {models: [{model: {name: 'default'}, provider: 'silero'}]},
vision_llm: {
models: [
{
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
}
],
frame_rate: 1
},
interruption: {
mode: 'adaptive',
enabled: true,
min_duration: 123,
min_words: 123,
false_interruption_timeout: 2,
resume_false_interruption: true
},
endpointing: {min_delay: 0.05, max_delay: 1.5},
text_normalization: {enabled: false, price_verbosity: 'formal', shorthand_cents_extra: [123]}
},
type: 'static_prompt',
instructions: '',
built_in_tools: {
time_tool: {default_timezone: '<string>'},
widgets: {allowed: []},
forms: {
forms: [
{
id: '<string>',
name: '<string>',
fields: [
{
id: '<string>',
label: '<string>',
placeholder: '<string>',
required: false,
default_value: '<unknown>',
options: [{label: '<string>', value: '<string>'}],
allow_other: true,
true_label: '<string>',
false_label: '<string>',
max_rating: 123,
validation: '<string>',
validation_message: '<string>'
}
],
description: '<string>',
title: '<string>',
submit_label: 'Submit'
}
]
},
web_search: {},
retrieve_webpage: {},
continue_on_phone: {agent_id: '<string>', version: 123, agent_number: '<string>'},
images: {
routes: [
{
image_type: '<string>',
description: '<string>',
fields_schema: {},
tier: '<string>'
}
],
default_tier: 'fast',
tiers: {
fast: {
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
},
frontier: {
model: {
parameters: {azure_deployment: '<string>', temperature: 1, max_tokens: 2},
name: 'gpt-4o'
},
provider: 'azure_openai'
}
},
max_escalations_per_conversation: 3,
max_analyses_per_conversation: 20,
allow_user_uploads: true,
floor_overrides: {},
pii_fields: ['<string>'],
on_blocked: 'refuse'
}
},
language: {languages: ['<string>']},
allow_interruptions: true,
video_input: false,
screen_share_input: false,
max_tool_steps: 2,
channel_overrides: {},
channel_properties: {}
},
version: '1',
metadata: {},
noise_cancellation: {models: [{model: {name: 'bvc'}, provider: 'livekit'}]},
custom_recording_locations: [
{
bucket: '<string>',
region: '<string>',
access_key: '<string>',
secret_access_key: '<string>',
provider: 's3',
file_type: 'ogg'
}
],
pre_conversation_workflow: {
type: 'workflow',
workflow_id: '<string>',
workflow_version: 123,
initial_step: '<string>',
definition: {},
condition: '<string>',
reject_on_error: false
},
post_conversation_workflow: {
type: 'workflow',
workflow_id: '<string>',
workflow_version: 123,
initial_step: '<string>',
definition: {},
condition: '<string>',
reject_on_error: false
},
scorecard_ids: ['<string>'],
voicemail_detection: {
beep_detection_threshold: 0.5,
beep_detection_timeout: 123,
tool_call_overrides: {
beep_detection_threshold: 0.9,
beep_detection_timeout: 10,
name: 'voicemail_detected',
description: 'whenever you hear \'you have reached a voicemail\''
},
play_message: {message: '<string>', generate: false}
},
inactivity_nudge: {
timeout_seconds: 30,
nudge_interval_seconds: 15,
nudges: [{text: '<string>', type: 'bot_initiates_static'}]
}
},
instruction_builder_inputs: {
industry: '<string>',
purpose: '<string>',
personality: ['<string>'],
conversation_flow: '<string>',
guardrails: '<string>',
disallowed_topics: '<string>',
safety_rules: ['<string>'],
enrichment_data: {}
}
})
};
fetch('https://api.anyreach.ai/core/agents/{id}/versions/{version}', 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://api.anyreach.ai/core/agents/{id}/versions/{version}",
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([
'config' => [
'agent' => [
'starting_message' => [
'type' => 'user_initiates',
'action_grid' => [
'title' => '<string>',
'items' => [
[
'label' => '<string>',
'icon' => '<string>'
]
]
]
],
'tools' => [
[
'name' => '<string>',
'description' => '<string>',
'actions' => [
[
'message' => '<string>',
'type' => 'play_message',
'generate' => false,
'wait_for_playout' => true,
'allow_interruptions' => true,
'condition' => '<string>'
]
],
'properties' => [
],
'required' => [
'<string>'
],
'actions_on_error' => [
[
'message' => '<string>',
'type' => 'play_message',
'generate' => false,
'wait_for_playout' => true,
'allow_interruptions' => true,
'condition' => '<string>'
]
],
'output' => '<string>'
]
],
'stack' => [
'turn_detection' => [
'models' => [
[
'model' => [
'name' => 'english'
],
'provider' => 'livekit'
]
]
],
'stt' => [
'models' => [
[
'model' => [
'name' => 'nova-2-general',
'parameters' => [
'keywords' => [
[
'keyword' => '<string>',
'intensifier' => 123
]
]
]
],
'provider' => 'deepgram'
]
],
'on_failure' => [
'attempt_timeout' => 1,
'max_retry_per_stt' => 1,
'retry_interval' => 1
]
],
'llm' => [
'models' => [
[
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
]
],
'on_failure' => [
'attempt_timeout' => 1,
'max_retry_per_llm' => 1,
'retry_interval' => 1
]
],
'tts' => [
'models' => [
[
'model' => [
'parameters' => [
'voice' => '<string>',
'language' => 'en',
'speed' => 1,
'volume' => 1
],
'name' => 'sonic-3'
],
'provider' => 'cartesia'
]
],
'on_failure' => [
'attempt_timeout' => 1,
'max_retry_per_tts' => 1,
'retry_interval' => 1
],
'pronunciations' => [
]
],
'type' => 'stt_llm_tts',
'vad' => [
'models' => [
[
'model' => [
'name' => 'default'
],
'provider' => 'silero'
]
]
],
'vision_llm' => [
'models' => [
[
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
]
],
'frame_rate' => 1
],
'interruption' => [
'mode' => 'adaptive',
'enabled' => true,
'min_duration' => 123,
'min_words' => 123,
'false_interruption_timeout' => 2,
'resume_false_interruption' => true
],
'endpointing' => [
'min_delay' => 0.05,
'max_delay' => 1.5
],
'text_normalization' => [
'enabled' => false,
'price_verbosity' => 'formal',
'shorthand_cents_extra' => [
123
]
]
],
'type' => 'static_prompt',
'instructions' => '',
'built_in_tools' => [
'time_tool' => [
'default_timezone' => '<string>'
],
'widgets' => [
'allowed' => [
]
],
'forms' => [
'forms' => [
[
'id' => '<string>',
'name' => '<string>',
'fields' => [
[
'id' => '<string>',
'label' => '<string>',
'placeholder' => '<string>',
'required' => false,
'default_value' => '<unknown>',
'options' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'allow_other' => true,
'true_label' => '<string>',
'false_label' => '<string>',
'max_rating' => 123,
'validation' => '<string>',
'validation_message' => '<string>'
]
],
'description' => '<string>',
'title' => '<string>',
'submit_label' => 'Submit'
]
]
],
'web_search' => [
],
'retrieve_webpage' => [
],
'continue_on_phone' => [
'agent_id' => '<string>',
'version' => 123,
'agent_number' => '<string>'
],
'images' => [
'routes' => [
[
'image_type' => '<string>',
'description' => '<string>',
'fields_schema' => [
],
'tier' => '<string>'
]
],
'default_tier' => 'fast',
'tiers' => [
'fast' => [
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
],
'frontier' => [
'model' => [
'parameters' => [
'azure_deployment' => '<string>',
'temperature' => 1,
'max_tokens' => 2
],
'name' => 'gpt-4o'
],
'provider' => 'azure_openai'
]
],
'max_escalations_per_conversation' => 3,
'max_analyses_per_conversation' => 20,
'allow_user_uploads' => true,
'floor_overrides' => [
],
'pii_fields' => [
'<string>'
],
'on_blocked' => 'refuse'
]
],
'language' => [
'languages' => [
'<string>'
]
],
'allow_interruptions' => true,
'video_input' => false,
'screen_share_input' => false,
'max_tool_steps' => 2,
'channel_overrides' => [
],
'channel_properties' => [
]
],
'version' => '1',
'metadata' => [
],
'noise_cancellation' => [
'models' => [
[
'model' => [
'name' => 'bvc'
],
'provider' => 'livekit'
]
]
],
'custom_recording_locations' => [
[
'bucket' => '<string>',
'region' => '<string>',
'access_key' => '<string>',
'secret_access_key' => '<string>',
'provider' => 's3',
'file_type' => 'ogg'
]
],
'pre_conversation_workflow' => [
'type' => 'workflow',
'workflow_id' => '<string>',
'workflow_version' => 123,
'initial_step' => '<string>',
'definition' => [
],
'condition' => '<string>',
'reject_on_error' => false
],
'post_conversation_workflow' => [
'type' => 'workflow',
'workflow_id' => '<string>',
'workflow_version' => 123,
'initial_step' => '<string>',
'definition' => [
],
'condition' => '<string>',
'reject_on_error' => false
],
'scorecard_ids' => [
'<string>'
],
'voicemail_detection' => [
'beep_detection_threshold' => 0.5,
'beep_detection_timeout' => 123,
'tool_call_overrides' => [
'beep_detection_threshold' => 0.9,
'beep_detection_timeout' => 10,
'name' => 'voicemail_detected',
'description' => 'whenever you hear \'you have reached a voicemail\''
],
'play_message' => [
'message' => '<string>',
'generate' => false
]
],
'inactivity_nudge' => [
'timeout_seconds' => 30,
'nudge_interval_seconds' => 15,
'nudges' => [
[
'text' => '<string>',
'type' => 'bot_initiates_static'
]
]
]
],
'instruction_builder_inputs' => [
'industry' => '<string>',
'purpose' => '<string>',
'personality' => [
'<string>'
],
'conversation_flow' => '<string>',
'guardrails' => '<string>',
'disallowed_topics' => '<string>',
'safety_rules' => [
'<string>'
],
'enrichment_data' => [
]
]
]),
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://api.anyreach.ai/core/agents/{id}/versions/{version}"
payload := strings.NewReader("{\n \"config\": {\n \"agent\": {\n \"starting_message\": {\n \"type\": \"user_initiates\",\n \"action_grid\": {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"label\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"actions\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ],\n \"actions_on_error\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"output\": \"<string>\"\n }\n ],\n \"stack\": {\n \"turn_detection\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"english\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"stt\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"nova-2-general\",\n \"parameters\": {\n \"keywords\": [\n {\n \"keyword\": \"<string>\",\n \"intensifier\": 123\n }\n ]\n }\n },\n \"provider\": \"deepgram\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_stt\": 1,\n \"retry_interval\": 1\n }\n },\n \"llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_llm\": 1,\n \"retry_interval\": 1\n }\n },\n \"tts\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"voice\": \"<string>\",\n \"language\": \"en\",\n \"speed\": 1,\n \"volume\": 1\n },\n \"name\": \"sonic-3\"\n },\n \"provider\": \"cartesia\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_tts\": 1,\n \"retry_interval\": 1\n },\n \"pronunciations\": {}\n },\n \"type\": \"stt_llm_tts\",\n \"vad\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"default\"\n },\n \"provider\": \"silero\"\n }\n ]\n },\n \"vision_llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"frame_rate\": 1\n },\n \"interruption\": {\n \"mode\": \"adaptive\",\n \"enabled\": true,\n \"min_duration\": 123,\n \"min_words\": 123,\n \"false_interruption_timeout\": 2,\n \"resume_false_interruption\": true\n },\n \"endpointing\": {\n \"min_delay\": 0.05,\n \"max_delay\": 1.5\n },\n \"text_normalization\": {\n \"enabled\": false,\n \"price_verbosity\": \"formal\",\n \"shorthand_cents_extra\": [\n 123\n ]\n }\n },\n \"type\": \"static_prompt\",\n \"instructions\": \"\",\n \"built_in_tools\": {\n \"time_tool\": {\n \"default_timezone\": \"<string>\"\n },\n \"widgets\": {\n \"allowed\": []\n },\n \"forms\": {\n \"forms\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"required\": false,\n \"default_value\": \"<unknown>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"allow_other\": true,\n \"true_label\": \"<string>\",\n \"false_label\": \"<string>\",\n \"max_rating\": 123,\n \"validation\": \"<string>\",\n \"validation_message\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"title\": \"<string>\",\n \"submit_label\": \"Submit\"\n }\n ]\n },\n \"web_search\": {},\n \"retrieve_webpage\": {},\n \"continue_on_phone\": {\n \"agent_id\": \"<string>\",\n \"version\": 123,\n \"agent_number\": \"<string>\"\n },\n \"images\": {\n \"routes\": [\n {\n \"image_type\": \"<string>\",\n \"description\": \"<string>\",\n \"fields_schema\": {},\n \"tier\": \"<string>\"\n }\n ],\n \"default_tier\": \"fast\",\n \"tiers\": {\n \"fast\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n },\n \"frontier\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n },\n \"max_escalations_per_conversation\": 3,\n \"max_analyses_per_conversation\": 20,\n \"allow_user_uploads\": true,\n \"floor_overrides\": {},\n \"pii_fields\": [\n \"<string>\"\n ],\n \"on_blocked\": \"refuse\"\n }\n },\n \"language\": {\n \"languages\": [\n \"<string>\"\n ]\n },\n \"allow_interruptions\": true,\n \"video_input\": false,\n \"screen_share_input\": false,\n \"max_tool_steps\": 2,\n \"channel_overrides\": {},\n \"channel_properties\": {}\n },\n \"version\": \"1\",\n \"metadata\": {},\n \"noise_cancellation\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"bvc\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"custom_recording_locations\": [\n {\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"access_key\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"provider\": \"s3\",\n \"file_type\": \"ogg\"\n }\n ],\n \"pre_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"post_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"scorecard_ids\": [\n \"<string>\"\n ],\n \"voicemail_detection\": {\n \"beep_detection_threshold\": 0.5,\n \"beep_detection_timeout\": 123,\n \"tool_call_overrides\": {\n \"beep_detection_threshold\": 0.9,\n \"beep_detection_timeout\": 10,\n \"name\": \"voicemail_detected\",\n \"description\": \"whenever you hear 'you have reached a voicemail'\"\n },\n \"play_message\": {\n \"message\": \"<string>\",\n \"generate\": false\n }\n },\n \"inactivity_nudge\": {\n \"timeout_seconds\": 30,\n \"nudge_interval_seconds\": 15,\n \"nudges\": [\n {\n \"text\": \"<string>\",\n \"type\": \"bot_initiates_static\"\n }\n ]\n }\n },\n \"instruction_builder_inputs\": {\n \"industry\": \"<string>\",\n \"purpose\": \"<string>\",\n \"personality\": [\n \"<string>\"\n ],\n \"conversation_flow\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"disallowed_topics\": \"<string>\",\n \"safety_rules\": [\n \"<string>\"\n ],\n \"enrichment_data\": {}\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.anyreach.ai/core/agents/{id}/versions/{version}")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"agent\": {\n \"starting_message\": {\n \"type\": \"user_initiates\",\n \"action_grid\": {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"label\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"actions\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ],\n \"actions_on_error\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"output\": \"<string>\"\n }\n ],\n \"stack\": {\n \"turn_detection\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"english\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"stt\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"nova-2-general\",\n \"parameters\": {\n \"keywords\": [\n {\n \"keyword\": \"<string>\",\n \"intensifier\": 123\n }\n ]\n }\n },\n \"provider\": \"deepgram\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_stt\": 1,\n \"retry_interval\": 1\n }\n },\n \"llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_llm\": 1,\n \"retry_interval\": 1\n }\n },\n \"tts\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"voice\": \"<string>\",\n \"language\": \"en\",\n \"speed\": 1,\n \"volume\": 1\n },\n \"name\": \"sonic-3\"\n },\n \"provider\": \"cartesia\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_tts\": 1,\n \"retry_interval\": 1\n },\n \"pronunciations\": {}\n },\n \"type\": \"stt_llm_tts\",\n \"vad\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"default\"\n },\n \"provider\": \"silero\"\n }\n ]\n },\n \"vision_llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"frame_rate\": 1\n },\n \"interruption\": {\n \"mode\": \"adaptive\",\n \"enabled\": true,\n \"min_duration\": 123,\n \"min_words\": 123,\n \"false_interruption_timeout\": 2,\n \"resume_false_interruption\": true\n },\n \"endpointing\": {\n \"min_delay\": 0.05,\n \"max_delay\": 1.5\n },\n \"text_normalization\": {\n \"enabled\": false,\n \"price_verbosity\": \"formal\",\n \"shorthand_cents_extra\": [\n 123\n ]\n }\n },\n \"type\": \"static_prompt\",\n \"instructions\": \"\",\n \"built_in_tools\": {\n \"time_tool\": {\n \"default_timezone\": \"<string>\"\n },\n \"widgets\": {\n \"allowed\": []\n },\n \"forms\": {\n \"forms\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"required\": false,\n \"default_value\": \"<unknown>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"allow_other\": true,\n \"true_label\": \"<string>\",\n \"false_label\": \"<string>\",\n \"max_rating\": 123,\n \"validation\": \"<string>\",\n \"validation_message\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"title\": \"<string>\",\n \"submit_label\": \"Submit\"\n }\n ]\n },\n \"web_search\": {},\n \"retrieve_webpage\": {},\n \"continue_on_phone\": {\n \"agent_id\": \"<string>\",\n \"version\": 123,\n \"agent_number\": \"<string>\"\n },\n \"images\": {\n \"routes\": [\n {\n \"image_type\": \"<string>\",\n \"description\": \"<string>\",\n \"fields_schema\": {},\n \"tier\": \"<string>\"\n }\n ],\n \"default_tier\": \"fast\",\n \"tiers\": {\n \"fast\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n },\n \"frontier\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n },\n \"max_escalations_per_conversation\": 3,\n \"max_analyses_per_conversation\": 20,\n \"allow_user_uploads\": true,\n \"floor_overrides\": {},\n \"pii_fields\": [\n \"<string>\"\n ],\n \"on_blocked\": \"refuse\"\n }\n },\n \"language\": {\n \"languages\": [\n \"<string>\"\n ]\n },\n \"allow_interruptions\": true,\n \"video_input\": false,\n \"screen_share_input\": false,\n \"max_tool_steps\": 2,\n \"channel_overrides\": {},\n \"channel_properties\": {}\n },\n \"version\": \"1\",\n \"metadata\": {},\n \"noise_cancellation\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"bvc\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"custom_recording_locations\": [\n {\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"access_key\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"provider\": \"s3\",\n \"file_type\": \"ogg\"\n }\n ],\n \"pre_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"post_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"scorecard_ids\": [\n \"<string>\"\n ],\n \"voicemail_detection\": {\n \"beep_detection_threshold\": 0.5,\n \"beep_detection_timeout\": 123,\n \"tool_call_overrides\": {\n \"beep_detection_threshold\": 0.9,\n \"beep_detection_timeout\": 10,\n \"name\": \"voicemail_detected\",\n \"description\": \"whenever you hear 'you have reached a voicemail'\"\n },\n \"play_message\": {\n \"message\": \"<string>\",\n \"generate\": false\n }\n },\n \"inactivity_nudge\": {\n \"timeout_seconds\": 30,\n \"nudge_interval_seconds\": 15,\n \"nudges\": [\n {\n \"text\": \"<string>\",\n \"type\": \"bot_initiates_static\"\n }\n ]\n }\n },\n \"instruction_builder_inputs\": {\n \"industry\": \"<string>\",\n \"purpose\": \"<string>\",\n \"personality\": [\n \"<string>\"\n ],\n \"conversation_flow\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"disallowed_topics\": \"<string>\",\n \"safety_rules\": [\n \"<string>\"\n ],\n \"enrichment_data\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anyreach.ai/core/agents/{id}/versions/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"agent\": {\n \"starting_message\": {\n \"type\": \"user_initiates\",\n \"action_grid\": {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"label\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"actions\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ],\n \"actions_on_error\": [\n {\n \"message\": \"<string>\",\n \"type\": \"play_message\",\n \"generate\": false,\n \"wait_for_playout\": true,\n \"allow_interruptions\": true,\n \"condition\": \"<string>\"\n }\n ],\n \"output\": \"<string>\"\n }\n ],\n \"stack\": {\n \"turn_detection\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"english\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"stt\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"nova-2-general\",\n \"parameters\": {\n \"keywords\": [\n {\n \"keyword\": \"<string>\",\n \"intensifier\": 123\n }\n ]\n }\n },\n \"provider\": \"deepgram\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_stt\": 1,\n \"retry_interval\": 1\n }\n },\n \"llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_llm\": 1,\n \"retry_interval\": 1\n }\n },\n \"tts\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"voice\": \"<string>\",\n \"language\": \"en\",\n \"speed\": 1,\n \"volume\": 1\n },\n \"name\": \"sonic-3\"\n },\n \"provider\": \"cartesia\"\n }\n ],\n \"on_failure\": {\n \"attempt_timeout\": 1,\n \"max_retry_per_tts\": 1,\n \"retry_interval\": 1\n },\n \"pronunciations\": {}\n },\n \"type\": \"stt_llm_tts\",\n \"vad\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"default\"\n },\n \"provider\": \"silero\"\n }\n ]\n },\n \"vision_llm\": {\n \"models\": [\n {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n ],\n \"frame_rate\": 1\n },\n \"interruption\": {\n \"mode\": \"adaptive\",\n \"enabled\": true,\n \"min_duration\": 123,\n \"min_words\": 123,\n \"false_interruption_timeout\": 2,\n \"resume_false_interruption\": true\n },\n \"endpointing\": {\n \"min_delay\": 0.05,\n \"max_delay\": 1.5\n },\n \"text_normalization\": {\n \"enabled\": false,\n \"price_verbosity\": \"formal\",\n \"shorthand_cents_extra\": [\n 123\n ]\n }\n },\n \"type\": \"static_prompt\",\n \"instructions\": \"\",\n \"built_in_tools\": {\n \"time_tool\": {\n \"default_timezone\": \"<string>\"\n },\n \"widgets\": {\n \"allowed\": []\n },\n \"forms\": {\n \"forms\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"required\": false,\n \"default_value\": \"<unknown>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"allow_other\": true,\n \"true_label\": \"<string>\",\n \"false_label\": \"<string>\",\n \"max_rating\": 123,\n \"validation\": \"<string>\",\n \"validation_message\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"title\": \"<string>\",\n \"submit_label\": \"Submit\"\n }\n ]\n },\n \"web_search\": {},\n \"retrieve_webpage\": {},\n \"continue_on_phone\": {\n \"agent_id\": \"<string>\",\n \"version\": 123,\n \"agent_number\": \"<string>\"\n },\n \"images\": {\n \"routes\": [\n {\n \"image_type\": \"<string>\",\n \"description\": \"<string>\",\n \"fields_schema\": {},\n \"tier\": \"<string>\"\n }\n ],\n \"default_tier\": \"fast\",\n \"tiers\": {\n \"fast\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n },\n \"frontier\": {\n \"model\": {\n \"parameters\": {\n \"azure_deployment\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 2\n },\n \"name\": \"gpt-4o\"\n },\n \"provider\": \"azure_openai\"\n }\n },\n \"max_escalations_per_conversation\": 3,\n \"max_analyses_per_conversation\": 20,\n \"allow_user_uploads\": true,\n \"floor_overrides\": {},\n \"pii_fields\": [\n \"<string>\"\n ],\n \"on_blocked\": \"refuse\"\n }\n },\n \"language\": {\n \"languages\": [\n \"<string>\"\n ]\n },\n \"allow_interruptions\": true,\n \"video_input\": false,\n \"screen_share_input\": false,\n \"max_tool_steps\": 2,\n \"channel_overrides\": {},\n \"channel_properties\": {}\n },\n \"version\": \"1\",\n \"metadata\": {},\n \"noise_cancellation\": {\n \"models\": [\n {\n \"model\": {\n \"name\": \"bvc\"\n },\n \"provider\": \"livekit\"\n }\n ]\n },\n \"custom_recording_locations\": [\n {\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"access_key\": \"<string>\",\n \"secret_access_key\": \"<string>\",\n \"provider\": \"s3\",\n \"file_type\": \"ogg\"\n }\n ],\n \"pre_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"post_conversation_workflow\": {\n \"type\": \"workflow\",\n \"workflow_id\": \"<string>\",\n \"workflow_version\": 123,\n \"initial_step\": \"<string>\",\n \"definition\": {},\n \"condition\": \"<string>\",\n \"reject_on_error\": false\n },\n \"scorecard_ids\": [\n \"<string>\"\n ],\n \"voicemail_detection\": {\n \"beep_detection_threshold\": 0.5,\n \"beep_detection_timeout\": 123,\n \"tool_call_overrides\": {\n \"beep_detection_threshold\": 0.9,\n \"beep_detection_timeout\": 10,\n \"name\": \"voicemail_detected\",\n \"description\": \"whenever you hear 'you have reached a voicemail'\"\n },\n \"play_message\": {\n \"message\": \"<string>\",\n \"generate\": false\n }\n },\n \"inactivity_nudge\": {\n \"timeout_seconds\": 30,\n \"nudge_interval_seconds\": 15,\n \"nudges\": [\n {\n \"text\": \"<string>\",\n \"type\": \"bot_initiates_static\"\n }\n ]\n }\n },\n \"instruction_builder_inputs\": {\n \"industry\": \"<string>\",\n \"purpose\": \"<string>\",\n \"personality\": [\n \"<string>\"\n ],\n \"conversation_flow\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"disallowed_topics\": \"<string>\",\n \"safety_rules\": [\n \"<string>\"\n ],\n \"enrichment_data\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 1,
"config": {
"version": "1",
"agent": {
"type": null,
"instructions": null,
"starting_message": null,
"tools": null,
"built_in_tools": null,
"language": null,
"stack": null,
"allow_interruptions": null,
"video_input": null,
"screen_share_input": null,
"max_tool_steps": null,
"channel_overrides": null,
"channel_properties": null
},
"metadata": {},
"noise_cancellation": {
"models": null
},
"custom_recording_locations": [],
"pre_conversation_workflow": {
"type": null,
"workflow_id": null,
"workflow_version": null,
"initial_step": null,
"definition": null,
"condition": null,
"reject_on_error": null
},
"post_conversation_workflow": {
"type": null,
"workflow_id": null,
"workflow_version": null,
"initial_step": null,
"definition": null,
"condition": null,
"reject_on_error": null
},
"scorecard_ids": [
"string"
],
"voicemail_detection": {
"beep_detection_threshold": null,
"beep_detection_timeout": null,
"tool_call_overrides": null,
"play_message": null
},
"inactivity_nudge": {
"timeout_seconds": 30,
"nudge_interval_seconds": 15,
"nudges": []
}
},
"published": false,
"instruction_builder_inputs": {},
"trained_instruction_builder_inputs": {},
"generation_timestamp": "2026-01-15T09:30:00Z",
"manually_edited": false,
"is_updated": false,
"cache_fingerprints": [
"string"
],
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"created_by": "user:3fa85f64-5717-4562-b3fc-2c963f66afa6",
"modified_by": "user:3fa85f64-5717-4562-b3fc-2c963f66afa6"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
