Create agent draft
curl --request POST \
--url https://api.threetone.in/v1/convai/agents/{agent_id}/drafts \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"conversation_config": {
"asr": {
"model_id": "<string>",
"recognition": {
"mode": "fixed",
"language": "<string>"
},
"task": "transcribe",
"keyterms": [
"<string>"
],
"options": {
"schema_id": "cartesia_ink_2_asr_options_v1",
"turn_start_threshold": 0.7,
"turn_eager_end_threshold": 0.44999999999999996,
"turn_end_threshold": 0.275,
"turn_end_timeout_ms": 5920
}
},
"turn": {
"interruption_ignore_term_languages": [],
"interruption_ignore_terms": [],
"merge_with_default_ignore_terms": false,
"mode": "turn",
"retranscribe_on_turn_timeout": false,
"silence_end_call_timeout": -1,
"soft_timeout_config": {
"message": "Hhmmmm...yeah.",
"timeout_seconds": -1
},
"speculative_turn": false,
"spelling_patience": "auto",
"transcribe_on_disabled_interruptions": false,
"turn_eagerness": "normal",
"turn_model": "turn_v3",
"turn_timeout": 7
},
"tts": {
"model_id": "<string>",
"voice_id": "<string>",
"pronunciation_dictionary_locators": [
{
"pronunciation_dictionary_id": "<string>",
"version_id": "<string>"
}
],
"enable_phoneme_tags": false,
"options": {
"schema_id": "cartesia_sonic_tts_options_v1",
"volume": 1.25,
"duration_seconds": 1,
"max_buffer_delay_ms": 1,
"add_timestamps": true,
"add_phoneme_timestamps": true,
"use_normalized_timestamps": true
}
},
"conversation": {
"client_events": [
"audio",
"interruption"
],
"max_duration_seconds": 600
},
"language_presets": {},
"vad": {
"background_voice_detection": false
},
"agent": {
"disable_first_message_interruptions": false,
"first_message": "Hello, how can I help you today?",
"language": "en"
}
},
"platform_settings": {
"evaluation": {
"criteria": [
{
"conversation_goal_prompt": "Determine whether the agent fully resolved the user's issue.",
"id": "criterion_binary_001",
"max_score": 100,
"name": "Issue resolved",
"scope": "conversation",
"scoring_mode": "binary",
"use_knowledge_base": false
}
]
},
"widget": {
"custom_avatar_path": "https://example.com/avatar.png",
"language_selector": false
},
"data_collection": {},
"data_collection_scopes": {},
"analysis_items": {
"evaluation_criteria": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"additional_version_ids": [
"<string>"
],
"scope": "conversation",
"weight": 123
}
],
"data_collection": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"scope": "conversation"
}
]
},
"overrides": {
"custom_llm_extra_body": true,
"enable_conversation_initiation_client_data_from_webhook": true,
"enable_procedure_ids_from_client": true,
"enable_starting_workflow_node_id_from_client": true
},
"workspace_overrides": {
"conversation_initiation_client_data_webhook": {
"request_headers": {
"Content-Type": "application/json"
},
"url": "https://example.com/webhook"
},
"webhooks": {
"post_call_webhook_id": "<string>",
"events": [],
"transcript_format": "json"
}
},
"testing": {
"attached_tests": [
{
"test_id": "test_123",
"workflow_node_id": "node_abc"
},
{
"test_id": "test_456"
}
]
},
"archived": false,
"guardrails": {
"version": "1",
"focus": {
"is_enabled": false
},
"prompt_injection": {
"is_enabled": false
},
"content": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": false,
"threshold": 0.3
},
"violence": {
"is_enabled": false,
"threshold": 0.3
},
"harassment": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm": {
"is_enabled": false,
"threshold": 0.3
},
"profanity": {
"is_enabled": false,
"threshold": 0.3
},
"religion_or_politics": {
"is_enabled": false,
"threshold": 0.3
},
"medical_and_legal_information": {
"is_enabled": false,
"threshold": 0.3
}
},
"trigger_action": {
"type": "end_call"
}
},
"moderation": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": false,
"threshold": 0.3
},
"violence": {
"is_enabled": false,
"threshold": 0.3
},
"violence_graphic": {
"is_enabled": false,
"threshold": 0.3
},
"harassment": {
"is_enabled": false,
"threshold": 0.3
},
"harassment_threatening": {
"is_enabled": false,
"threshold": 0.3
},
"hate": {
"is_enabled": false,
"threshold": 0.3
},
"hate_threatening": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm_instructions": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm_intent": {
"is_enabled": false,
"threshold": 0.3
},
"sexual_minors": {
"is_enabled": false,
"threshold": 0.3
}
}
},
"custom": {
"config": {
"configs": [
{
"name": "<string>",
"prompt": "<string>",
"is_enabled": false,
"execution_mode": "streaming",
"model": "google/gemini-3.1-flash-lite",
"history_message_count": 0,
"history_include_tool_calls": false,
"trigger_action": {
"type": "end_call"
},
"evaluate_full_response_only": false
}
]
}
}
},
"summary_language": "<string>",
"auto_translate_transcript_to_app_language": true,
"auth": {
"allowlist": [
{
"hostname": "https://example.com"
}
],
"enable_auth": true,
"require_origin_header": true,
"shareable_token": "1234567890"
},
"call_limits": {
"agent_concurrency_limit": -1,
"bursting_enabled": true,
"daily_limit": 100000
},
"queueing_config": {
"enabled": false,
"wait_timeout_seconds": 180
},
"privacy": {
"apply_to_existing_conversations": false,
"delete_audio": false,
"delete_transcript_and_pii": false,
"record_voice": true,
"retention_days": -1,
"zero_retention_mode": false
},
"trust_context": "unknown",
"analysis_llm": "gpt-6-luna",
"topic_discovery": {},
"sentiment_analysis": {},
"alerting": {
"monitor_configs": {},
"auto_resolve_after_inactive_minutes": 2,
"notifiers": [
{
"webhook_id": "<string>",
"type": "webhook"
}
]
}
},
"workflow": {
"edges": {},
"nodes": {},
"prevent_subagent_loops": false
},
"name": "<string>"
}
EOFimport requests
url = "https://api.threetone.in/v1/convai/agents/{agent_id}/drafts"
payload = {
"conversation_config": {
"asr": {
"model_id": "<string>",
"recognition": {
"mode": "fixed",
"language": "<string>"
},
"task": "transcribe",
"keyterms": ["<string>"],
"options": {
"schema_id": "cartesia_ink_2_asr_options_v1",
"turn_start_threshold": 0.7,
"turn_eager_end_threshold": 0.44999999999999996,
"turn_end_threshold": 0.275,
"turn_end_timeout_ms": 5920
}
},
"turn": {
"interruption_ignore_term_languages": [],
"interruption_ignore_terms": [],
"merge_with_default_ignore_terms": False,
"mode": "turn",
"retranscribe_on_turn_timeout": False,
"silence_end_call_timeout": -1,
"soft_timeout_config": {
"message": "Hhmmmm...yeah.",
"timeout_seconds": -1
},
"speculative_turn": False,
"spelling_patience": "auto",
"transcribe_on_disabled_interruptions": False,
"turn_eagerness": "normal",
"turn_model": "turn_v3",
"turn_timeout": 7
},
"tts": {
"model_id": "<string>",
"voice_id": "<string>",
"pronunciation_dictionary_locators": [
{
"pronunciation_dictionary_id": "<string>",
"version_id": "<string>"
}
],
"enable_phoneme_tags": False,
"options": {
"schema_id": "cartesia_sonic_tts_options_v1",
"volume": 1.25,
"duration_seconds": 1,
"max_buffer_delay_ms": 1,
"add_timestamps": True,
"add_phoneme_timestamps": True,
"use_normalized_timestamps": True
}
},
"conversation": {
"client_events": ["audio", "interruption"],
"max_duration_seconds": 600
},
"language_presets": {},
"vad": { "background_voice_detection": False },
"agent": {
"disable_first_message_interruptions": False,
"first_message": "Hello, how can I help you today?",
"language": "en"
}
},
"platform_settings": {
"evaluation": { "criteria": [
{
"conversation_goal_prompt": "Determine whether the agent fully resolved the user's issue.",
"id": "criterion_binary_001",
"max_score": 100,
"name": "Issue resolved",
"scope": "conversation",
"scoring_mode": "binary",
"use_knowledge_base": False
}
] },
"widget": {
"custom_avatar_path": "https://example.com/avatar.png",
"language_selector": False
},
"data_collection": {},
"data_collection_scopes": {},
"analysis_items": {
"evaluation_criteria": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"additional_version_ids": ["<string>"],
"scope": "conversation",
"weight": 123
}
],
"data_collection": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"scope": "conversation"
}
]
},
"overrides": {
"custom_llm_extra_body": True,
"enable_conversation_initiation_client_data_from_webhook": True,
"enable_procedure_ids_from_client": True,
"enable_starting_workflow_node_id_from_client": True
},
"workspace_overrides": {
"conversation_initiation_client_data_webhook": {
"request_headers": { "Content-Type": "application/json" },
"url": "https://example.com/webhook"
},
"webhooks": {
"post_call_webhook_id": "<string>",
"events": [],
"transcript_format": "json"
}
},
"testing": { "attached_tests": [{
"test_id": "test_123",
"workflow_node_id": "node_abc"
}, { "test_id": "test_456" }] },
"archived": False,
"guardrails": {
"version": "1",
"focus": { "is_enabled": False },
"prompt_injection": { "is_enabled": False },
"content": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": False,
"threshold": 0.3
},
"violence": {
"is_enabled": False,
"threshold": 0.3
},
"harassment": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm": {
"is_enabled": False,
"threshold": 0.3
},
"profanity": {
"is_enabled": False,
"threshold": 0.3
},
"religion_or_politics": {
"is_enabled": False,
"threshold": 0.3
},
"medical_and_legal_information": {
"is_enabled": False,
"threshold": 0.3
}
},
"trigger_action": { "type": "end_call" }
},
"moderation": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": False,
"threshold": 0.3
},
"violence": {
"is_enabled": False,
"threshold": 0.3
},
"violence_graphic": {
"is_enabled": False,
"threshold": 0.3
},
"harassment": {
"is_enabled": False,
"threshold": 0.3
},
"harassment_threatening": {
"is_enabled": False,
"threshold": 0.3
},
"hate": {
"is_enabled": False,
"threshold": 0.3
},
"hate_threatening": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm_instructions": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm_intent": {
"is_enabled": False,
"threshold": 0.3
},
"sexual_minors": {
"is_enabled": False,
"threshold": 0.3
}
}
},
"custom": { "config": { "configs": [
{
"name": "<string>",
"prompt": "<string>",
"is_enabled": False,
"execution_mode": "streaming",
"model": "google/gemini-3.1-flash-lite",
"history_message_count": 0,
"history_include_tool_calls": False,
"trigger_action": { "type": "end_call" },
"evaluate_full_response_only": False
}
] } }
},
"summary_language": "<string>",
"auto_translate_transcript_to_app_language": True,
"auth": {
"allowlist": [{ "hostname": "https://example.com" }],
"enable_auth": True,
"require_origin_header": True,
"shareable_token": "1234567890"
},
"call_limits": {
"agent_concurrency_limit": -1,
"bursting_enabled": True,
"daily_limit": 100000
},
"queueing_config": {
"enabled": False,
"wait_timeout_seconds": 180
},
"privacy": {
"apply_to_existing_conversations": False,
"delete_audio": False,
"delete_transcript_and_pii": False,
"record_voice": True,
"retention_days": -1,
"zero_retention_mode": False
},
"trust_context": "unknown",
"analysis_llm": "gpt-6-luna",
"topic_discovery": {},
"sentiment_analysis": {},
"alerting": {
"monitor_configs": {},
"auto_resolve_after_inactive_minutes": 2,
"notifiers": [
{
"webhook_id": "<string>",
"type": "webhook"
}
]
}
},
"workflow": {
"edges": {},
"nodes": {},
"prevent_subagent_loops": False
},
"name": "<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({
conversation_config: {
asr: {
model_id: '<string>',
recognition: {mode: 'fixed', language: '<string>'},
task: 'transcribe',
keyterms: ['<string>'],
options: {
schema_id: 'cartesia_ink_2_asr_options_v1',
turn_start_threshold: 0.7,
turn_eager_end_threshold: 0.44999999999999996,
turn_end_threshold: 0.275,
turn_end_timeout_ms: 5920
}
},
turn: {
interruption_ignore_term_languages: [],
interruption_ignore_terms: [],
merge_with_default_ignore_terms: false,
mode: 'turn',
retranscribe_on_turn_timeout: false,
silence_end_call_timeout: -1,
soft_timeout_config: {message: 'Hhmmmm...yeah.', timeout_seconds: -1},
speculative_turn: false,
spelling_patience: 'auto',
transcribe_on_disabled_interruptions: false,
turn_eagerness: 'normal',
turn_model: 'turn_v3',
turn_timeout: 7
},
tts: {
model_id: '<string>',
voice_id: '<string>',
pronunciation_dictionary_locators: [{pronunciation_dictionary_id: '<string>', version_id: '<string>'}],
enable_phoneme_tags: false,
options: {
schema_id: 'cartesia_sonic_tts_options_v1',
volume: 1.25,
duration_seconds: 1,
max_buffer_delay_ms: 1,
add_timestamps: true,
add_phoneme_timestamps: true,
use_normalized_timestamps: true
}
},
conversation: {client_events: ['audio', 'interruption'], max_duration_seconds: 600},
language_presets: {},
vad: {background_voice_detection: false},
agent: {
disable_first_message_interruptions: false,
first_message: 'Hello, how can I help you today?',
language: 'en'
}
},
platform_settings: {
evaluation: {
criteria: [
{
conversation_goal_prompt: 'Determine whether the agent fully resolved the user\'s issue.',
id: 'criterion_binary_001',
max_score: 100,
name: 'Issue resolved',
scope: 'conversation',
scoring_mode: 'binary',
use_knowledge_base: false
}
]
},
widget: {custom_avatar_path: 'https://example.com/avatar.png', language_selector: false},
data_collection: {},
data_collection_scopes: {},
analysis_items: {
evaluation_criteria: [
{
source: 'user',
analysis_item_id: '<string>',
version_id: '<string>',
additional_version_ids: ['<string>'],
scope: 'conversation',
weight: 123
}
],
data_collection: [
{
source: 'user',
analysis_item_id: '<string>',
version_id: '<string>',
scope: 'conversation'
}
]
},
overrides: {
custom_llm_extra_body: true,
enable_conversation_initiation_client_data_from_webhook: true,
enable_procedure_ids_from_client: true,
enable_starting_workflow_node_id_from_client: true
},
workspace_overrides: {
conversation_initiation_client_data_webhook: {
request_headers: {'Content-Type': 'application/json'},
url: 'https://example.com/webhook'
},
webhooks: {post_call_webhook_id: '<string>', events: [], transcript_format: 'json'}
},
testing: {
attached_tests: [{test_id: 'test_123', workflow_node_id: 'node_abc'}, {test_id: 'test_456'}]
},
archived: false,
guardrails: {
version: '1',
focus: {is_enabled: false},
prompt_injection: {is_enabled: false},
content: {
execution_mode: 'streaming',
config: {
sexual: {is_enabled: false, threshold: 0.3},
violence: {is_enabled: false, threshold: 0.3},
harassment: {is_enabled: false, threshold: 0.3},
self_harm: {is_enabled: false, threshold: 0.3},
profanity: {is_enabled: false, threshold: 0.3},
religion_or_politics: {is_enabled: false, threshold: 0.3},
medical_and_legal_information: {is_enabled: false, threshold: 0.3}
},
trigger_action: {type: 'end_call'}
},
moderation: {
execution_mode: 'streaming',
config: {
sexual: {is_enabled: false, threshold: 0.3},
violence: {is_enabled: false, threshold: 0.3},
violence_graphic: {is_enabled: false, threshold: 0.3},
harassment: {is_enabled: false, threshold: 0.3},
harassment_threatening: {is_enabled: false, threshold: 0.3},
hate: {is_enabled: false, threshold: 0.3},
hate_threatening: {is_enabled: false, threshold: 0.3},
self_harm_instructions: {is_enabled: false, threshold: 0.3},
self_harm: {is_enabled: false, threshold: 0.3},
self_harm_intent: {is_enabled: false, threshold: 0.3},
sexual_minors: {is_enabled: false, threshold: 0.3}
}
},
custom: {
config: {
configs: [
{
name: '<string>',
prompt: '<string>',
is_enabled: false,
execution_mode: 'streaming',
model: 'google/gemini-3.1-flash-lite',
history_message_count: 0,
history_include_tool_calls: false,
trigger_action: {type: 'end_call'},
evaluate_full_response_only: false
}
]
}
}
},
summary_language: '<string>',
auto_translate_transcript_to_app_language: true,
auth: {
allowlist: [{hostname: 'https://example.com'}],
enable_auth: true,
require_origin_header: true,
shareable_token: '1234567890'
},
call_limits: {agent_concurrency_limit: -1, bursting_enabled: true, daily_limit: 100000},
queueing_config: {enabled: false, wait_timeout_seconds: 180},
privacy: {
apply_to_existing_conversations: false,
delete_audio: false,
delete_transcript_and_pii: false,
record_voice: true,
retention_days: -1,
zero_retention_mode: false
},
trust_context: 'unknown',
analysis_llm: 'gpt-6-luna',
topic_discovery: {},
sentiment_analysis: {},
alerting: {
monitor_configs: {},
auto_resolve_after_inactive_minutes: 2,
notifiers: [{webhook_id: '<string>', type: 'webhook'}]
}
},
workflow: {edges: {}, nodes: {}, prevent_subagent_loops: false},
name: '<string>'
})
};
fetch('https://api.threetone.in/v1/convai/agents/{agent_id}/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": {
"status": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Publishing
Create agent draft
Create a new draft for an agent
POST
/
v1
/
convai
/
agents
/
{agent_id}
/
drafts
Create agent draft
curl --request POST \
--url https://api.threetone.in/v1/convai/agents/{agent_id}/drafts \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"conversation_config": {
"asr": {
"model_id": "<string>",
"recognition": {
"mode": "fixed",
"language": "<string>"
},
"task": "transcribe",
"keyterms": [
"<string>"
],
"options": {
"schema_id": "cartesia_ink_2_asr_options_v1",
"turn_start_threshold": 0.7,
"turn_eager_end_threshold": 0.44999999999999996,
"turn_end_threshold": 0.275,
"turn_end_timeout_ms": 5920
}
},
"turn": {
"interruption_ignore_term_languages": [],
"interruption_ignore_terms": [],
"merge_with_default_ignore_terms": false,
"mode": "turn",
"retranscribe_on_turn_timeout": false,
"silence_end_call_timeout": -1,
"soft_timeout_config": {
"message": "Hhmmmm...yeah.",
"timeout_seconds": -1
},
"speculative_turn": false,
"spelling_patience": "auto",
"transcribe_on_disabled_interruptions": false,
"turn_eagerness": "normal",
"turn_model": "turn_v3",
"turn_timeout": 7
},
"tts": {
"model_id": "<string>",
"voice_id": "<string>",
"pronunciation_dictionary_locators": [
{
"pronunciation_dictionary_id": "<string>",
"version_id": "<string>"
}
],
"enable_phoneme_tags": false,
"options": {
"schema_id": "cartesia_sonic_tts_options_v1",
"volume": 1.25,
"duration_seconds": 1,
"max_buffer_delay_ms": 1,
"add_timestamps": true,
"add_phoneme_timestamps": true,
"use_normalized_timestamps": true
}
},
"conversation": {
"client_events": [
"audio",
"interruption"
],
"max_duration_seconds": 600
},
"language_presets": {},
"vad": {
"background_voice_detection": false
},
"agent": {
"disable_first_message_interruptions": false,
"first_message": "Hello, how can I help you today?",
"language": "en"
}
},
"platform_settings": {
"evaluation": {
"criteria": [
{
"conversation_goal_prompt": "Determine whether the agent fully resolved the user's issue.",
"id": "criterion_binary_001",
"max_score": 100,
"name": "Issue resolved",
"scope": "conversation",
"scoring_mode": "binary",
"use_knowledge_base": false
}
]
},
"widget": {
"custom_avatar_path": "https://example.com/avatar.png",
"language_selector": false
},
"data_collection": {},
"data_collection_scopes": {},
"analysis_items": {
"evaluation_criteria": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"additional_version_ids": [
"<string>"
],
"scope": "conversation",
"weight": 123
}
],
"data_collection": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"scope": "conversation"
}
]
},
"overrides": {
"custom_llm_extra_body": true,
"enable_conversation_initiation_client_data_from_webhook": true,
"enable_procedure_ids_from_client": true,
"enable_starting_workflow_node_id_from_client": true
},
"workspace_overrides": {
"conversation_initiation_client_data_webhook": {
"request_headers": {
"Content-Type": "application/json"
},
"url": "https://example.com/webhook"
},
"webhooks": {
"post_call_webhook_id": "<string>",
"events": [],
"transcript_format": "json"
}
},
"testing": {
"attached_tests": [
{
"test_id": "test_123",
"workflow_node_id": "node_abc"
},
{
"test_id": "test_456"
}
]
},
"archived": false,
"guardrails": {
"version": "1",
"focus": {
"is_enabled": false
},
"prompt_injection": {
"is_enabled": false
},
"content": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": false,
"threshold": 0.3
},
"violence": {
"is_enabled": false,
"threshold": 0.3
},
"harassment": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm": {
"is_enabled": false,
"threshold": 0.3
},
"profanity": {
"is_enabled": false,
"threshold": 0.3
},
"religion_or_politics": {
"is_enabled": false,
"threshold": 0.3
},
"medical_and_legal_information": {
"is_enabled": false,
"threshold": 0.3
}
},
"trigger_action": {
"type": "end_call"
}
},
"moderation": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": false,
"threshold": 0.3
},
"violence": {
"is_enabled": false,
"threshold": 0.3
},
"violence_graphic": {
"is_enabled": false,
"threshold": 0.3
},
"harassment": {
"is_enabled": false,
"threshold": 0.3
},
"harassment_threatening": {
"is_enabled": false,
"threshold": 0.3
},
"hate": {
"is_enabled": false,
"threshold": 0.3
},
"hate_threatening": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm_instructions": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm": {
"is_enabled": false,
"threshold": 0.3
},
"self_harm_intent": {
"is_enabled": false,
"threshold": 0.3
},
"sexual_minors": {
"is_enabled": false,
"threshold": 0.3
}
}
},
"custom": {
"config": {
"configs": [
{
"name": "<string>",
"prompt": "<string>",
"is_enabled": false,
"execution_mode": "streaming",
"model": "google/gemini-3.1-flash-lite",
"history_message_count": 0,
"history_include_tool_calls": false,
"trigger_action": {
"type": "end_call"
},
"evaluate_full_response_only": false
}
]
}
}
},
"summary_language": "<string>",
"auto_translate_transcript_to_app_language": true,
"auth": {
"allowlist": [
{
"hostname": "https://example.com"
}
],
"enable_auth": true,
"require_origin_header": true,
"shareable_token": "1234567890"
},
"call_limits": {
"agent_concurrency_limit": -1,
"bursting_enabled": true,
"daily_limit": 100000
},
"queueing_config": {
"enabled": false,
"wait_timeout_seconds": 180
},
"privacy": {
"apply_to_existing_conversations": false,
"delete_audio": false,
"delete_transcript_and_pii": false,
"record_voice": true,
"retention_days": -1,
"zero_retention_mode": false
},
"trust_context": "unknown",
"analysis_llm": "gpt-6-luna",
"topic_discovery": {},
"sentiment_analysis": {},
"alerting": {
"monitor_configs": {},
"auto_resolve_after_inactive_minutes": 2,
"notifiers": [
{
"webhook_id": "<string>",
"type": "webhook"
}
]
}
},
"workflow": {
"edges": {},
"nodes": {},
"prevent_subagent_loops": false
},
"name": "<string>"
}
EOFimport requests
url = "https://api.threetone.in/v1/convai/agents/{agent_id}/drafts"
payload = {
"conversation_config": {
"asr": {
"model_id": "<string>",
"recognition": {
"mode": "fixed",
"language": "<string>"
},
"task": "transcribe",
"keyterms": ["<string>"],
"options": {
"schema_id": "cartesia_ink_2_asr_options_v1",
"turn_start_threshold": 0.7,
"turn_eager_end_threshold": 0.44999999999999996,
"turn_end_threshold": 0.275,
"turn_end_timeout_ms": 5920
}
},
"turn": {
"interruption_ignore_term_languages": [],
"interruption_ignore_terms": [],
"merge_with_default_ignore_terms": False,
"mode": "turn",
"retranscribe_on_turn_timeout": False,
"silence_end_call_timeout": -1,
"soft_timeout_config": {
"message": "Hhmmmm...yeah.",
"timeout_seconds": -1
},
"speculative_turn": False,
"spelling_patience": "auto",
"transcribe_on_disabled_interruptions": False,
"turn_eagerness": "normal",
"turn_model": "turn_v3",
"turn_timeout": 7
},
"tts": {
"model_id": "<string>",
"voice_id": "<string>",
"pronunciation_dictionary_locators": [
{
"pronunciation_dictionary_id": "<string>",
"version_id": "<string>"
}
],
"enable_phoneme_tags": False,
"options": {
"schema_id": "cartesia_sonic_tts_options_v1",
"volume": 1.25,
"duration_seconds": 1,
"max_buffer_delay_ms": 1,
"add_timestamps": True,
"add_phoneme_timestamps": True,
"use_normalized_timestamps": True
}
},
"conversation": {
"client_events": ["audio", "interruption"],
"max_duration_seconds": 600
},
"language_presets": {},
"vad": { "background_voice_detection": False },
"agent": {
"disable_first_message_interruptions": False,
"first_message": "Hello, how can I help you today?",
"language": "en"
}
},
"platform_settings": {
"evaluation": { "criteria": [
{
"conversation_goal_prompt": "Determine whether the agent fully resolved the user's issue.",
"id": "criterion_binary_001",
"max_score": 100,
"name": "Issue resolved",
"scope": "conversation",
"scoring_mode": "binary",
"use_knowledge_base": False
}
] },
"widget": {
"custom_avatar_path": "https://example.com/avatar.png",
"language_selector": False
},
"data_collection": {},
"data_collection_scopes": {},
"analysis_items": {
"evaluation_criteria": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"additional_version_ids": ["<string>"],
"scope": "conversation",
"weight": 123
}
],
"data_collection": [
{
"source": "user",
"analysis_item_id": "<string>",
"version_id": "<string>",
"scope": "conversation"
}
]
},
"overrides": {
"custom_llm_extra_body": True,
"enable_conversation_initiation_client_data_from_webhook": True,
"enable_procedure_ids_from_client": True,
"enable_starting_workflow_node_id_from_client": True
},
"workspace_overrides": {
"conversation_initiation_client_data_webhook": {
"request_headers": { "Content-Type": "application/json" },
"url": "https://example.com/webhook"
},
"webhooks": {
"post_call_webhook_id": "<string>",
"events": [],
"transcript_format": "json"
}
},
"testing": { "attached_tests": [{
"test_id": "test_123",
"workflow_node_id": "node_abc"
}, { "test_id": "test_456" }] },
"archived": False,
"guardrails": {
"version": "1",
"focus": { "is_enabled": False },
"prompt_injection": { "is_enabled": False },
"content": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": False,
"threshold": 0.3
},
"violence": {
"is_enabled": False,
"threshold": 0.3
},
"harassment": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm": {
"is_enabled": False,
"threshold": 0.3
},
"profanity": {
"is_enabled": False,
"threshold": 0.3
},
"religion_or_politics": {
"is_enabled": False,
"threshold": 0.3
},
"medical_and_legal_information": {
"is_enabled": False,
"threshold": 0.3
}
},
"trigger_action": { "type": "end_call" }
},
"moderation": {
"execution_mode": "streaming",
"config": {
"sexual": {
"is_enabled": False,
"threshold": 0.3
},
"violence": {
"is_enabled": False,
"threshold": 0.3
},
"violence_graphic": {
"is_enabled": False,
"threshold": 0.3
},
"harassment": {
"is_enabled": False,
"threshold": 0.3
},
"harassment_threatening": {
"is_enabled": False,
"threshold": 0.3
},
"hate": {
"is_enabled": False,
"threshold": 0.3
},
"hate_threatening": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm_instructions": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm": {
"is_enabled": False,
"threshold": 0.3
},
"self_harm_intent": {
"is_enabled": False,
"threshold": 0.3
},
"sexual_minors": {
"is_enabled": False,
"threshold": 0.3
}
}
},
"custom": { "config": { "configs": [
{
"name": "<string>",
"prompt": "<string>",
"is_enabled": False,
"execution_mode": "streaming",
"model": "google/gemini-3.1-flash-lite",
"history_message_count": 0,
"history_include_tool_calls": False,
"trigger_action": { "type": "end_call" },
"evaluate_full_response_only": False
}
] } }
},
"summary_language": "<string>",
"auto_translate_transcript_to_app_language": True,
"auth": {
"allowlist": [{ "hostname": "https://example.com" }],
"enable_auth": True,
"require_origin_header": True,
"shareable_token": "1234567890"
},
"call_limits": {
"agent_concurrency_limit": -1,
"bursting_enabled": True,
"daily_limit": 100000
},
"queueing_config": {
"enabled": False,
"wait_timeout_seconds": 180
},
"privacy": {
"apply_to_existing_conversations": False,
"delete_audio": False,
"delete_transcript_and_pii": False,
"record_voice": True,
"retention_days": -1,
"zero_retention_mode": False
},
"trust_context": "unknown",
"analysis_llm": "gpt-6-luna",
"topic_discovery": {},
"sentiment_analysis": {},
"alerting": {
"monitor_configs": {},
"auto_resolve_after_inactive_minutes": 2,
"notifiers": [
{
"webhook_id": "<string>",
"type": "webhook"
}
]
}
},
"workflow": {
"edges": {},
"nodes": {},
"prevent_subagent_loops": False
},
"name": "<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({
conversation_config: {
asr: {
model_id: '<string>',
recognition: {mode: 'fixed', language: '<string>'},
task: 'transcribe',
keyterms: ['<string>'],
options: {
schema_id: 'cartesia_ink_2_asr_options_v1',
turn_start_threshold: 0.7,
turn_eager_end_threshold: 0.44999999999999996,
turn_end_threshold: 0.275,
turn_end_timeout_ms: 5920
}
},
turn: {
interruption_ignore_term_languages: [],
interruption_ignore_terms: [],
merge_with_default_ignore_terms: false,
mode: 'turn',
retranscribe_on_turn_timeout: false,
silence_end_call_timeout: -1,
soft_timeout_config: {message: 'Hhmmmm...yeah.', timeout_seconds: -1},
speculative_turn: false,
spelling_patience: 'auto',
transcribe_on_disabled_interruptions: false,
turn_eagerness: 'normal',
turn_model: 'turn_v3',
turn_timeout: 7
},
tts: {
model_id: '<string>',
voice_id: '<string>',
pronunciation_dictionary_locators: [{pronunciation_dictionary_id: '<string>', version_id: '<string>'}],
enable_phoneme_tags: false,
options: {
schema_id: 'cartesia_sonic_tts_options_v1',
volume: 1.25,
duration_seconds: 1,
max_buffer_delay_ms: 1,
add_timestamps: true,
add_phoneme_timestamps: true,
use_normalized_timestamps: true
}
},
conversation: {client_events: ['audio', 'interruption'], max_duration_seconds: 600},
language_presets: {},
vad: {background_voice_detection: false},
agent: {
disable_first_message_interruptions: false,
first_message: 'Hello, how can I help you today?',
language: 'en'
}
},
platform_settings: {
evaluation: {
criteria: [
{
conversation_goal_prompt: 'Determine whether the agent fully resolved the user\'s issue.',
id: 'criterion_binary_001',
max_score: 100,
name: 'Issue resolved',
scope: 'conversation',
scoring_mode: 'binary',
use_knowledge_base: false
}
]
},
widget: {custom_avatar_path: 'https://example.com/avatar.png', language_selector: false},
data_collection: {},
data_collection_scopes: {},
analysis_items: {
evaluation_criteria: [
{
source: 'user',
analysis_item_id: '<string>',
version_id: '<string>',
additional_version_ids: ['<string>'],
scope: 'conversation',
weight: 123
}
],
data_collection: [
{
source: 'user',
analysis_item_id: '<string>',
version_id: '<string>',
scope: 'conversation'
}
]
},
overrides: {
custom_llm_extra_body: true,
enable_conversation_initiation_client_data_from_webhook: true,
enable_procedure_ids_from_client: true,
enable_starting_workflow_node_id_from_client: true
},
workspace_overrides: {
conversation_initiation_client_data_webhook: {
request_headers: {'Content-Type': 'application/json'},
url: 'https://example.com/webhook'
},
webhooks: {post_call_webhook_id: '<string>', events: [], transcript_format: 'json'}
},
testing: {
attached_tests: [{test_id: 'test_123', workflow_node_id: 'node_abc'}, {test_id: 'test_456'}]
},
archived: false,
guardrails: {
version: '1',
focus: {is_enabled: false},
prompt_injection: {is_enabled: false},
content: {
execution_mode: 'streaming',
config: {
sexual: {is_enabled: false, threshold: 0.3},
violence: {is_enabled: false, threshold: 0.3},
harassment: {is_enabled: false, threshold: 0.3},
self_harm: {is_enabled: false, threshold: 0.3},
profanity: {is_enabled: false, threshold: 0.3},
religion_or_politics: {is_enabled: false, threshold: 0.3},
medical_and_legal_information: {is_enabled: false, threshold: 0.3}
},
trigger_action: {type: 'end_call'}
},
moderation: {
execution_mode: 'streaming',
config: {
sexual: {is_enabled: false, threshold: 0.3},
violence: {is_enabled: false, threshold: 0.3},
violence_graphic: {is_enabled: false, threshold: 0.3},
harassment: {is_enabled: false, threshold: 0.3},
harassment_threatening: {is_enabled: false, threshold: 0.3},
hate: {is_enabled: false, threshold: 0.3},
hate_threatening: {is_enabled: false, threshold: 0.3},
self_harm_instructions: {is_enabled: false, threshold: 0.3},
self_harm: {is_enabled: false, threshold: 0.3},
self_harm_intent: {is_enabled: false, threshold: 0.3},
sexual_minors: {is_enabled: false, threshold: 0.3}
}
},
custom: {
config: {
configs: [
{
name: '<string>',
prompt: '<string>',
is_enabled: false,
execution_mode: 'streaming',
model: 'google/gemini-3.1-flash-lite',
history_message_count: 0,
history_include_tool_calls: false,
trigger_action: {type: 'end_call'},
evaluate_full_response_only: false
}
]
}
}
},
summary_language: '<string>',
auto_translate_transcript_to_app_language: true,
auth: {
allowlist: [{hostname: 'https://example.com'}],
enable_auth: true,
require_origin_header: true,
shareable_token: '1234567890'
},
call_limits: {agent_concurrency_limit: -1, bursting_enabled: true, daily_limit: 100000},
queueing_config: {enabled: false, wait_timeout_seconds: 180},
privacy: {
apply_to_existing_conversations: false,
delete_audio: false,
delete_transcript_and_pii: false,
record_voice: true,
retention_days: -1,
zero_retention_mode: false
},
trust_context: 'unknown',
analysis_llm: 'gpt-6-luna',
topic_discovery: {},
sentiment_analysis: {},
alerting: {
monitor_configs: {},
auto_resolve_after_inactive_minutes: 2,
notifiers: [{webhook_id: '<string>', type: 'webhook'}]
}
},
workflow: {edges: {}, nodes: {}, prevent_subagent_loops: false},
name: '<string>'
})
};
fetch('https://api.threetone.in/v1/convai/agents/{agent_id}/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": {
"status": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Headers
Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.
Path Parameters
The id of an agent. This is returned on agent creation.
Example:
"agent_3701k3ttaq12ewp8b7qv5rfyszkz"
Query Parameters
The ID of the agent branch to use
Example:
"agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
Body
application/json
Complete conversation config for the draft
Show child attributes
Show child attributes
Complete platform settings for the draft
Show child attributes
Show child attributes
Workflow for the draft
Show child attributes
Show child attributes
Name for the draft
Tags to help classify and filter the agent
Example:
[
"Customer Support",
"Technical Help",
"Three"
]
Response
Successful Response