Skip to content

Copy scenario

POST
/v1/scenario/{id}/copy
curl --request POST \
--url https://example.com/v1/scenario/example/copy \
--header 'Authorization: Bearer <token>'

Copies an own scenario, or a shared-for-copy scenario of another account of the same tenant; the copy lands in the caller’s account. Any other foreign scenario reads as absent (404).

id
required
string
X-Account-Sid
string

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.

Created

Media typeapplication/json
object
id
required
string
type
required
string
Allowed values: constructor
name
required
string
template
required
string
description
required
string
account_sid
required
string
constructor
required
object
bricks
object
audio
object
v1
Array<object>
object
id
required
string
description
string
properties
object
play_mode
string
audios
Array<object>
object
mode
string
tts_properties
object
text
string
file_properties
object
url
string
tts_general
object
language
string
voice
string
engine
string
speed
number format: float
model
string
outputs
Array<object>
object
type
string
description
string
audio_file
object
v1
Array<object>
object
id
required
string
description
string
properties
object
url
string
outputs
Array<object>
object
type
string
description
string
audio_tts
object
v1
Array<object>
object
id
required
string
description
string
properties
object
text
string
language
string
voice
string
engine
string
model
string
outputs
Array<object>
object
type
string
description
string
sms
object
v1
Array<object>
object
id
required
string
description
string
properties

Message content only. Provider, credentials, and sender identity resolve from the agent’s SMS settings at send time.

object
to

Recipient override; empty means the communication recipient.

string
text
string
outputs
Array<object>
object
type
string
description
string
goal
object
v1
Array<object>
object
id
required
string
description
string
properties
object
goal
string
outputs
Array<object>
object
type
string
description
string
end_call
object
v1
Array<object>
object
id
required
string
description
string
properties
object
signal
string
outputs
Array<object>
object
type
string
description
string
assignment
object
v1
Array<object>
object
id
required
string
description
string
properties
object
variables
Array<object>
object
name
string
value
string
outputs
Array<object>
object
type
string
description
string
increment
object
v1
Array<object>
object
id
required
string
description
string
properties
object
variables
Array<object>
object
variable
string
outputs
Array<object>
object
type
string
description
string
condition_group
object
v1
Array<object>
object
id
required
string
description
string
properties
object
condition
object
conditions
Array<object>
object
condition_id
string
description
string
condition_operator
string
elements
Array<object>
object
variable
string
element_operator
string
value
string
outputs
Array<object>
object
type
string
description
string
start_tree
object
v1
Array<object>
object
id
required
string
description
string
properties
object
outputs
Array<object>
object
type
string
description
string
start_call
object
v1
Array<object>
object
id
required
string
description
string
properties
object
stt_general
object
language
string
engine
string
model
string
primary_language
string
fallback_languages
Array<string>
tts_general
object
language
string
voice
string
engine
string
speed
number format: float
model
string
outputs
Array<object>
object
type
string
description
string
outbound_call
object
v1
Array<object>
object
id
required
string
description
string
properties
object
is_voicemail
boolean
outputs
Array<object>
object
type
string
description
string
inbound_call
object
v1
Array<object>
object
id
required
string
description
string
properties
object
outputs
Array<object>
object
type
string
description
string
end
object
v1
Array<object>
object
id
required
string
description
string
properties
object
outputs
Array<object>
object
type
string
description
string
call_transfer
object
v1
Array<object>
object
id
required
string
description
string
properties
object
from
string
number
string
message_to_manager
object
mode
string
tts
object
text
string
file
object
url
string
message_to_client
object
mode
string
tts
object
text
string
file
object
url
string
timeout
integer
tts_properties
object
language
string
voice
string
engine
string
model
string
sip_header
object
sip_headers
Array<object>
object
name
string
value
string
transfer_mode
string
outputs
Array<object>
object
type
string
description
string
question
object
v1
Array<object>
object
id
required
string
description
string
properties
object
tts_properties
object
language
string
voice
string
engine
string
speed
number format: float
model
string
dtmf_properties
object
dtmf_timeout
number format: float
no_input_timeout
number format: float
min_symbols
integer
max_symbols
integer
finish_on_key
string
stt_properties
object
speech_timeout
number format: float
no_input_timeout
number format: float
language
string
recognition_shift
object
direction
string
duration
number format: float
engine
string
grammar_parameter
object
parameters
Array<object>
object
key
string
value
string
class_token
object
tokens
Array<string>
filter
object
filters
Array<string>
tokens
Array<string>
intent_properties
object
classifier

The classifier a question brick classifies against.

object
id
string
version

Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.

integer
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role
string
content
string
temperature
number format: float
provider
string
gdpr_required
boolean
threshold
number format: float
timezone
string
recognition_mode
string
enable_voice_activity_detection
boolean
interruptible_dialog
boolean
interruption_shift
object
direction
string
duration
number format: float
model
string
primary_language
string
fallback_languages
Array<string>
statement
object
audio
object
mode
string
tts
object
text
string
file
object
url
string
is_interruptible
boolean
type
string
input_mode
string
answer
object
answers
Array<object>
object
answer_id
string
description
string
speech_input
object
tokens
Array<string>
mode
string
intent
object
id
string
entity
object
entities
Array<object>
object
type
string
variable
object
name
string
dtmf_input
object
value
string
tag
string
fallback_invalid
object
fallbacks
Array<object>
object
is_repeat_statement
boolean
audio
object
mode
string
tts
object
text
string
file
object
url
string
is_interruptible
boolean
type
string
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role
string
content
string
temperature
number format: float
provider
string
gdpr_required
boolean
entity
object
entities
Array<object>
object
type
string
variable
object
name
string
fallback_empty
object
fallbacks
Array<object>
object
is_repeat_statement
boolean
audio
object
mode
string
tts
object
text
string
file
object
url
string
is_interruptible
boolean
type
string
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role
string
content
string
temperature
number format: float
provider
string
gdpr_required
boolean
entity
object
entities
Array<object>
object
type
string
variable
object
name
string
outputs
Array<object>
object
type
string
description
string
webhook
object
v1
Array<object>
object
id
required
string
description
string
properties
object
request
object
method
string
url
string
body
object
data
string
type
string
form_values
Array<object>
object
name
string
value
string
authentication
object
type
string
basic
object
username
string
password
string
bearer
object
token
string
header
object
headers
Array<object>
object
name
string
value
string
insecure_skip_verify
boolean
proxy
object
url
string
attach_call_metadata
boolean
timeout
number format: float
options
object
async
boolean
timeout
number format: float
response_mapping
object
variables
Array<object>
object
name

Target variable, written as a placeholder. Returned unwrapped in variables.

string
/^\{\{[A-Za-z0-9\-_.]+\}\}$/
source

Where the value is read from — body (JSONPath in path) or header (header name in path).

string
path
string
set_if_not_found
string
outputs
Array<object>
object
type
string
description
string
data_mapping
object
v1
Array<object>
object
id
required
string
description
string
properties
object
input
string
variables
Array<object>
object
name
string
path
string
set_if_not_found
string
outputs
Array<object>
object
type
string
description
string
tree
object
v1
Array<object>
object
id
required
string
description
string
properties
object
tree
object
id
string
outputs
Array<object>
object
type
string
description
string
end_tree
object
v1
Array<object>
object
id
required
string
description
string
properties
object
output
object
type
string
description
string
outputs
Array<object>
object
type
string
description
string
background_audio
object
v1
Array<object>
object
id
required
string
description
string
properties
object
audio
object
audios
Array<object>
object
mode
string
file_properties
object
url
string
volume
integer
outputs
Array<object>
object
type
string
description
string
javascript
object
v1
Array<object>
object
id
required
string
description
string
properties
object
source
string
outputs
Array<object>
object
type
string
description
string
v2
Array<object>
object
id
string
description
string
properties
object
url
string
input_variables
Array<string>
outputs
Array<object>
object
type
string
description
string
warm_up_tts
object
v1
Array<object>
object
id
required
string
description
string
properties
object
brick
object
bricks
Array<object>
object
id
string
type
string
outputs
Array<object>
object
type
string
description
string
business_metric
object
v1
Array<object>
object
id
required
string
description
string
properties
object
key
string
value
string
outputs
Array<object>
object
type
string
description
string
ai_agent
object
v1
Array<object>
object
id
required
string
description
required
string
properties
object
prompts
object
restrictions
object
content
string
role
object
content
string
initial_phrase
object
content
string
is_interruptible
boolean
skill
object
skills
Array<object>
object
id
required
string
name
string
function_name
string
description
required
string
parameters
object
type
string
properties
object
key
additional properties
object
type
string
description
string
variable_name
string
enum
Array<string>
default
string
required
Array<string>
additional_properties
boolean
knowledge_base
object
type
string
prompt
object
content
string
rag
object
document
object
ids
Array<string>
number
integer
threshold
number format: float
fallbacks
object
error
object
counter
integer
empty
object
counter
integer
configuration
object
llm
object
engine
string
model
string
temperature
number format: float
max_tokens
integer
provider
string
gdpr_required
boolean
tts
object
language
string
voice
string
engine
string
speed
number format: float
model
string
stt
object
speech_timeout
number format: float
no_input_timeout
number format: float
language
string
recognition_shift
object
direction
string
duration
number format: float
engine
string
grammar_parameter
object
parameters
Array<object>
object
key
string
value
string
class_token
object
tokens
Array<string>
filter
object
filters
Array<string>
tokens
Array<string>
intent_properties
object
classifier

The classifier a question brick classifies against.

object
id
string
version

Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.

integer
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role
string
content
string
temperature
number format: float
provider
string
gdpr_required
boolean
threshold
number format: float
timezone
string
recognition_mode
string
enable_voice_activity_detection
boolean
interruptible_dialog
boolean
interruption_shift
object
direction
string
duration
number format: float
model
string
primary_language
string
fallback_languages
Array<string>
dialog
object
context_mode
string
max_turns
integer
outputs
Array<object>
object
type
string
description
string
send_dtmf
object
v1
Array<object>
object
id
required
string
description
required
string
properties
object
digits
string
interval
integer
duration
integer
outputs
Array<object>
object
type
string
description
string
recording_setup
object
v1
Array<object>
object
id
required
string
description
required
string
properties
object
outputs
Array<object>
object
type
string
description
string
transcription
object
v1
Array<object>
object
id
required
string
description
required
string
properties
object
request
object
requests
Array<object>
object
source
object
type
string
url
string
engine
string
prompt
string
model
string
outputs
Array<object>
object
type
string
description
string
forest
object
trees
Array<object>
object
description
string
tree_id
string
nodes
Array<object>
object
id
string
brick
object
id
string
type
string
version
string
links
Array<object>
object
output_type
string
reference
object
tree_id
string
node_id
string
return
object
tree_id
string
node_id
string
properties
object
engine_version
string
fix_communication_ttl
required
integer
is_shared_for_copy
required

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.

boolean
created_at
required
string format: date-time
updated_at
required
string format: date-time
version
required
integer
draft_exists
required
boolean
Example
{
"type": "constructor"
}

Missing or invalid credentials

Media typeapplication/json
object
error
required

Stable lower_snake_case usecase code (e.g. scenario_not_found)

string
code
required

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

string
message
required
string
data

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
topic
string
errors

Validation errors keyed by entity

object
scenario
Array<object>
object
code

SCN1xx constructor validation code

string
message
string
summary
string
tree_id
string
node_id
string
output_type
string
duplicate_tree_index
string
duplicate_node_index
string
property
string
invalid_value
string
agents

Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count

Array<string>
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

Media typeapplication/json
object
error
required

Stable lower_snake_case usecase code (e.g. scenario_not_found)

string
code
required

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

string
message
required
string
data

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
topic
string
errors

Validation errors keyed by entity

object
scenario
Array<object>
object
code

SCN1xx constructor validation code

string
message
string
summary
string
tree_id
string
node_id
string
output_type
string
duplicate_tree_index
string
duplicate_node_index
string
property
string
invalid_value
string
agents

Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count

Array<string>
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

Media typeapplication/json
object
error
required

Stable lower_snake_case usecase code (e.g. scenario_not_found)

string
code
required

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

string
message
required
string
data

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
topic
string
errors

Validation errors keyed by entity

object
scenario
Array<object>
object
code

SCN1xx constructor validation code

string
message
string
summary
string
tree_id
string
node_id
string
output_type
string
duplicate_tree_index
string
duplicate_node_index
string
property
string
invalid_value
string
agents

Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count

Array<string>
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

Media typeapplication/json
object
error
required

Stable lower_snake_case usecase code (e.g. scenario_not_found)

string
code
required

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

string
message
required
string
data

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
topic
string
errors

Validation errors keyed by entity

object
scenario
Array<object>
object
code

SCN1xx constructor validation code

string
message
string
summary
string
tree_id
string
node_id
string
output_type
string
duplicate_tree_index
string
duplicate_node_index
string
property
string
invalid_value
string
agents

Ids of the agents referencing the resource a delete was rejected for; first 20 — message carries the total count

Array<string>
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"
]
}
}