Skip to content

Get communication

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

Returns one call of the caller’s account; a deleted one reads as absent.

Rules:

  • The recording and the saved call history are not in the row: has_recording and has_call_history say whether their sub-resources will serve anything.
  • include resolves the agent, scenario, result deliveries, contact, automation and run into included, the same maps the list answers with.

Permission

This operation needs the permission communication:read.

Some values of the include parameter need a permission of their own.

id
required
string
include
string

Comma-separated related resources to resolve into included. Accepted: agent, scenario, communication_result, contact, automation, automation_attempt.

agent needs the permission agent:read.
scenario needs the permission scenario:read.
communication_result needs the permission communication:read.
contact needs the permission contact:read.
automation needs the permission agent:automation:read.
automation_attempt needs the permission agent:automation:read.
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.

OK

Media typeapplication/json

The full communication plus included, the relations include resolved for it; {} when none were asked for.

object
id
required
string
account_sid
required
string
agent_sid
required
string
scenario_sid
required

Names the scenario the communication runs. Empty on a call of an agent that is not dialled or answered yet: the agent’s routings choose its scenario then.

string
automation_sid
required

Names the automation that produced this call. Empty for a call no automation placed.

string | null
contact_sid
required

Names the person this call is for. Empty where the other party could not be identified as a contact.

string | null
version
required

Names the published scenario version; null when the run used a draft, and on a call of an agent that is not dialled or answered yet.

integer | null
draft_version
required

Names the draft scenario version; null when the run used a published version. At most one of version / draft_version is set.

integer | null
automation_attempt_sid
required

Names the run within that automation. Empty for a call no run produced.

string | null
recipient
required
string
direction
required
string
Allowed values: inbound outbound
communication_status
required

Where the call stands. stopped is the one that is not an outcome: the call was asked for and never placed, because the work that asked for it was switched off first, so the person is still to reach. in_progress_offline is a call that has ended while its scenario still runs the bricks that need no call; the line is free, and the outcome follows when the scenario ends.

string
Allowed values: new ready dialing in_progress in_progress_offline bounced done failed drifted stopped
call_status
required
Any of:

Reports the telephony state of the call.

Values:

  • trying, ringing and answered are transient: the call is still running.
  • Every other value is final.
  • abandoned: is an inbound call the caller ended before it was answered.
string
Allowed values: trying ringing answered busy rejected no_answer voicemail incomplete completed failed tech_canceled abandoned
reason
required

Explains why the communication reached its current status.

Values:

  • agent_at_capacity: is a stable token for a call refused because the agent was at capacity.
  • no_published_routing: is a stable token for an outbound call through an agent that is not a test and found no routing with a published scenario. The call is failed and is not retried.
  • no_number_to_dial_from: is a stable token for a call with no number to dial from. The call is failed and is not retried.
  • Every other value is free text.

Rules:

  • It is taken from the last status change that gave a reason.
  • A move to ready clears it.
string
data
required
object | null
variables
required

Records the variables the call ended with; null until the call reaches a final status. call.dialog-TEXT, call.dialog-BASE64 and the system variables of the last and the current brick (last_question.*, last_webhook.* and the other last_<brick>.* families, current_brick.*) are not kept. contact holds the contact’s data as JSON text, the fields the call wrote included: {{contact.first_name}} in a brick is first_name inside it.

object | null
communication_status_history
required

Records every change of communication_status, oldest first.

Array<object>
object
from
required

Where the call stands. stopped is the one that is not an outcome: the call was asked for and never placed, because the work that asked for it was switched off first, so the person is still to reach. in_progress_offline is a call that has ended while its scenario still runs the bricks that need no call; the line is free, and the outcome follows when the scenario ends.

string
Allowed values: new ready dialing in_progress in_progress_offline bounced done failed drifted stopped
to
required

Where the call stands. stopped is the one that is not an outcome: the call was asked for and never placed, because the work that asked for it was switched off first, so the person is still to reach. in_progress_offline is a call that has ended while its scenario still runs the bricks that need no call; the line is free, and the outcome follows when the scenario ends.

string
Allowed values: new ready dialing in_progress in_progress_offline bounced done failed drifted stopped
reason
string
call_sid
string
at
required
string format: date-time
call_status_history
required

Records every change of call_status, oldest first; [] while the call has no telephony state.

Array<object>

One change of call_status.

object
from
required
Any of:

Reports the telephony state of the call.

Values:

  • trying, ringing and answered are transient: the call is still running.
  • Every other value is final.
  • abandoned: is an inbound call the caller ended before it was answered.
string
Allowed values: trying ringing answered busy rejected no_answer voicemail incomplete completed failed tech_canceled abandoned
to
required

Reports the telephony state of the call.

Values:

  • trying, ringing and answered are transient: the call is still running.
  • Every other value is final.
  • abandoned: is an inbound call the caller ended before it was answered.
string
Allowed values: trying ringing answered busy rejected no_answer voicemail incomplete completed failed tech_canceled abandoned
reason

Explains why the call moved to this state; absent when the change had no reason.

string
at
required
string format: date-time
scheduled_at
required
string | null format: date-time
timezone
required

Names the IANA zone the calling window is read in: the agent’s, else the account’s.

Rules:

  • The field is empty on an inbound call.
  • The field is empty when neither the agent nor the account names one.
  • When the field is empty, the window is read in UTC.
string
next_call_at
required

Records the earliest moment the dispatcher may place the call; the moment is a floor, not a schedule.

Rules:

  • The moment is scheduled_at or the creation time.
  • After a bounce, the retry backoff sets the moment.
  • The call is never placed before this moment.
  • A call that is due outside the agent’s calling window is moved to the window’s next opening when it is claimed.
string format: date-time
call_attempt_number
required
integer
executor_id
required
string | null
call_sid
required
string | null
duration
required

Reports the call duration between answer and hangup, in seconds; 0 until the call completes.

integer
is_test
required

Says whether this is a test communication.

boolean
prefer_draft
required

Says whether the test call asked for the draft of its scenario first. draft_version says whether it played one.

boolean
consent_granted
required

Says whether personal-data recording consent was granted for the call.

boolean
has_recording
required

Says whether a stored call recording exists for this communication.

boolean
has_call_history
required

Says whether a saved call history exists for this communication: the document GET /v1/a/communication/{id}/history serves.

boolean
number
required
Any of:

A copy of the number as it stood at call time. A later edit or delete of the number or the pool does not change it.

object
sid
required

Identifies the number the call used. Kept after the number is deleted.

string
identifier
required

Records the number’s identifier at call time.

string
pool_sid
required

Identifies the agent’s pool the number belongs to; null when the call did not go through a pool.

string | null
pool_name
required

Records the pool’s name at call time.

string | null
result_payload
required
Any of:

The call as it stood when it finished. A later change to the call does not change it. The body each target receives also carries download links for the recording and the call history, made fresh at every send.

object
communication_sid
required
string
account_sid
required
string
call_sid
required
string | null
recipient
required
string
direction
required
string
Allowed values: inbound outbound
scenario_sid
required

Names the scenario the call ran.

string | null
version
required

Names the published scenario version the call ran; null when it ran a draft.

integer | null
draft_version
required

Names the draft scenario version the call ran; null when it ran a published version.

integer | null
communication_status
required

Where the call stands. stopped is the one that is not an outcome: the call was asked for and never placed, because the work that asked for it was switched off first, so the person is still to reach. in_progress_offline is a call that has ended while its scenario still runs the bricks that need no call; the line is free, and the outcome follows when the scenario ends.

string
Allowed values: new ready dialing in_progress in_progress_offline bounced done failed drifted stopped
call_status
required
Any of:

Reports the telephony state of the call.

Values:

  • trying, ringing and answered are transient: the call is still running.
  • Every other value is final.
  • abandoned: is an inbound call the caller ended before it was answered.
string
Allowed values: trying ringing answered busy rejected no_answer voicemail incomplete completed failed tech_canceled abandoned
reason
required
string
duration
required

Reports the call duration between answer and hangup, in seconds.

integer
variables
required

Carries the call’s variables.

object
key
additional properties
any
occurred_at
required

Records when the call reached its final status.

string format: date-time
routing_sid
required

Names the routing of the agent that chose the scenario of the call, the default routing included.

Null when:

  • The call has no agent.
  • The call is a scenario test call.
  • The call of an agent is not dialled yet.
  • The call was placed before routing existed.
string | null
routing_plan
required
Any of:
object
variables
required

Records the value of every field the checked conditions read, as it was compared, nested by the parts of the field name. The moment now is at now.datetime.

object
key
additional properties
any
routes
required

Lists the routings checked, in order, up to the one that took the call, which is always last.

Array<object>
object
position
required

Records the place of the routing in the agent’s list at that moment.

integer
routing_id
required
string
name
required

Records the name of the routing at that moment.

string
expression
required

Records the condition at that moment. Null on the default routing.

string | null
passed
required

Records whether the routing took the call.

boolean
skipped

Records why a routing whose condition matched did not take the call. draft: the call is not a test and the routing’s scenario has no published version.

string
Allowed values: draft
created_at
required
string format: date-time
updated_at
required
string format: date-time
included
required

Carries the related resources resolved for this response, one map per relation under the relation’s name.

Rules:

  • Each map is keyed by the related resource’s own id (included.agent[id]).
  • A to-many relation is keyed the same way.
  • Each result delivery carries its communication_sid.
  • A relation’s map is present whenever it was requested.
  • A map is empty if nothing resolved.
  • A reference the caller may not read is absent from the map, and the communication keeps its sid.
object
agent
object
key
additional properties
object
id
required
string
account_sid
required
string
name
required

Unique among the agents of the account that are not archived; archiving or deleting an agent frees its name.

string
gateway_type
required

Declares the gateway kind.

Rules:

  • The matching sid (number_sid / number_pool_sid) carries the gateway.
  • The other sid stays empty.

Any other combination of the sids is refused.

string
Allowed values: number number_pool
number_sid
required
string | null
number_pool_sid
required
string | null
scenario_sid
required
string
voicemail_enabled
required

Turns on answering machine detection for the agent’s outbound calls on a scenario whose start call brick is v1.

boolean
call_recording
required
boolean
calling_schedule
required
Any of:

Restricts when the agent’s calls are placed: only inside the minutes its schedules name, read in the agent’s timezone.

Rules:

  • A call that comes due outside them is held and placed when they next open.
  • Absent, the platform default applies: 08:00–19:59 every day.
  • Test calls are not held by it.

Refused when:

  • The strategy is unknown.
  • The value holds no schedule.
  • A schedule does not parse.
object
strategy
required

How args is read. default reads args.schedules as cron expressions.

string
Allowed values: default
args
required
object
schedules
required

Lists five-field cron expressions (minute, hour, day of month, month, day of week).

Rules:

  • A call may be placed in any minute at least one of them matches: for example * 8-19 * * 1-5 is 08:00–19:59, Monday to Friday.
  • At least one is required.
Array<string>
>= 1 items
timezone
required

Names the IANA zone the calling window is read in, such as Europe/Warsaw. When empty, the account’s zone applies.

string
lines
required

Simultaneous calls this agent holds, answered and placed together.

integer
is_test
required
boolean
communication_result
required
Any of:
object
targets
Array<object>
object
url
string
sms
required
Any of:

Sets the SMS routing: the provider to send through and the sender.

The sender:

  • With use_alpha, it is one of the provider’s alphas.
  • Otherwise, it is one of the provider’s numbers.
  • It is always an explicitly registered value.
object
provider_sid
required
string
use_alpha
boolean
alpha

Sets the sender alpha. Required when use_alpha is true; one of the provider’s alphas.

string
number

Sets the sender number. Required when use_alpha is false; one of the provider’s numbers.

string
status
required

Declares the agent’s status.

Values:

  • inactive: pauses the agent; it keeps its number or pool, its name and its lines.
  • archived: is final and is reached only through archive; written in a create or a patch, it is refused.
string
Allowed values: active inactive archived
status_changed_at
required

Records when status last changed.

string format: date-time
status_history
required

Records every change of status, oldest first.

Array<object>
object
from
required

Declares the agent’s status.

Values:

  • inactive: pauses the agent; it keeps its number or pool, its name and its lines.
  • archived: is final and is reached only through archive; written in a create or a patch, it is refused.
string
Allowed values: active inactive archived
to
required

Declares the agent’s status.

Values:

  • inactive: pauses the agent; it keeps its number or pool, its name and its lines.
  • archived: is final and is reached only through archive; written in a create or a patch, it is refused.
string
Allowed values: active inactive archived
at
required
string format: date-time
old_number
required

Records the identifier of the number the agent held when it was archived.

Null when:

  • The agent is not archived yet.
  • The agent is on a pool.
string | null
old_number_pool
required

Records the name of the pool the agent used when it was archived.

Null when:

  • The agent is not archived yet.
  • The agent is on a number.
string | null
created_at
required
string format: date-time
updated_at
required
string format: date-time
scenario
object
key
additional properties

A scenario as embedded in another resource’s included map: every Scenario field except constructor. Read GET /v1/a/scenario/{id} for the constructor.

object
id
required
string
type
required
string
Allowed values: constructor
name
required
string
template
required
string
description
required
string
account_sid
required
string
fix_communication_ttl
required
integer
is_shared_for_copy
required
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
communication_result
object
key
additional properties
object
id
required
string
communication_sid
required
string
account_sid
required
string
target_url
required
string
status
required
string
Allowed values: new in_progress delivered undelivered failed
attempts
required
integer
next_attempt_at
required
string format: date-time
status_changed_at
required
string format: date-time
last_error
required
string
last_response_status
required
integer | null
history
required
Array<object> | null
object
at
required
string format: date-time
http_status
integer
error
string
delivered_at
required
string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time
contact

Resolves the contact each contact_sid names, in the list row shape.

object
key
additional properties

A contact as it appears in a list, without the communication_history array. Read GET /v1/a/contact/{id} for a contact’s full record.

object
id
required
string
account_sid
required

Names the account that owns the contact.

string
number
required

Identifies the contact within the account, in the stored form.

By type:

  • A phone number is stored as its country calling code followed by the national number, digits only (37123112233).
  • A SIP identifier is stored as it was sent.
string
type
required
Any of:

Declares what an identifier is.

Values:

  • number: is a phone number, brought to the stored form before it is kept or compared.
  • alphanumeric: is a SIP identifier, kept as sent and checked only to start with a letter or a digit.

A request that omits it means number, and a value outside the two is refused.

string
Allowed values: number alphanumeric
country_code
required

Records the country the stored number belongs to, ISO 3166-1 alpha-2, lowercase.

Null when:

  • The identifier is alphanumeric.
  • The number is outside any country’s range.
  • The platform holds no country for the number.
string | null
data
required

Holds everything the account has on the person; {} when nothing is held.

object
key
additional properties
any
revision
required

Hash of the contact’s current number, type, country_code and data. An edit sends it back to prevent a lost update under concurrent writes.

string
segment_sids
required

Lists the account’s segments this contact is currently in, its default segment included.

Array<string>
created_at
required
string format: date-time
updated_at
required
string format: date-time
automation

Resolves the automation each automation_sid names; a call placed by hand resolves nothing here.

object
key
additional properties
object
id
required
string
account_sid
required
string
agent_sid
required
string
segment_sid
required
string
limit_policy_sid
required

Names the slice of the agent’s capacity this automation competes inside. Empty means it competes for whatever the agent’s policies did not reserve.

string | null
name
required

Unique among the live automations of the same agent; archiving frees it.

string
mode
required

Declares how the automation decides when to run.

Values:

  • manual: places its calls when a person starts it.
  • scheduled: opens each of its attempts at the moment that attempt names.
string
Allowed values: manual scheduled
status
required

Records where the automation stands.

Values:

  • new: has never run.
  • idle: is switched on with nothing due.
  • in_progress: is placing calls.
  • done: has nothing left to call.
  • stopped: was switched off by a person.
  • archived: never runs again.

The status is the system’s to write: a person moves it through stop, start and archive.

string
Allowed values: new idle in_progress done stopped archived
status_changed_at
required

Records when status last changed.

string format: date-time
status_history
required

Records every change of status, oldest first.

Array<object>
object
from
required

Records where the automation stands.

Values:

  • new: has never run.
  • idle: is switched on with nothing due.
  • in_progress: is placing calls.
  • done: has nothing left to call.
  • stopped: was switched off by a person.
  • archived: never runs again.

The status is the system’s to write: a person moves it through stop, start and archive.

string
Allowed values: new idle in_progress done stopped archived
to
required

Records where the automation stands.

Values:

  • new: has never run.
  • idle: is switched on with nothing due.
  • in_progress: is placing calls.
  • done: has nothing left to call.
  • stopped: was switched off by a person.
  • archived: never runs again.

The status is the system’s to write: a person moves it through stop, start and archive.

string
Allowed values: new idle in_progress done stopped archived
at
required
string format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time
automation_attempt

Resolves the run each automation_attempt_sid names; a call placed by hand resolves nothing here.

object
key
additional properties

One run of an automation, over the contacts it had not reached when the run opened.

object
id
required
string
account_sid
required
string
automation_sid
required
string
status
required

Records where one run stands.

Values:

  • new: has not opened yet.
  • in_progress: is placing calls.
  • done: finished its calls.
  • stopped: was cut short by its window or by a person.
  • skipped: never opened.
string
Allowed values: new in_progress done stopped skipped
status_changed_at
required

Records when status last changed.

string format: date-time
status_history
required

Records every change of status, oldest first, so it carries the moment the run opened and the moment it ended.

Array<object>
object
from
required

Records where one run stands.

Values:

  • new: has not opened yet.
  • in_progress: is placing calls.
  • done: finished its calls.
  • stopped: was cut short by its window or by a person.
  • skipped: never opened.
string
Allowed values: new in_progress done stopped skipped
to
required

Records where one run stands.

Values:

  • new: has not opened yet.
  • in_progress: is placing calls.
  • done: finished its calls.
  • stopped: was cut short by its window or by a person.
  • skipped: never opened.
string
Allowed values: new in_progress done stopped skipped
reason
required
Any of:

Records why the run moved to stopped or skipped.

On a move to stopped:

  • window_ended: the run’s window ran out.
  • stopped_by_user: a user stopped or deleted the automation, or archived its agent.

On a move to skipped:

  • overtaken: a later run of the automation opened while this run’s window was still open.
  • window_missed: the window ended before the run could open.
  • ended_by_user: a user archived or deleted the automation, or archived its agent.
string
Allowed values: window_ended stopped_by_user overtaken window_missed ended_by_user
at
required
string format: date-time
starts_at
required
string | null format: date-time
ends_at
required

Records when calling stops. Empty on an attempt that runs until its calls are all over.

string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"direction": "inbound",
"communication_status": "new",
"call_status": "trying",
"communication_status_history": [
{
"from": "new",
"to": "new"
}
],
"call_status_history": [
{
"from": "trying",
"to": "trying"
}
],
"result_payload": {
"direction": "inbound",
"communication_status": "new",
"call_status": "trying"
},
"routing_plan": {
"routes": [
{
"skipped": "draft"
}
]
},
"included": {
"agent": {
"additionalProperty": {
"gateway_type": "number",
"calling_schedule": {
"strategy": "default"
},
"status": "active",
"status_history": [
{
"from": "active",
"to": "active"
}
]
}
},
"scenario": {
"additionalProperty": {
"type": "constructor"
}
},
"communication_result": {
"additionalProperty": {
"status": "new"
}
},
"contact": {
"additionalProperty": {
"type": "number"
}
},
"automation": {
"additionalProperty": {
"mode": "manual",
"status": "new",
"status_history": [
{
"from": "new",
"to": "new"
}
]
}
},
"automation_attempt": {
"additionalProperty": {
"status": "new",
"status_history": [
{
"from": "new",
"to": "new",
"reason": "window_ended"
}
]
}
}
}
}

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:

Refuses a request whose form is wrong.

Returned when:

  • The body, a path parameter or a query parameter does not parse.
  • Content-Encoding names a compression the API does not accept, or the body cannot be decompressed as named.
  • A brick to validate names a type or a version the API does not know.
  • A data field path or a column name in the body is not well formed, or a key of a row’s data is empty or holds a dot.
  • A node position in the constructor of a scenario save carries one of x and y without the other.
  • The operation needs a WebSocket upgrade, and the request is not one.

message names what failed.

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

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 the communication id in the request.

Returned when:

  • No communication has this id.
  • The communication with this id was deleted.
string
Allowed values: communication_not_found
Example
{
"data": {
"reason": "number_missing",
"trigger": "too_many_fields"
},
"error": "communication_not_found"
}

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
400bad_requestRefuses a request whose form is wrong. Returned when: - The body, a path parameter or a query parameter does not parse. - Content-Encoding names a compression the API does not accept, or the body cannot be decompressed as named. - A brick to validate names a type or a version the API does not know. - A data field path or a column name in the body is not well formed, or a key of a row's data is empty or holds a dot. - A node position in the constructor of a scenario save carries one of x and y without the other. - The operation needs a WebSocket upgrade, and the request is not one. message names what failed.
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.
404communication_not_foundRefuses the communication id in the request. Returned when: - No communication has this id. - The communication with this id was deleted.
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.