Update scenario
const url = 'https://example.com/v1/scenario/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"constructor","name":"example","template":"example","fix_communication_ttl":1,"is_shared_for_copy":true,"constructor":{"bricks":{"audio":{"v1":[{"id":"example","description":"example","properties":{"play_mode":"example","audios":[{"mode":"example","tts_properties":{"text":"example"},"file_properties":{"url":"example"}}],"tts_general":{"language":"example","voice":"example","engine":"example","speed":1,"model":"example"}},"outputs":[{"type":"example","description":"example"}]}]},"audio_file":{"v1":[{"id":"example","description":"example","properties":{"url":"example"},"outputs":[{"type":"example","description":"example"}]}]},"audio_tts":{"v1":[{"id":"example","description":"example","properties":{"text":"example","language":"example","voice":"example","engine":"example","model":"example"},"outputs":[{"type":"example","description":"example"}]}]},"sms":{"v1":[{"id":"example","description":"example","properties":{"to":"example","text":"example"},"outputs":[{"type":"example","description":"example"}]}]},"goal":{"v1":[{"id":"example","description":"example","properties":{"goal":"example"},"outputs":[{"type":"example","description":"example"}]}]},"end_call":{"v1":[{"id":"example","description":"example","properties":{"signal":"example"},"outputs":[{"type":"example","description":"example"}]}]},"assignment":{"v1":[{"id":"example","description":"example","properties":{"variables":[{"name":"example","value":"example"}]},"outputs":[{"type":"example","description":"example"}]}]},"increment":{"v1":[{"id":"example","description":"example","properties":{"variables":[{"variable":"example"}]},"outputs":[{"type":"example","description":"example"}]}]},"condition_group":{"v1":[{"id":"example","description":"example","properties":{"condition":{"conditions":[{"condition_id":"example","description":"example","condition_operator":"example","elements":[{"variable":"example","element_operator":"example","value":"example"}]}]}},"outputs":[{"type":"example","description":"example"}]}]},"start_tree":{"v1":[{"id":"example","description":"example","properties":{},"outputs":[{"type":"example","description":"example"}]}]},"start_call":{"v1":[{"id":"example","description":"example","properties":{"stt_general":{"language":"example","engine":"example","model":"example","primary_language":"example","fallback_languages":["example"]},"tts_general":{"language":"example","voice":"example","engine":"example","speed":1,"model":"example"}},"outputs":[{"type":"example","description":"example"}]}]},"outbound_call":{"v1":[{"id":"example","description":"example","properties":{"is_voicemail":true},"outputs":[{"type":"example","description":"example"}]}]},"inbound_call":{"v1":[{"id":"example","description":"example","properties":{},"outputs":[{"type":"example","description":"example"}]}]},"end":{"v1":[{"id":"example","description":"example","properties":{},"outputs":[{"type":"example","description":"example"}]}]},"call_transfer":{"v1":[{"id":"example","description":"example","properties":{"from":"example","number":"example","message_to_manager":{"mode":"example","tts":{"text":"example"},"file":{"url":"example"}},"message_to_client":{"mode":"example","tts":{"text":"example"},"file":{"url":"example"}},"timeout":1,"tts_properties":{"language":"example","voice":"example","engine":"example","model":"example"},"sip_header":{"sip_headers":[{"name":"example","value":"example"}]},"transfer_mode":"example"},"outputs":[{"type":"example","description":"example"}]}]},"question":{"v1":[{"id":"example","description":"example","properties":{"tts_properties":{"language":"example","voice":"example","engine":"example","speed":1,"model":"example"},"dtmf_properties":{"dtmf_timeout":1,"no_input_timeout":1,"min_symbols":1,"max_symbols":1,"finish_on_key":"example"},"stt_properties":{"speech_timeout":1,"no_input_timeout":1,"language":"example","recognition_shift":{"direction":"example","duration":1},"engine":"example","grammar_parameter":{"parameters":[{"key":"example","value":"example"}]},"class_token":{"tokens":["example"]},"filter":{"filters":["example"]},"tokens":["example"],"intent_properties":{"classifier":{"id":"example","version":1},"llm_properties":{"engine":"example","model":"example","messages":[{"role":"example","content":"example"}],"temperature":1,"provider":"example","gdpr_required":true},"threshold":1},"timezone":"example","recognition_mode":"example","enable_voice_activity_detection":true,"interruptible_dialog":true,"interruption_shift":{"direction":"example","duration":1},"model":"example","primary_language":"example","fallback_languages":["example"]},"statement":{"audio":{"mode":"example","tts":{"text":"example"},"file":{"url":"example"}},"is_interruptible":true},"type":"example","input_mode":"example","answer":{"answers":[{"answer_id":"example","description":"example","speech_input":{"tokens":["example"],"mode":"example","intent":{"id":"example"},"entity":{"entities":[{"type":"example","variable":{"name":"example"}}]}},"dtmf_input":{"value":"example"},"tag":"example"}]},"fallback_invalid":{"fallbacks":[{"is_repeat_statement":true,"audio":{"mode":"example","tts":{"text":"example"},"file":{"url":"example"}},"is_interruptible":true,"type":"example","llm_properties":{"engine":"example","model":"example","messages":[{"role":"example","content":"example"}],"temperature":1,"provider":"example","gdpr_required":true}}],"entity":{"entities":[{"type":"example","variable":{"name":"example"}}]}},"fallback_empty":{"fallbacks":[{"is_repeat_statement":true,"audio":{"mode":"example","tts":{"text":"example"},"file":{"url":"example"}},"is_interruptible":true,"type":"example","llm_properties":{"engine":"example","model":"example","messages":[{"role":"example","content":"example"}],"temperature":1,"provider":"example","gdpr_required":true}}]},"entity":{"entities":[{"type":"example","variable":{"name":"example"}}]}},"outputs":[{"type":"example","description":"example"}]}]},"webhook":{"v1":[{"id":"example","description":"example","properties":{"request":{"method":"example","url":"example","body":{"data":"example","type":"example","form_values":[{"name":"example","value":"example"}]},"authentication":{"type":"example","basic":{"username":"example","password":"example"},"bearer":{"token":"example"}},"header":{"headers":[{"name":"example","value":"example"}]},"insecure_skip_verify":true,"proxy":{"url":"example"},"attach_call_metadata":true,"timeout":1},"options":{"async":true,"timeout":1},"response_mapping":{"variables":[{"name":"example","source":"example","path":"example","set_if_not_found":"example"}]}},"outputs":[{"type":"example","description":"example"}]}]},"data_mapping":{"v1":[{"id":"example","description":"example","properties":{"input":"example","variables":[{"name":"example","path":"example","set_if_not_found":"example"}]},"outputs":[{"type":"example","description":"example"}]}]},"tree":{"v1":[{"id":"example","description":"example","properties":{"tree":{"id":"example"}},"outputs":[{"type":"example","description":"example"}]}]},"end_tree":{"v1":[{"id":"example","description":"example","properties":{"output":{"type":"example","description":"example"}},"outputs":[{"type":"example","description":"example"}]}]},"background_audio":{"v1":[{"id":"example","description":"example","properties":{"audio":{"audios":[{"mode":"example","file_properties":{"url":"example"},"volume":1}]}},"outputs":[{"type":"example","description":"example"}]}]},"javascript":{"v1":[{"id":"example","description":"example","properties":{"source":"example"},"outputs":[{"type":"example","description":"example"}]}],"v2":[{"id":"example","description":"example","properties":{"url":"example","input_variables":["example"]},"outputs":[{"type":"example","description":"example"}]}]},"warm_up_tts":{"v1":[{"id":"example","description":"example","properties":{"brick":{"bricks":[{"id":"example","type":"example"}]}},"outputs":[{"type":"example","description":"example"}]}]},"business_metric":{"v1":[{"id":"example","description":"example","properties":{"key":"example","value":"example"},"outputs":[{"type":"example","description":"example"}]}]},"ai_agent":{"v1":[{"id":"example","description":"example","properties":{"prompts":{"restrictions":{"content":"example"},"role":{"content":"example"},"initial_phrase":{"content":"example","is_interruptible":true}},"skill":{"skills":[{"id":"example","name":"example","function_name":"example","description":"example","parameters":{"type":"example","properties":{"additionalProperty":{"type":"example","description":"example","variable_name":"example","enum":["example"],"default":"example"}},"required":["example"],"additional_properties":true}}]},"knowledge_base":{"type":"example","prompt":{"content":"example"},"rag":{"document":{"ids":["example"],"number":1,"threshold":1}}},"fallbacks":{"error":{"counter":1},"empty":{"counter":1}},"configuration":{"llm":{"engine":"example","model":"example","temperature":1,"max_tokens":1,"provider":"example","gdpr_required":true},"tts":{"language":"example","voice":"example","engine":"example","speed":1,"model":"example"},"stt":{"speech_timeout":1,"no_input_timeout":1,"language":"example","recognition_shift":{"direction":"example","duration":1},"engine":"example","grammar_parameter":{"parameters":[{"key":"example","value":"example"}]},"class_token":{"tokens":["example"]},"filter":{"filters":["example"]},"tokens":["example"],"intent_properties":{"classifier":{"id":"example","version":1},"llm_properties":{"engine":"example","model":"example","messages":[{"role":"example","content":"example"}],"temperature":1,"provider":"example","gdpr_required":true},"threshold":1},"timezone":"example","recognition_mode":"example","enable_voice_activity_detection":true,"interruptible_dialog":true,"interruption_shift":{"direction":"example","duration":1},"model":"example","primary_language":"example","fallback_languages":["example"]},"dialog":{"context_mode":"example","max_turns":1}}},"outputs":[{"type":"example","description":"example"}]}]},"send_dtmf":{"v1":[{"id":"example","description":"example","properties":{"digits":"example","interval":1,"duration":1},"outputs":[{"type":"example","description":"example"}]}]},"recording_setup":{"v1":[{"id":"example","description":"example","properties":{},"outputs":[{"type":"example","description":"example"}]}]},"transcription":{"v1":[{"id":"example","description":"example","properties":{"request":{"requests":[{"source":{"type":"example","url":"example"},"engine":"example","prompt":"example","model":"example"}]}},"outputs":[{"type":"example","description":"example"}]}]}},"forest":{"trees":[{"description":"example","tree_id":"example","nodes":[{"id":"example","brick":{"id":"example","type":"example","version":"example"},"links":[{"output_type":"example","reference":{"tree_id":"example","node_id":"example"},"return":{"tree_id":"example","node_id":"example"}}]}]}]},"properties":{"engine_version":"example"}},"draft":true,"validate":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/scenario/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "constructor", "name": "example", "template": "example", "fix_communication_ttl": 1, "is_shared_for_copy": true, "constructor": { "bricks": { "audio": { "v1": [ { "id": "example", "description": "example", "properties": { "play_mode": "example", "audios": [ { "mode": "example", "tts_properties": { "text": "example" }, "file_properties": { "url": "example" } } ], "tts_general": { "language": "example", "voice": "example", "engine": "example", "speed": 1, "model": "example" } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "audio_file": { "v1": [ { "id": "example", "description": "example", "properties": { "url": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "audio_tts": { "v1": [ { "id": "example", "description": "example", "properties": { "text": "example", "language": "example", "voice": "example", "engine": "example", "model": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "sms": { "v1": [ { "id": "example", "description": "example", "properties": { "to": "example", "text": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "goal": { "v1": [ { "id": "example", "description": "example", "properties": { "goal": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "end_call": { "v1": [ { "id": "example", "description": "example", "properties": { "signal": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "assignment": { "v1": [ { "id": "example", "description": "example", "properties": { "variables": [ { "name": "example", "value": "example" } ] }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "increment": { "v1": [ { "id": "example", "description": "example", "properties": { "variables": [ { "variable": "example" } ] }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "condition_group": { "v1": [ { "id": "example", "description": "example", "properties": { "condition": { "conditions": [ { "condition_id": "example", "description": "example", "condition_operator": "example", "elements": [ { "variable": "example", "element_operator": "example", "value": "example" } ] } ] } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "start_tree": { "v1": [ { "id": "example", "description": "example", "properties": {}, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "start_call": { "v1": [ { "id": "example", "description": "example", "properties": { "stt_general": { "language": "example", "engine": "example", "model": "example", "primary_language": "example", "fallback_languages": [ "example" ] }, "tts_general": { "language": "example", "voice": "example", "engine": "example", "speed": 1, "model": "example" } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "outbound_call": { "v1": [ { "id": "example", "description": "example", "properties": { "is_voicemail": true }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "inbound_call": { "v1": [ { "id": "example", "description": "example", "properties": {}, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "end": { "v1": [ { "id": "example", "description": "example", "properties": {}, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "call_transfer": { "v1": [ { "id": "example", "description": "example", "properties": { "from": "example", "number": "example", "message_to_manager": { "mode": "example", "tts": { "text": "example" }, "file": { "url": "example" } }, "message_to_client": { "mode": "example", "tts": { "text": "example" }, "file": { "url": "example" } }, "timeout": 1, "tts_properties": { "language": "example", "voice": "example", "engine": "example", "model": "example" }, "sip_header": { "sip_headers": [ { "name": "example", "value": "example" } ] }, "transfer_mode": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "question": { "v1": [ { "id": "example", "description": "example", "properties": { "tts_properties": { "language": "example", "voice": "example", "engine": "example", "speed": 1, "model": "example" }, "dtmf_properties": { "dtmf_timeout": 1, "no_input_timeout": 1, "min_symbols": 1, "max_symbols": 1, "finish_on_key": "example" }, "stt_properties": { "speech_timeout": 1, "no_input_timeout": 1, "language": "example", "recognition_shift": { "direction": "example", "duration": 1 }, "engine": "example", "grammar_parameter": { "parameters": [ { "key": "example", "value": "example" } ] }, "class_token": { "tokens": [ "example" ] }, "filter": { "filters": [ "example" ] }, "tokens": [ "example" ], "intent_properties": { "classifier": { "id": "example", "version": 1 }, "llm_properties": { "engine": "example", "model": "example", "messages": [ { "role": "example", "content": "example" } ], "temperature": 1, "provider": "example", "gdpr_required": true }, "threshold": 1 }, "timezone": "example", "recognition_mode": "example", "enable_voice_activity_detection": true, "interruptible_dialog": true, "interruption_shift": { "direction": "example", "duration": 1 }, "model": "example", "primary_language": "example", "fallback_languages": [ "example" ] }, "statement": { "audio": { "mode": "example", "tts": { "text": "example" }, "file": { "url": "example" } }, "is_interruptible": true }, "type": "example", "input_mode": "example", "answer": { "answers": [ { "answer_id": "example", "description": "example", "speech_input": { "tokens": [ "example" ], "mode": "example", "intent": { "id": "example" }, "entity": { "entities": [ { "type": "example", "variable": { "name": "example" } } ] } }, "dtmf_input": { "value": "example" }, "tag": "example" } ] }, "fallback_invalid": { "fallbacks": [ { "is_repeat_statement": true, "audio": { "mode": "example", "tts": { "text": "example" }, "file": { "url": "example" } }, "is_interruptible": true, "type": "example", "llm_properties": { "engine": "example", "model": "example", "messages": [ { "role": "example", "content": "example" } ], "temperature": 1, "provider": "example", "gdpr_required": true } } ], "entity": { "entities": [ { "type": "example", "variable": { "name": "example" } } ] } }, "fallback_empty": { "fallbacks": [ { "is_repeat_statement": true, "audio": { "mode": "example", "tts": { "text": "example" }, "file": { "url": "example" } }, "is_interruptible": true, "type": "example", "llm_properties": { "engine": "example", "model": "example", "messages": [ { "role": "example", "content": "example" } ], "temperature": 1, "provider": "example", "gdpr_required": true } } ] }, "entity": { "entities": [ { "type": "example", "variable": { "name": "example" } } ] } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "webhook": { "v1": [ { "id": "example", "description": "example", "properties": { "request": { "method": "example", "url": "example", "body": { "data": "example", "type": "example", "form_values": [ { "name": "example", "value": "example" } ] }, "authentication": { "type": "example", "basic": { "username": "example", "password": "example" }, "bearer": { "token": "example" } }, "header": { "headers": [ { "name": "example", "value": "example" } ] }, "insecure_skip_verify": true, "proxy": { "url": "example" }, "attach_call_metadata": true, "timeout": 1 }, "options": { "async": true, "timeout": 1 }, "response_mapping": { "variables": [ { "name": "example", "source": "example", "path": "example", "set_if_not_found": "example" } ] } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "data_mapping": { "v1": [ { "id": "example", "description": "example", "properties": { "input": "example", "variables": [ { "name": "example", "path": "example", "set_if_not_found": "example" } ] }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "tree": { "v1": [ { "id": "example", "description": "example", "properties": { "tree": { "id": "example" } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "end_tree": { "v1": [ { "id": "example", "description": "example", "properties": { "output": { "type": "example", "description": "example" } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "background_audio": { "v1": [ { "id": "example", "description": "example", "properties": { "audio": { "audios": [ { "mode": "example", "file_properties": { "url": "example" }, "volume": 1 } ] } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "javascript": { "v1": [ { "id": "example", "description": "example", "properties": { "source": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ], "v2": [ { "id": "example", "description": "example", "properties": { "url": "example", "input_variables": [ "example" ] }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "warm_up_tts": { "v1": [ { "id": "example", "description": "example", "properties": { "brick": { "bricks": [ { "id": "example", "type": "example" } ] } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "business_metric": { "v1": [ { "id": "example", "description": "example", "properties": { "key": "example", "value": "example" }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "ai_agent": { "v1": [ { "id": "example", "description": "example", "properties": { "prompts": { "restrictions": { "content": "example" }, "role": { "content": "example" }, "initial_phrase": { "content": "example", "is_interruptible": true } }, "skill": { "skills": [ { "id": "example", "name": "example", "function_name": "example", "description": "example", "parameters": { "type": "example", "properties": { "additionalProperty": { "type": "example", "description": "example", "variable_name": "example", "enum": [ "example" ], "default": "example" } }, "required": [ "example" ], "additional_properties": true } } ] }, "knowledge_base": { "type": "example", "prompt": { "content": "example" }, "rag": { "document": { "ids": [ "example" ], "number": 1, "threshold": 1 } } }, "fallbacks": { "error": { "counter": 1 }, "empty": { "counter": 1 } }, "configuration": { "llm": { "engine": "example", "model": "example", "temperature": 1, "max_tokens": 1, "provider": "example", "gdpr_required": true }, "tts": { "language": "example", "voice": "example", "engine": "example", "speed": 1, "model": "example" }, "stt": { "speech_timeout": 1, "no_input_timeout": 1, "language": "example", "recognition_shift": { "direction": "example", "duration": 1 }, "engine": "example", "grammar_parameter": { "parameters": [ { "key": "example", "value": "example" } ] }, "class_token": { "tokens": [ "example" ] }, "filter": { "filters": [ "example" ] }, "tokens": [ "example" ], "intent_properties": { "classifier": { "id": "example", "version": 1 }, "llm_properties": { "engine": "example", "model": "example", "messages": [ { "role": "example", "content": "example" } ], "temperature": 1, "provider": "example", "gdpr_required": true }, "threshold": 1 }, "timezone": "example", "recognition_mode": "example", "enable_voice_activity_detection": true, "interruptible_dialog": true, "interruption_shift": { "direction": "example", "duration": 1 }, "model": "example", "primary_language": "example", "fallback_languages": [ "example" ] }, "dialog": { "context_mode": "example", "max_turns": 1 } } }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "send_dtmf": { "v1": [ { "id": "example", "description": "example", "properties": { "digits": "example", "interval": 1, "duration": 1 }, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "recording_setup": { "v1": [ { "id": "example", "description": "example", "properties": {}, "outputs": [ { "type": "example", "description": "example" } ] } ] }, "transcription": { "v1": [ { "id": "example", "description": "example", "properties": { "request": { "requests": [ { "source": { "type": "example", "url": "example" }, "engine": "example", "prompt": "example", "model": "example" } ] } }, "outputs": [ { "type": "example", "description": "example" } ] } ] } }, "forest": { "trees": [ { "description": "example", "tree_id": "example", "nodes": [ { "id": "example", "brick": { "id": "example", "type": "example", "version": "example" }, "links": [ { "output_type": "example", "reference": { "tree_id": "example", "node_id": "example" }, "return": { "tree_id": "example", "node_id": "example" } } ] } ] } ] }, "properties": { "engine_version": "example" } }, "draft": true, "validate": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Target account for account-scoped resources. Principals without an account scope (superuser, tenant API key) MUST send it to declare which account to operate in. Account-scoped principals may omit it; if sent it must match their own account or the request is rejected with scope_conflict. For tenant API keys the account must belong to the key’s tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”Partial update: an omitted field preserves the current value. constructor is always sent whole; null fails validation (422). With draft: true the write lands on the work-in-progress draft and the published state stays untouched; otherwise the write publishes the next version.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Message content only. Provider, credentials, and sender identity resolve from the agent’s SMS settings at send time.
object
Recipient override; empty means the communication recipient.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The classifier a question brick classifies against.
object
Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Target variable, written as a placeholder. Returned unwrapped in variables.
Where the value is read from — body (JSONPath in path) or header (header name in path).
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The classifier a question brick classifies against.
object
Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Gates two independent checks. Constructor content validation is honored only together with draft: true — when false an incomplete work-in-progress draft saves; a publish always validates content regardless. Classifier readiness is honored on a publish — when false the publish is not blocked by a referenced classifier version that is not trained.
Responses
Section titled “Responses”OK
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Message content only. Provider, credentials, and sender identity resolve from the agent’s SMS settings at send time.
object
Recipient override; empty means the communication recipient.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The classifier a question brick classifies against.
object
Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Target variable, written as a placeholder. Returned unwrapped in variables.
Where the value is read from — body (JSONPath in path) or header (header name in path).
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The classifier a question brick classifies against.
object
Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Shares the scenario for read and copy with other accounts of the owning tenant; the read capability is still required. Outside the owning tenant the scenario reads as absent (404). Never affects list surfaces or writes.
Example
{ "type": "constructor"}Invalid request body or parameters
object
Stable lower_snake_case usecase code (e.g. scenario_not_found)
Registered machine code — generic ERRxxx by status class (ERR001–ERR020 reserved); entity-prefixed codes (SCN1xx) appear only inside validation details; registry in docs/specifications/error-envelope-design.md, append-only, never renumbered
Structured details, present only where there is structure to carry: validation failures (topic validation, per-entity errors) and delete conflicts (topic conflict, referencing agents)
object
Validation errors keyed by entity
object
object
SCN1xx constructor validation code
Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "data": { "topic": "example", "errors": { "scenario": [ { "code": "example", "message": "example", "summary": "example", "tree_id": "example", "node_id": "example", "output_type": "example", "duplicate_tree_index": "example", "duplicate_node_index": "example", "property": "example", "invalid_value": "example" } ] }, "agents": [ "example" ] }}Missing or invalid credentials
object
Stable lower_snake_case usecase code (e.g. scenario_not_found)
Registered machine code — generic ERRxxx by status class (ERR001–ERR020 reserved); entity-prefixed codes (SCN1xx) appear only inside validation details; registry in docs/specifications/error-envelope-design.md, append-only, never renumbered
Structured details, present only where there is structure to carry: validation failures (topic validation, per-entity errors) and delete conflicts (topic conflict, referencing agents)
object
Validation errors keyed by entity
object
object
SCN1xx constructor validation code
Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "data": { "topic": "example", "errors": { "scenario": [ { "code": "example", "message": "example", "summary": "example", "tree_id": "example", "node_id": "example", "output_type": "example", "duplicate_tree_index": "example", "duplicate_node_index": "example", "property": "example", "invalid_value": "example" } ] }, "agents": [ "example" ] }}Caller has no access
object
Stable lower_snake_case usecase code (e.g. scenario_not_found)
Registered machine code — generic ERRxxx by status class (ERR001–ERR020 reserved); entity-prefixed codes (SCN1xx) appear only inside validation details; registry in docs/specifications/error-envelope-design.md, append-only, never renumbered
Structured details, present only where there is structure to carry: validation failures (topic validation, per-entity errors) and delete conflicts (topic conflict, referencing agents)
object
Validation errors keyed by entity
object
object
SCN1xx constructor validation code
Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "data": { "topic": "example", "errors": { "scenario": [ { "code": "example", "message": "example", "summary": "example", "tree_id": "example", "node_id": "example", "output_type": "example", "duplicate_tree_index": "example", "duplicate_node_index": "example", "property": "example", "invalid_value": "example" } ] }, "agents": [ "example" ] }}Resource does not exist
object
Stable lower_snake_case usecase code (e.g. scenario_not_found)
Registered machine code — generic ERRxxx by status class (ERR001–ERR020 reserved); entity-prefixed codes (SCN1xx) appear only inside validation details; registry in docs/specifications/error-envelope-design.md, append-only, never renumbered
Structured details, present only where there is structure to carry: validation failures (topic validation, per-entity errors) and delete conflicts (topic conflict, referencing agents)
object
Validation errors keyed by entity
object
object
SCN1xx constructor validation code
Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "data": { "topic": "example", "errors": { "scenario": [ { "code": "example", "message": "example", "summary": "example", "tree_id": "example", "node_id": "example", "output_type": "example", "duplicate_tree_index": "example", "duplicate_node_index": "example", "property": "example", "invalid_value": "example" } ] }, "agents": [ "example" ] }}Semantic validation failure
object
Stable lower_snake_case usecase code (e.g. scenario_not_found)
Registered machine code — generic ERRxxx by status class (ERR001–ERR020 reserved); entity-prefixed codes (SCN1xx) appear only inside validation details; registry in docs/specifications/error-envelope-design.md, append-only, never renumbered
Structured details, present only where there is structure to carry: validation failures (topic validation, per-entity errors) and delete conflicts (topic conflict, referencing agents)
object
Validation errors keyed by entity
object
object
SCN1xx constructor validation code
Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "data": { "topic": "example", "errors": { "scenario": [ { "code": "example", "message": "example", "summary": "example", "tree_id": "example", "node_id": "example", "output_type": "example", "duplicate_tree_index": "example", "duplicate_node_index": "example", "property": "example", "invalid_value": "example" } ] }, "agents": [ "example" ] }}Internal server error
object
Stable lower_snake_case usecase code (e.g. scenario_not_found)
Registered machine code — generic ERRxxx by status class (ERR001–ERR020 reserved); entity-prefixed codes (SCN1xx) appear only inside validation details; registry in docs/specifications/error-envelope-design.md, append-only, never renumbered
Structured details, present only where there is structure to carry: validation failures (topic validation, per-entity errors) and delete conflicts (topic conflict, referencing agents)
object
Validation errors keyed by entity
object
object
SCN1xx constructor validation code
Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "data": { "topic": "example", "errors": { "scenario": [ { "code": "example", "message": "example", "summary": "example", "tree_id": "example", "node_id": "example", "output_type": "example", "duplicate_tree_index": "example", "duplicate_node_index": "example", "property": "example", "invalid_value": "example" } ] }, "agents": [ "example" ] }}