# List communications GET /v1/a/communication Select code sample ``` const url = 'https://example.com/v1/a/communication?direction=inbound&status=new&call_status=trying'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; 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 ' ``` - /v1/a/communication Lists the calls, newest first. Rules: - This resource takes no sort parameters. - Rows carry everything the single read does. - `include` resolves a row’s agent, scenario, result deliveries, contact, automation and run into `included`. - A call placed by hand resolves no automation and no run. ## Permission This operation needs the permission [`communication:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#communication-read). Some values of the [`include` parameter](#query-parameters) need a permission of their own. ## Authorizations - **[bearerAuth](https://docs.aiva.apifonica.com/api/account/#bearerauth)** ## Parameters ### Query Parameters **limit** integer <= 500 Page size, max 500 (default 100). **offset** integer **show\_deleted** boolean Include soft-deleted rows when true. **filter\_or** string Names the fields, comma-separated, that filter\_query OR-searches. Values: - `call_sid`: matched exactly. - `recipient`: matched as a substring, case-insensitive. **filter\_query** string Search term matched across the fields named in filter\_or. **draft** boolean Narrows the list by the kind of scenario version the run used. Values: - `true`: lists the runs on a draft, which have `draft_version` set. - `false`: lists the runs on a published version, which have `version` set. - Omitted: lists both kinds, and the calls of an agent not dialled yet, which have neither. **version** integer Published scenario version the run used. **draft\_version** integer Draft scenario version the run used. **scenario\_sid** string Filter by the scenario recorded on the communication. **agent\_sid** string **recipient** string 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. **direction** string Allowed values: inbound outbound **call\_sid** string **status** 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** 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 **automation\_sid** string Narrows the list to the calls one automation produced. **is\_test** boolean **created\_at\_from** string format: date-time **created\_at\_to** string format: date-time **duration\_min** integer Shortest call duration to return, in seconds, inclusive. **duration\_max** integer Longest call duration to return, in seconds, inclusive. **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`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#agent-read). `scenario` needs the permission [`scenario:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#scenario-read). `communication_result` needs the permission [`communication:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#communication-read). `contact` needs the permission [`contact:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#contact-read). `automation` needs the permission [`agent:automation:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#agent-automation-read). `automation_attempt` needs the permission [`agent:automation:read`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#agent-automation-read). ### Header Parameters **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. ## Responses ### 200 OK Media typeapplication/json object **items** required Array\ 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 null **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_.*` 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 **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\ 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 null **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 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 null **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 null **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 **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 null **created\_at** required string format: date-time **updated\_at** required string format: date-time **total** required Counts the communications matching the query, ignoring paging. integer format: int64 **limit** required Reports the page size applied to this request. integer **offset** required Reports the offset applied to this request. integer **has\_more** required Says whether records beyond this page match the query. boolean **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\ \>= 1 items null **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 **url** string null **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 null **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 **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\ | 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 null **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\ **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 **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 **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 null **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 ``` { "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" } ] } } } } ``` ### 400 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 **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\ 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\ 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\ 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\ 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\ 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 The credential acts for a tenant or for the platform, and the request names no account in `X-Account-Sid` (or no tenant in `X-Tenant-Sid`). string Allowed values: missing\_scope\_header 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. string Allowed values: scope\_conflict ##### Example ``` { "data": { "reason": "number_missing", "trigger": "too_many_fields" }, "error": "bad_request" } ``` ### 401 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 **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\ 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\ 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\ 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\ 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\ 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" } ``` ### 403 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 **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\ 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\ 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\ 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\ 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\ 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" } ``` ### 404 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 **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\ 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\ 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\ 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\ 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\ A live role that inherits the role a delete was rejected for. object **id** required string **name** required string **rows** Lists the rows of the refused file, a row repeating an earlier row’s number as written counted once. integer format: int64 **reasons** How many rows of a refused file were rejected for each reason; a reason no row had is absent. object **number\_missing** The number cell is blank. integer format: int64 **number\_no\_digits** The number holds no digits. integer format: int64 **identifier\_invalid** An alphanumeric identifier does not start with a letter or a digit. integer format: int64 **number\_not\_international** The number is written as international and is not a valid one. integer format: int64 **number\_not\_for\_country** The number is not valid for the stated `country_code`. integer format: int64 **country\_code\_required** The number is not international, and no `country_code` was stated to read it by. integer format: int64 **value\_too\_long** A data cell holds a value longer than the account’s value limit in bytes. integer format: int64 **type\_mismatch** A data cell does not read as the type its field holds across the account’s contacts. integer format: int64 **trigger** Names the rule the contact data breaks. Values: - `array_item_not_scalar`: an array item is an object, an array or null. - `type_mismatch`: a value has another type than its field holds across the account’s contacts, or is an object where the field holds a value, or a value where it holds an object. string Allowed values: too\_many\_fields value\_too\_long too\_many\_array\_items array\_item\_not\_scalar type\_mismatch **field** Names the field by its path. By failure: - For a broken limit, it is the field that breaks the limit. - For too many fields, it is the first new field past the limit. - For a rename, it is the field that stops the rename. string **contact** Names the first contact whose data stops a rename; absent when the two paths alone conflict. string **params** Carries the details of the breach. By breach: - For a broken limit, it carries the numbers of the limit. - For a type mismatch, it carries the two types. - For an array item that is not a scalar, it is empty. object **limit** Reports the account’s limit. integer **current** Reports the value the data would have: the fields, the bytes or the items. integer **type** Names the type the field holds across the account’s contacts. string **got** Names the type of the new value. string **error** required One of: Refuses an identifier that names no resource the caller can use. Returned when: - No live resource with this identifier is visible to the caller. - The resource the identifier names belongs to another account. string Allowed values: not\_found ##### Example ``` { "data": { "reason": "number_missing", "trigger": "too_many_fields" }, "error": "not_found" } ``` ### 500 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 **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\ 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\ 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\ 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\ 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\ 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 | 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. |