Skip to content

Copy scenario

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

Copies a scenario into the caller’s account.

By source:

  • An own scenario is copied.
  • A shared-for-copy scenario of another account of the same tenant is copied.
  • Any other foreign scenario reads as absent.

The copy starts unpublished: version 0, the content as its work-in-progress draft.

Rules for a shared scenario of another account:

  • Every classifier, edge function, RAG document and audio file it names is created again in the caller’s account, and the copy names the new ones.
  • Webhook authentication is not copied.

Refused when:

  • The scenario belongs to another account, and the account made another copy less than a minute ago. A copy of a template counts.
  • A resource of the shared scenario cannot be copied. Nothing is created then.

Permission

This operation needs the permission scenario:write.

id
required
string
X-Account-Sid
string

Names the target account for account-scoped resources.

By principal:

  • A tenant API key carries no account scope of its own and names the account here.
  • An account-scoped principal may omit it.

Refused when:

  • A tenant API key omits it.
  • An account-scoped principal sends a value naming any other account.
  • The named account belongs to another tenant.
  • The named account does not exist; it is answered as not found.

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
Any of:
object
bricks

Holds the properties of a brick, one key per brick type.

Rules:

  • A text property reads a variable when it holds {{name}}, and a contact field when it holds {{contact.<path>}}; the call puts the value in place when the brick runs.
  • A number, a boolean and an enum property take no variable.
  • start_call, inbound_call, outbound_call, recording_setup, tree, start_tree, end_tree and end: no property takes a variable.
  • condition_group and assignment: only value takes a variable.
  • webhook: only the method, the URL, the body, the names and values of the headers and of the form fields, the basic-auth username and password, the bearer token, the proxy URL, and the path and set_if_not_found of a response mapping take a variable.
  • A property that names a variable to write, such as variable of a response mapping or of increment, is written to and not read.
  • The guide with examples: https://docs.aiva.apifonica.com/guides/build/variables/
object
audio
object
v1
Array<object>
object
id
required
string
description
string
properties
object
play_mode

Picks which of the brick’s audios it plays.

Refused when:

  • A publish carries no value.
  • A publish carries an undeclared value.
string
Allowed values: all one_next one_random
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

Overrides the recipient; 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

How a condition joins its elements.

string
Allowed values: and or
elements
Array<object>
object
variable
string
element_operator

How one condition element compares its variable against its value.

string
Allowed values: equal not_equal greater_than less_than greater_than_equal less_than_equal in not_in contains not_contains starts_with
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>

Starts the call and hands it to the outbound_call or the inbound_call brick. Replaced by v2.

object
id
required
string
description
string
properties
object
stt_general
object
language
string
engine
string
Allowed values: gsr gsr@v2 azuresr experimental mohir soniox elevenlabs
model
string
primary_language
string
fallback_languages
Array<string>
endpoint_detection

Ends the caller’s turn when the recognition engine reports the end of the phrase, before the speech timeout.

Rules:

  • A call reads it from the settings of a question.
  • A call reads it from the settings of an AI agent.
  • A call does not read it from stt_general.
object
enabled

Switches endpoint detection on.

Values:

  • true: is allowed only where the engine of the same settings is soniox.
  • false: the other values are stored and not checked.
boolean
latency_adjustment_level

Sets the engine’s endpoint latency adjustment level, from 0 to 3. Omitting it is the same as sending 0.

integer
sensitivity

Sets the engine’s endpoint sensitivity, from -1.0 to 1.0. Omitting it is the same as sending 0.

number format: float
max_delay_ms

Sets the engine’s maximum endpoint delay in milliseconds, from 500 to 3000. Required while enabled is true.

integer
tts_general
object
language
string
voice
string
engine
string
speed
number format: float
model
string
outputs
Array<object>
object
type
string
description
string
v2
Array<object>

Starts the call and routes it by the call outcome.

The outputs:

  • outbound: an outbound call is answered. Required.
  • inbound: an inbound call is answered. Required.
  • voicemail: an answering machine answers an outbound call. Required while voicemail_enabled is true.
  • busy: the line of an outbound call is busy. Required.
  • unanswered: nobody answers an outbound call. Required.

Rules:

  • After busy and unanswered there is no call: a brick that needs the call takes its fallback output, and a brick that needs no call runs.
  • A scenario ends on busy or unanswered through a link to an end brick.
  • An output with no link ends the scenario.
object
id
required
string
description
string
properties
object
stt_general
object
language
string
engine
string
Allowed values: gsr gsr@v2 azuresr experimental mohir soniox elevenlabs
model
string
primary_language
string
fallback_languages
Array<string>
endpoint_detection

Ends the caller’s turn when the recognition engine reports the end of the phrase, before the speech timeout.

Rules:

  • A call reads it from the settings of a question.
  • A call reads it from the settings of an AI agent.
  • A call does not read it from stt_general.
object
enabled

Switches endpoint detection on.

Values:

  • true: is allowed only where the engine of the same settings is soniox.
  • false: the other values are stored and not checked.
boolean
latency_adjustment_level

Sets the engine’s endpoint latency adjustment level, from 0 to 3. Omitting it is the same as sending 0.

integer
sensitivity

Sets the engine’s endpoint sensitivity, from -1.0 to 1.0. Omitting it is the same as sending 0.

number format: float
max_delay_ms

Sets the engine’s maximum endpoint delay in milliseconds, from 500 to 3000. Required while enabled is true.

integer
tts_general
object
language
string
voice
string
engine
string
speed
number format: float
model
string
voicemail_enabled

Turns on answering machine detection for an outbound call, which then follows the voicemail output. Replaces the agent’s voicemail_enabled for this scenario. false when absent.

boolean
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

Picks how the call is handed over.

Values:

  • bridge: keeps both legs on the platform. It is the default when omitted or empty.
  • refer: transfers the call with a SIP REFER.

Another value is refused on publish.

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

The direction the recognition window moves, by duration.

string
Allowed values: backward forward
duration
number format: float
engine
string
Allowed values: gsr gsr@v2 azuresr experimental mohir soniox elevenlabs
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

Pins the classifier version this brick classifies against.

Rules:

  • 0 is an ordinary version, the one a classifier is created at.
  • A read always states it.
  • On a write, omitting it is the same as sending 0.
integer
model_id

Identifies the intent model the caller chose for this brick.

Rules:

  • It is stored as sent.
  • It is returned when set.
  • The platform does not read it.
string
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role

The party the chat message is attributed to.

string
Allowed values: system assistant user function
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

The direction the recognition window moves, by duration.

string
Allowed values: backward forward
duration
number format: float
model
string
primary_language
string
fallback_languages
Array<string>
endpoint_detection

Ends the caller’s turn when the recognition engine reports the end of the phrase, before the speech timeout.

Rules:

  • A call reads it from the settings of a question.
  • A call reads it from the settings of an AI agent.
  • A call does not read it from stt_general.
object
enabled

Switches endpoint detection on.

Values:

  • true: is allowed only where the engine of the same settings is soniox.
  • false: the other values are stored and not checked.
boolean
latency_adjustment_level

Sets the engine’s endpoint latency adjustment level, from 0 to 3. Omitting it is the same as sending 0.

integer
sensitivity

Sets the engine’s endpoint sensitivity, from -1.0 to 1.0. Omitting it is the same as sending 0.

number format: float
max_delay_ms

Sets the engine’s maximum endpoint delay in milliseconds, from 500 to 3000. Required while enabled is true.

integer
statement
object
audio
object
mode
string
tts
object
text
string
file
object
url
string
is_interruptible
boolean
type

Picks the question shape.

Values:

  • closed: branches on a match in answer.answers, which must then be non-empty.
  • open: branches on valid.

Any other value is refused on publish.

string
input_mode

Picks how the reply is captured.

Values:

  • dtmf: needs dtmf_properties.
  • speech: needs stt_properties.

Anything else fails a publish.

string
answer
object
answers
Array<object>
object
answer_id
string
description
string
speech_input
object
tokens
Array<string>
mode

How the answer is matched against what the person said.

string
Allowed values: token-based intent-based intent-llm-based token-llm-based token-intent-llm-based
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>

Sets one fallback of a question brick. llm_properties is stored only when type is llm; on any other fallback, and on one with no type, it is dropped on save.

object
is_repeat_statement
boolean
audio
object
mode
string
tts
object
text
string
file
object
url
string
is_interruptible
boolean
type

Picks what the fallback plays.

Values:

  • initial: repeats the question’s own statement.
  • custom: plays the fallback’s own audio.
  • llm: generates a reply.
string
Allowed values: initial custom llm
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role

The party the chat message is attributed to.

string
Allowed values: system assistant user function
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>

Sets one fallback of a question brick. llm_properties is stored only when type is llm; on any other fallback, and on one with no type, it is dropped on save.

object
is_repeat_statement
boolean
audio
object
mode
string
tts
object
text
string
file
object
url
string
is_interruptible
boolean
type

Picks what the fallback plays.

Values:

  • initial: repeats the question’s own statement.
  • custom: plays the fallback’s own audio.
  • llm: generates a reply.
string
Allowed values: initial custom llm
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role

The party the chat message is attributed to.

string
Allowed values: system assistant user function
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
required
object
method
required
string
url
required
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

Names the target variable, written as a placeholder. Returned unwrapped in variables.

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

Picks where the value is read from.

Values:

  • body: path holds a JSONPath.
  • header: path holds the header name.
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
id
required

Names the deployed edge function version the brick runs, as its uuid.

Refused when:

  • A publish carries an empty value.
  • A publish carries a value that is not a uuid.
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

Sets the sampling temperature of the model, from 0 to 1. 0 or no value uses the default of the model.

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

The direction the recognition window moves, by duration.

string
Allowed values: backward forward
duration
number format: float
engine
string
Allowed values: gsr gsr@v2 azuresr experimental mohir soniox elevenlabs
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

Pins the classifier version this brick classifies against.

Rules:

  • 0 is an ordinary version, the one a classifier is created at.
  • A read always states it.
  • On a write, omitting it is the same as sending 0.
integer
model_id

Identifies the intent model the caller chose for this brick.

Rules:

  • It is stored as sent.
  • It is returned when set.
  • The platform does not read it.
string
llm_properties
object
engine
string
model
string
messages
Array<object>
object
role

The party the chat message is attributed to.

string
Allowed values: system assistant user function
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

The direction the recognition window moves, by duration.

string
Allowed values: backward forward
duration
number format: float
model
string
primary_language
string
fallback_languages
Array<string>
endpoint_detection

Ends the caller’s turn when the recognition engine reports the end of the phrase, before the speech timeout.

Rules:

  • A call reads it from the settings of a question.
  • A call reads it from the settings of an AI agent.
  • A call does not read it from stt_general.
object
enabled

Switches endpoint detection on.

Values:

  • true: is allowed only where the engine of the same settings is soniox.
  • false: the other values are stored and not checked.
boolean
latency_adjustment_level

Sets the engine’s endpoint latency adjustment level, from 0 to 3. Omitting it is the same as sending 0.

integer
sensitivity

Sets the engine’s endpoint sensitivity, from -1.0 to 1.0. Omitting it is the same as sending 0.

number format: float
max_delay_ms

Sets the engine’s maximum endpoint delay in milliseconds, from 500 to 3000. Required while enabled is true.

integer
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

Picks what is transcribed.

Values:

  • last_recording: the call’s last recording is transcribed.
  • url: audio fetched from url is transcribed.
string
Allowed values: last_recording url
url
string
engine

The engine that transcribes the source.

string
Allowed values: whisper
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
Allowed values: ai_agent assignment audio audio_file audio_tts background_audio call_transfer condition_group data_mapping end end_call end_tree goal inbound_call increment javascript outbound_call question sms start_call start_tree transcription tree warm_up_tts webhook
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
position
Any of:
object
x
required
number format: double
y
required
number format: double
properties
object
engine_version

Any value sent is stored as v3.

string
Allowed values: v3
fix_communication_ttl
required
integer
is_shared_for_copy
required

Shares the scenario for read and copy with other accounts of the owning tenant.

Rules:

  • The permission of each operation still applies.
  • Outside the owning tenant, the scenario is absent.
  • Writes are unaffected.
  • GET /v1/a/scenario still lists the caller’s own account alone.
  • A shared scenario does resolve into another resource’s included map.
boolean
created_at
required
string format: date-time
updated_at
required
string format: date-time
version
required
integer
draft_exists
required
boolean
is_published
required

Says whether a version has been published. false while the scenario exists as a draft only.

boolean
Example
{
"type": "constructor",
"constructor": {
"bricks": {
"audio": {
"v1": [
{
"properties": {
"play_mode": "all"
}
}
]
},
"condition_group": {
"v1": [
{
"properties": {
"condition": {
"conditions": [
{
"condition_operator": "and",
"elements": [
{
"element_operator": "equal"
}
]
}
]
}
}
}
]
},
"start_call": {
"v1": [
{
"properties": {
"stt_general": {
"engine": "gsr"
}
}
}
],
"v2": [
{
"properties": {
"stt_general": {
"engine": "gsr"
}
}
}
]
},
"question": {
"v1": [
{
"properties": {
"stt_properties": {
"recognition_shift": {
"direction": "backward"
},
"engine": "gsr",
"intent_properties": {
"llm_properties": {
"messages": [
{
"role": "system"
}
]
}
},
"interruption_shift": {
"direction": "backward"
}
},
"answer": {
"answers": [
{
"speech_input": {
"mode": "token-based"
}
}
]
},
"fallback_invalid": {
"fallbacks": [
{
"type": "initial",
"llm_properties": {
"messages": [
{
"role": "system"
}
]
}
}
]
},
"fallback_empty": {
"fallbacks": [
{
"type": "initial",
"llm_properties": {
"messages": [
{
"role": "system"
}
]
}
}
]
}
}
}
]
},
"ai_agent": {
"v1": [
{
"properties": {
"configuration": {
"stt": {
"recognition_shift": {
"direction": "backward"
},
"engine": "gsr",
"intent_properties": {
"llm_properties": {
"messages": [
{
"role": "system"
}
]
}
},
"interruption_shift": {
"direction": "backward"
}
}
}
}
}
]
},
"transcription": {
"v1": [
{
"properties": {
"request": {
"requests": [
{
"source": {
"type": "last_recording"
},
"engine": "whisper"
}
]
}
}
}
]
}
},
"forest": {
"trees": [
{
"nodes": [
{
"brick": {
"type": "ai_agent"
}
}
]
}
]
},
"properties": {
"engine_version": "v3"
}
}
}

Bad request

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
error
required
One of:

The credential acts for a tenant or for the platform, and the request names no account in X-Account-Sid (or no tenant in X-Tenant-Sid).

string
Allowed values: missing_scope_header
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "missing_scope_header"
}

Unauthorized

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
error
required
One of:

Refuses a request that cannot be authenticated.

Returned when:

  • The request carries no usable credential.
  • The user, account or tenant behind the credential is not active.
string
Allowed values: unauthenticated
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "unauthenticated"
}

Forbidden

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
error
required
One of:

The credential is valid and in scope, but the caller’s roles do not grant the permission the operation needs.

string
Allowed values: permission_denied
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "permission_denied"
}

Not found

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
error
required
One of:

Refuses an identifier that names no resource the caller can use.

Returned when:

  • No live resource with this identifier is visible to the caller.
  • The resource the identifier names belongs to another account.
string
Allowed values: not_found
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "not_found"
}

Unprocessable

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
error
required
One of:

A resource the scenario or template names cannot be copied, so nothing is created and no resource is left behind.

string
Allowed values: scenario_copy_failed
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "scenario_copy_failed"
}

Too many requests

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
error
required
One of:

More requests than the operation allows in its window; wait and retry.

string
Allowed values: rate_limited
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "rate_limited"
}

Internal server error

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

  • ERRxxx: is a generic code that follows from the status class.
  • ERR001–ERR020: are reserved for generic codes.
  • SCN1xx and other entity-prefixed codes: appear only inside validation details.
string
message
required
string
data

Carries structured detail, present only where there is structure to carry it.

By failure:

  • A validation failure carries the topic validation and per-entity errors.
  • A delete conflict carries the topic conflict; its referencing dependents are in agents, automations, routings, users or roles, depending on what holds the resource.
  • A scenario publish refused because of its agents carries the topic conflict, with agents.
  • An agent change refused because of its automations carries the topic conflict, with automations.
  • A file none of whose rows is usable carries the topic rows_rejected, with rows and reasons.
  • Contact data past a limit of its account carries trigger, field and params.
  • A data field rename that cannot be applied carries field and, when a contact stops it, contact.
  • A contact number that is refused carries reason.
object
topic
string
reason

Names why a number or a row is refused.

Values:

  • number_missing: the number is missing or blank.
  • number_no_digits: the number holds no digits.
  • identifier_invalid: an alphanumeric identifier does not start with a letter or a digit.
  • number_not_international: the number is written as international and is not a valid one.
  • number_not_for_country: the number is not valid for the stated country_code.
  • country_code_required: the number is not international, and no country_code was stated to read it by.
  • value_too_long: a data value is longer than the account’s value limit in bytes. Given for a row only.
  • type_mismatch: a data value does not read as the type its field holds across the account’s contacts. Given for a row only.
string
Allowed values: number_missing number_no_digits identifier_invalid number_not_international number_not_for_country country_code_required value_too_long type_mismatch
errors

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the 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

Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.

Array<object>

An agent a delete or a scenario publish was rejected for.

object
id
required
string
name
required
string
automations

Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live automation that holds the resource a delete was rejected for.

object
id
required
string
name
required
string
routings

Lists the live routings of agents that are not archived whose condition or scenario holds the resource a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live routing of an agent that is not archived, which holds the resource a delete was rejected for.

object
id
required
string
name
required
string
agent_sid
required
string
users

Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live user that holds the role a delete was rejected for.

object
id
required
string
email
required
string
roles

Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.

Array<object>

A live role that inherits the role a delete was rejected for.

object
id
required
string
name
required
string
rows

Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.

integer format: int64
reasons

How many rows of a refused file were rejected for each reason; a reason no row had is absent.

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

An alphanumeric identifier does not start with a letter or a digit.

integer format: int64
number_not_international

The number is written as international and is not a valid one.

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

The number is not international, and no country_code was stated to read it by.

integer format: int64
value_too_long

A data cell holds a value longer than the account’s value limit in bytes.

integer format: int64
type_mismatch

A data cell does not read as the type its field holds across the account’s contacts.

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

  • array_item_not_scalar: an array item is an object, an array or null.
  • type_mismatch: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object.
string
Allowed values: too_many_fields value_too_long too_many_array_items array_item_not_scalar type_mismatch
field

Names the field by its path.

By failure:

  • For a broken limit, it is the field that breaks the limit.
  • For too many fields, it is the first new field past the limit.
  • For a rename, it is the field that stops the rename.
string
contact

Names the first contact whose data stops a rename; absent when the two paths alone conflict.

string
params

Carries the details of the breach.

By breach:

  • For a broken limit, it carries the numbers of the limit.
  • For a type mismatch, it carries the two types.
  • For an array item that is not a scalar, it is empty.
object
limit

Reports the account’s limit.

integer
current

Reports the value the data would have: the fields, the bytes or the items.

integer
type

Names the type the field holds across the account’s contacts.

string
got

Names the type of the new value.

string
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
}
}

Error codes

StatusErrorMeaning
400missing_scope_headerThe credential acts for a tenant or for the platform, and the request names no account in X-Account-Sid (or no tenant in X-Tenant-Sid).
400scope_conflictRefuses the value of the scope header. Returned when: - The scope header names an account or tenant the credential does not cover. - The scope header carries a value that is not an id of that kind.
401unauthenticatedRefuses a request that cannot be authenticated. Returned when: - The request carries no usable credential. - The user, account or tenant behind the credential is not active.
403permission_deniedThe credential is valid and in scope, but the caller's roles do not grant the permission the operation needs.
404not_foundRefuses an identifier that names no resource the caller can use. Returned when: - No live resource with this identifier is visible to the caller. - The resource the identifier names belongs to another account.
404scenario_not_foundRefuses a scenario id the caller cannot see. Returned when: - No scenario with this id exists. - The scenario belongs to an account outside the caller's tenant. - The scenario belongs to another account of the tenant and is not shared for copy.
422scenario_copy_failedA resource the scenario or template names cannot be copied, so nothing is created and no resource is left behind.
429rate_limitedMore requests than the operation allows in its window; wait and retry.