List communications
const url = 'https://example.com/v1/a/communication?direction=inbound&status=new&call_status=trying';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/a/communication?direction=inbound&status=new&call_status=trying' \ --header 'Authorization: Bearer <token>'Lists the calls, newest first.
Rules:
- This resource takes no sort parameters.
- Rows carry everything the single read does.
includeresolves a row’s agent, scenario, result deliveries, contact, automation and run intoincluded.- A call placed by hand resolves no automation and no run.
Permission
This operation needs the permission communication:read.
Some values of the include parameter need a permission of their own.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page size, max 500 (default 100).
Include soft-deleted rows when true.
Names the fields, comma-separated, that filter_query OR-searches.
Values:
call_sid: matched exactly.recipient: matched as a substring, case-insensitive.
Search term matched across the fields named in filter_or.
Narrows the list by the kind of scenario version the run used.
Values:
true: lists the runs on a draft, which havedraft_versionset.false: lists the runs on a published version, which haveversionset.- Omitted: lists both kinds, and the calls of an agent not dialled yet, which have neither.
Published scenario version the run used.
Draft scenario version the run used.
Filter by the scenario recorded on the communication.
Exact match on the whole recipient as the communication records it; a dispatched phone number is recorded in the stored form, digits only. Name recipient in filter_or to match a fragment of one.
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.
Reports the telephony state of the call.
Values:
trying,ringingandansweredare transient: the call is still running.- Every other value is final.
abandoned: is an inbound call the caller ended before it was answered.
Narrows the list to the calls one automation produced.
Shortest call duration to return, in seconds, inclusive.
Longest call duration to return, in seconds, inclusive.
Comma-separated related resources to resolve into included. Accepted: agent, scenario, communication_result, contact, automation, automation_attempt.
Header Parameters
Section titled “Header Parameters”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.
Responses
Section titled “Responses”OK
object
object
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.
Names the automation that produced this call. Empty for a call no automation placed.
Names the person this call is for. Empty where the other party could not be identified as a contact.
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.
Names the draft scenario version; null when the run used a published version. At most one of version / draft_version is set.
Names the run within that automation. Empty for a call no run produced.
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.
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 isfailedand is not retried.no_number_to_dial_from: is a stable token for a call with no number to dial from. The call isfailedand 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
readyclears it.
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.
Records every change of communication_status, oldest first.
object
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.
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.
Records every change of call_status, oldest first; [] while the call has no telephony state.
One change of call_status.
object
Reports the telephony state of the call.
Values:
trying,ringingandansweredare transient: the call is still running.- Every other value is final.
abandoned: is an inbound call the caller ended before it was answered.
Explains why the call moved to this state; absent when the change had no reason.
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.
Records the earliest moment the dispatcher may place the call; the moment is a floor, not a schedule.
Rules:
- The moment is
scheduled_ator 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.
Reports the call duration between answer and hangup, in seconds; 0 until the call completes.
Says whether this is a test communication.
Says whether the test call asked for the draft of its scenario first. draft_version says whether it played one.
Says whether personal-data recording consent was granted for the call.
Says whether a stored call recording exists for this communication.
Says whether a saved call history exists for this communication: the document GET /v1/a/communication/{id}/history serves.
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
Identifies the number the call used. Kept after the number is deleted.
Records the number’s identifier at call time.
Identifies the agent’s pool the number belongs to; null when the call did not go through a pool.
Records the pool’s name at call time.
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
Names the scenario the call ran.
Names the published scenario version the call ran; null when it ran a draft.
Names the draft scenario version the call ran; null when it ran a published version.
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.
Reports the call duration between answer and hangup, in seconds.
Carries the call’s variables.
object
Records when the call reached its final status.
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.
object
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
Lists the routings checked, in order, up to the one that took the call, which is always last.
object
Records the place of the routing in the agent’s list at that moment.
Records the name of the routing at that moment.
Records the condition at that moment. Null on the default routing.
Records whether the routing took the call.
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.
Counts the communications matching the query, ignoring paging.
Reports the page size applied to this request.
Reports the offset applied to this request.
Says whether records beyond this page match the query.
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
object
object
Unique among the agents of the account that are not archived; archiving or deleting an agent frees its name.
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.
Turns on answering machine detection for the agent’s outbound calls on a scenario whose start call brick is v1.
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
strategyis unknown. - The value holds no schedule.
- A schedule does not parse.
object
How args is read. default reads args.schedules as cron expressions.
object
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-5is 08:00–19:59, Monday to Friday. - At least one is required.
Names the IANA zone the calling window is read in, such as Europe/Warsaw. When empty, the account’s zone applies.
Simultaneous calls this agent holds, answered and placed together.
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
Sets the sender alpha. Required when use_alpha is true; one of the provider’s alphas.
Sets the sender number. Required when use_alpha is false; one of the provider’s numbers.
Declares the agent’s status.
Values:
inactive: pauses the agent; it keeps its number or pool, its name and itslines.archived: is final and is reached only through archive; written in a create or a patch, it is refused.
Records when status last changed.
Records every change of status, oldest first.
object
Declares the agent’s status.
Values:
inactive: pauses the agent; it keeps its number or pool, its name and itslines.archived: is final and is reached only through archive; written in a create or a patch, it is refused.
Declares the agent’s status.
Values:
inactive: pauses the agent; it keeps its number or pool, its name and itslines.archived: is final and is reached only through archive; written in a create or a patch, it is refused.
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.
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.
object
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
Says whether a version has been published. false while the scenario exists as a draft only.
object
object
object
Resolves the contact each contact_sid names, in the list row shape.
object
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
Names the account that owns the contact.
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.
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.
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.
Holds everything the account has on the person; {} when nothing is held.
object
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.
Lists the account’s segments this contact is currently in, its default segment included.
Resolves the automation each automation_sid names; a call placed by hand resolves nothing here.
object
object
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.
Unique among the live automations of the same agent; archiving frees it.
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.
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.
Records when status last changed.
Records every change of status, oldest first.
object
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.
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.
Resolves the run each automation_attempt_sid names; a call placed by hand resolves nothing here.
object
One run of an automation, over the contacts it had not reached when the run opened.
object
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.
Records when status last changed.
Records every change of status, oldest first, so it carries the moment the run opened and the moment it ended.
object
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.
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.
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.
Records when calling stops. Empty on an attempt that runs until its calls are all over.
Example
{ "items": [ { "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
object
Carries the stable lower_snake_case usecase code, such as scenario_not_found.
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.SCN1xxand other entity-prefixed codes: appear only inside validation details.
Carries structured detail, present only where there is structure to carry it.
By failure:
- A validation failure carries the topic
validationand per-entityerrors. - A delete conflict carries the topic
conflict; its referencing dependents are inagents,automations,routings,usersorroles, depending on what holds the resource. - A scenario publish refused because of its agents carries the topic
conflict, withagents. - An agent change refused because of its automations carries the topic
conflict, withautomations. - A file none of whose rows is usable carries the topic
rows_rejected, withrowsandreasons. - Contact data past a limit of its account carries
trigger,fieldandparams. - A data field rename that cannot be applied carries
fieldand, when a contact stops it,contact. - A contact number that is refused carries
reason.
object
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 statedcountry_code.country_code_required: the number is not international, and nocountry_codewas 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.
Groups the validation errors by entity.
object
object
Carries the SCN1xx constructor validation code.
Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.
An agent a delete or a scenario publish was rejected for.
object
Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.
A live automation that holds the resource a delete was rejected for.
object
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.
A live routing of an agent that is not archived, which holds the resource a delete was rejected for.
object
Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.
A live user that holds the role a delete was rejected for.
object
Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.
A live role that inherits the role a delete was rejected for.
object
Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.
How many rows of a refused file were rejected for each reason; a reason no row had is absent.
object
The number cell is blank.
The number holds no digits.
An alphanumeric identifier does not start with a letter or a digit.
The number is written as international and is not a valid one.
The number is not valid for the stated country_code.
The number is not international, and no country_code was stated to read it by.
A data cell holds a value longer than the account’s value limit in bytes.
A data cell does not read as the type its field holds across the account’s contacts.
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.
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.
Names the first contact whose data stops a rename; absent when the two paths alone conflict.
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
Reports the account’s limit.
Reports the value the data would have: the fields, the bytes or the items.
Names the type the field holds across the account’s contacts.
Names the type of the new value.
Refuses a request whose form is wrong.
Returned when:
- The body, a path parameter or a query parameter does not parse.
Content-Encodingnames 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
datais empty or holds a dot. - A node
positionin the constructor of a scenario save carries one ofxandywithout the other. - The operation needs a WebSocket upgrade, and the request is not one.
message names what failed.
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).
Refuses 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.
Example
{ "data": { "reason": "number_missing", "trigger": "too_many_fields" }, "error": "bad_request"}Unauthorized
object
Carries the stable lower_snake_case usecase code, such as scenario_not_found.
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.SCN1xxand other entity-prefixed codes: appear only inside validation details.
Carries structured detail, present only where there is structure to carry it.
By failure:
- A validation failure carries the topic
validationand per-entityerrors. - A delete conflict carries the topic
conflict; its referencing dependents are inagents,automations,routings,usersorroles, depending on what holds the resource. - A scenario publish refused because of its agents carries the topic
conflict, withagents. - An agent change refused because of its automations carries the topic
conflict, withautomations. - A file none of whose rows is usable carries the topic
rows_rejected, withrowsandreasons. - Contact data past a limit of its account carries
trigger,fieldandparams. - A data field rename that cannot be applied carries
fieldand, when a contact stops it,contact. - A contact number that is refused carries
reason.
object
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 statedcountry_code.country_code_required: the number is not international, and nocountry_codewas 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.
Groups the validation errors by entity.
object
object
Carries the SCN1xx constructor validation code.
Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.
An agent a delete or a scenario publish was rejected for.
object
Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.
A live automation that holds the resource a delete was rejected for.
object
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.
A live routing of an agent that is not archived, which holds the resource a delete was rejected for.
object
Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.
A live user that holds the role a delete was rejected for.
object
Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.
A live role that inherits the role a delete was rejected for.
object
Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.
How many rows of a refused file were rejected for each reason; a reason no row had is absent.
object
The number cell is blank.
The number holds no digits.
An alphanumeric identifier does not start with a letter or a digit.
The number is written as international and is not a valid one.
The number is not valid for the stated country_code.
The number is not international, and no country_code was stated to read it by.
A data cell holds a value longer than the account’s value limit in bytes.
A data cell does not read as the type its field holds across the account’s contacts.
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.
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.
Names the first contact whose data stops a rename; absent when the two paths alone conflict.
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
Reports the account’s limit.
Reports the value the data would have: the fields, the bytes or the items.
Names the type the field holds across the account’s contacts.
Names the type of the new value.
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.
Example
{ "data": { "reason": "number_missing", "trigger": "too_many_fields" }, "error": "unauthenticated"}Forbidden
object
Carries the stable lower_snake_case usecase code, such as scenario_not_found.
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.SCN1xxand other entity-prefixed codes: appear only inside validation details.
Carries structured detail, present only where there is structure to carry it.
By failure:
- A validation failure carries the topic
validationand per-entityerrors. - A delete conflict carries the topic
conflict; its referencing dependents are inagents,automations,routings,usersorroles, depending on what holds the resource. - A scenario publish refused because of its agents carries the topic
conflict, withagents. - An agent change refused because of its automations carries the topic
conflict, withautomations. - A file none of whose rows is usable carries the topic
rows_rejected, withrowsandreasons. - Contact data past a limit of its account carries
trigger,fieldandparams. - A data field rename that cannot be applied carries
fieldand, when a contact stops it,contact. - A contact number that is refused carries
reason.
object
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 statedcountry_code.country_code_required: the number is not international, and nocountry_codewas 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.
Groups the validation errors by entity.
object
object
Carries the SCN1xx constructor validation code.
Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.
An agent a delete or a scenario publish was rejected for.
object
Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.
A live automation that holds the resource a delete was rejected for.
object
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.
A live routing of an agent that is not archived, which holds the resource a delete was rejected for.
object
Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.
A live user that holds the role a delete was rejected for.
object
Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.
A live role that inherits the role a delete was rejected for.
object
Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.
How many rows of a refused file were rejected for each reason; a reason no row had is absent.
object
The number cell is blank.
The number holds no digits.
An alphanumeric identifier does not start with a letter or a digit.
The number is written as international and is not a valid one.
The number is not valid for the stated country_code.
The number is not international, and no country_code was stated to read it by.
A data cell holds a value longer than the account’s value limit in bytes.
A data cell does not read as the type its field holds across the account’s contacts.
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.
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.
Names the first contact whose data stops a rename; absent when the two paths alone conflict.
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
Reports the account’s limit.
Reports the value the data would have: the fields, the bytes or the items.
Names the type the field holds across the account’s contacts.
Names the type of the new value.
The credential is valid and in scope, but the caller’s roles do not grant the permission the operation needs.
Example
{ "data": { "reason": "number_missing", "trigger": "too_many_fields" }, "error": "permission_denied"}Not found
object
Carries the stable lower_snake_case usecase code, such as scenario_not_found.
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.SCN1xxand other entity-prefixed codes: appear only inside validation details.
Carries structured detail, present only where there is structure to carry it.
By failure:
- A validation failure carries the topic
validationand per-entityerrors. - A delete conflict carries the topic
conflict; its referencing dependents are inagents,automations,routings,usersorroles, depending on what holds the resource. - A scenario publish refused because of its agents carries the topic
conflict, withagents. - An agent change refused because of its automations carries the topic
conflict, withautomations. - A file none of whose rows is usable carries the topic
rows_rejected, withrowsandreasons. - Contact data past a limit of its account carries
trigger,fieldandparams. - A data field rename that cannot be applied carries
fieldand, when a contact stops it,contact. - A contact number that is refused carries
reason.
object
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 statedcountry_code.country_code_required: the number is not international, and nocountry_codewas 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.
Groups the validation errors by entity.
object
object
Carries the SCN1xx constructor validation code.
Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.
An agent a delete or a scenario publish was rejected for.
object
Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.
A live automation that holds the resource a delete was rejected for.
object
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.
A live routing of an agent that is not archived, which holds the resource a delete was rejected for.
object
Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.
A live user that holds the role a delete was rejected for.
object
Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.
A live role that inherits the role a delete was rejected for.
object
Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.
How many rows of a refused file were rejected for each reason; a reason no row had is absent.
object
The number cell is blank.
The number holds no digits.
An alphanumeric identifier does not start with a letter or a digit.
The number is written as international and is not a valid one.
The number is not valid for the stated country_code.
The number is not international, and no country_code was stated to read it by.
A data cell holds a value longer than the account’s value limit in bytes.
A data cell does not read as the type its field holds across the account’s contacts.
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.
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.
Names the first contact whose data stops a rename; absent when the two paths alone conflict.
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
Reports the account’s limit.
Reports the value the data would have: the fields, the bytes or the items.
Names the type the field holds across the account’s contacts.
Names the type of the new value.
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.
Example
{ "data": { "reason": "number_missing", "trigger": "too_many_fields" }, "error": "not_found"}Internal server error
object
Carries the stable lower_snake_case usecase code, such as scenario_not_found.
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.SCN1xxand other entity-prefixed codes: appear only inside validation details.
Carries structured detail, present only where there is structure to carry it.
By failure:
- A validation failure carries the topic
validationand per-entityerrors. - A delete conflict carries the topic
conflict; its referencing dependents are inagents,automations,routings,usersorroles, depending on what holds the resource. - A scenario publish refused because of its agents carries the topic
conflict, withagents. - An agent change refused because of its automations carries the topic
conflict, withautomations. - A file none of whose rows is usable carries the topic
rows_rejected, withrowsandreasons. - Contact data past a limit of its account carries
trigger,fieldandparams. - A data field rename that cannot be applied carries
fieldand, when a contact stops it,contact. - A contact number that is refused carries
reason.
object
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 statedcountry_code.country_code_required: the number is not international, and nocountry_codewas 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.
Groups the validation errors by entity.
object
object
Carries the SCN1xx constructor validation code.
Lists the agents a delete or a scenario publish was rejected for, capped at the first 20; message carries the total count.
An agent a delete or a scenario publish was rejected for.
object
Lists the live automations referencing the resource a delete was rejected for, capped at the first 20; message carries the total count.
A live automation that holds the resource a delete was rejected for.
object
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.
A live routing of an agent that is not archived, which holds the resource a delete was rejected for.
object
Lists the live users holding the role a delete was rejected for, capped at the first 20; message carries the total count.
A live user that holds the role a delete was rejected for.
object
Lists the live roles inheriting the role a delete was rejected for, capped at the first 20; message carries the total count.
A live role that inherits the role a delete was rejected for.
object
Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once.
How many rows of a refused file were rejected for each reason; a reason no row had is absent.
object
The number cell is blank.
The number holds no digits.
An alphanumeric identifier does not start with a letter or a digit.
The number is written as international and is not a valid one.
The number is not valid for the stated country_code.
The number is not international, and no country_code was stated to read it by.
A data cell holds a value longer than the account’s value limit in bytes.
A data cell does not read as the type its field holds across the account’s contacts.
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.
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.
Names the first contact whose data stops a rename; absent when the two paths alone conflict.
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
Reports the account’s limit.
Reports the value the data would have: the fields, the bytes or the items.
Names the type the field holds across the account’s contacts.
Names the type of the new value.
Example
{ "data": { "reason": "number_missing", "trigger": "too_many_fields" }}Error codes
| Status | Error | Meaning |
|---|---|---|
| 400 | bad_request | 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. |
| 400 | missing_scope_header | 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). |
| 400 | scope_conflict | Refuses 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. |
| 401 | unauthenticated | 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. |
| 403 | permission_denied | The credential is valid and in scope, but the caller's roles do not grant the permission the operation needs. |
| 404 | not_found | 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. |