Skip to content

Delete number pool by external identifier

DELETE
/v1/a/number-pool/-/external/{external_id}
curl --request DELETE \
--url https://example.com/v1/a/number-pool/-/external/example \
--header 'Authorization: Bearer <token>'

Soft-deletes, as by id, the number pool the calling account gave this key, without the caller knowing the platform id. The key is released for reuse by a live pool.

Refused when:

  • Agents use the pool.
  • The tenant declares number_pool in managed_resources and the caller does not have the role tenant_admin.

Permission

This operation needs the permission number:pool:manage.

external_id
required
string
X-Account-Sid
string

Names the target account for account-scoped resources.

By principal:

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

Refused when:

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

No content

Bad request

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

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

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

By failure:

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

Names why a number or a row is refused.

Values:

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

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the SCN1xx constructor validation code.

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

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

Array<object>

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

object
id
required
string
name
required
string
automations

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

Array<object>

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

object
id
required
string
name
required
string
routings

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

Array<object>

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

object
id
required
string
name
required
string
agent_sid
required
string
users

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

Array<object>

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

object
id
required
string
email
required
string
roles

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

Array<object>

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

object
id
required
string
name
required
string
rows

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

integer format: int64
reasons

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

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

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

integer format: int64
number_not_international

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

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

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

integer format: int64
value_too_long

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

integer format: int64
type_mismatch

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

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

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

Names the field by its path.

By failure:

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

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

string
params

Carries the details of the breach.

By breach:

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

Reports the account’s limit.

integer
current

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

integer
type

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

string
got

Names the type of the new value.

string
error
required
One of:

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

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

Unauthorized

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

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

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

By failure:

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

Names why a number or a row is refused.

Values:

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

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the SCN1xx constructor validation code.

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

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

Array<object>

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

object
id
required
string
name
required
string
automations

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

Array<object>

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

object
id
required
string
name
required
string
routings

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

Array<object>

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

object
id
required
string
name
required
string
agent_sid
required
string
users

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

Array<object>

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

object
id
required
string
email
required
string
roles

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

Array<object>

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

object
id
required
string
name
required
string
rows

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

integer format: int64
reasons

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

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

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

integer format: int64
number_not_international

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

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

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

integer format: int64
value_too_long

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

integer format: int64
type_mismatch

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

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

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

Names the field by its path.

By failure:

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

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

string
params

Carries the details of the breach.

By breach:

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

Reports the account’s limit.

integer
current

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

integer
type

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

string
got

Names the type of the new value.

string
error
required
One of:

Refuses a request that cannot be authenticated.

Returned when:

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

Forbidden

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

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

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

By failure:

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

Names why a number or a row is refused.

Values:

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

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the SCN1xx constructor validation code.

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

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

Array<object>

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

object
id
required
string
name
required
string
automations

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

Array<object>

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

object
id
required
string
name
required
string
routings

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

Array<object>

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

object
id
required
string
name
required
string
agent_sid
required
string
users

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

Array<object>

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

object
id
required
string
email
required
string
roles

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

Array<object>

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

object
id
required
string
name
required
string
rows

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

integer format: int64
reasons

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

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

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

integer format: int64
number_not_international

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

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

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

integer format: int64
value_too_long

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

integer format: int64
type_mismatch

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

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

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

Names the field by its path.

By failure:

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

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

string
params

Carries the details of the breach.

By breach:

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

Reports the account’s limit.

integer
current

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

integer
type

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

string
got

Names the type of the new value.

string
error
required
One of:

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

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

Not found

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

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

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

By failure:

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

Names why a number or a row is refused.

Values:

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

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the SCN1xx constructor validation code.

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

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

Array<object>

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

object
id
required
string
name
required
string
automations

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

Array<object>

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

object
id
required
string
name
required
string
routings

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

Array<object>

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

object
id
required
string
name
required
string
agent_sid
required
string
users

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

Array<object>

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

object
id
required
string
email
required
string
roles

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

Array<object>

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

object
id
required
string
name
required
string
rows

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

integer format: int64
reasons

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

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

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

integer format: int64
number_not_international

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

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

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

integer format: int64
value_too_long

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

integer format: int64
type_mismatch

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

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

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

Names the field by its path.

By failure:

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

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

string
params

Carries the details of the breach.

By breach:

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

Reports the account’s limit.

integer
current

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

integer
type

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

string
got

Names the type of the new value.

string
error
required
One of:

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

Returned when:

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

Conflict

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

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

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

By failure:

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

Names why a number or a row is refused.

Values:

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

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the SCN1xx constructor validation code.

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

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

Array<object>

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

object
id
required
string
name
required
string
automations

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

Array<object>

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

object
id
required
string
name
required
string
routings

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

Array<object>

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

object
id
required
string
name
required
string
agent_sid
required
string
users

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

Array<object>

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

object
id
required
string
email
required
string
roles

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

Array<object>

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

object
id
required
string
name
required
string
rows

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

integer format: int64
reasons

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

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

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

integer format: int64
number_not_international

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

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

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

integer format: int64
value_too_long

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

integer format: int64
type_mismatch

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

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

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

Names the field by its path.

By failure:

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

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

string
params

Carries the details of the breach.

By breach:

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

Reports the account’s limit.

integer
current

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

integer
type

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

string
got

Names the type of the new value.

string
error
required
One of:

Agents use the pool; data.agents names them, the first twenty of them.

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

Internal server error

Media typeapplication/json
object
error
required

Carries the stable lower_snake_case usecase code, such as scenario_not_found.

string
code
required

Carries the registered machine code, stable once assigned.

The codes:

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

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

By failure:

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

Names why a number or a row is refused.

Values:

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

Groups the validation errors by entity.

object
scenario
Array<object>
object
code

Carries the SCN1xx constructor validation code.

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

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

Array<object>

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

object
id
required
string
name
required
string
automations

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

Array<object>

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

object
id
required
string
name
required
string
routings

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

Array<object>

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

object
id
required
string
name
required
string
agent_sid
required
string
users

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

Array<object>

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

object
id
required
string
email
required
string
roles

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

Array<object>

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

object
id
required
string
name
required
string
rows

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

integer format: int64
reasons

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

object
number_missing

The number cell is blank.

integer format: int64
number_no_digits

The number holds no digits.

integer format: int64
identifier_invalid

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

integer format: int64
number_not_international

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

integer format: int64
number_not_for_country

The number is not valid for the stated country_code.

integer format: int64
country_code_required

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

integer format: int64
value_too_long

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

integer format: int64
type_mismatch

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

integer format: int64
trigger

Names the rule the contact data breaks.

Values:

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

Names the field by its path.

By failure:

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

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

string
params

Carries the details of the breach.

By breach:

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

Reports the account’s limit.

integer
current

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

integer
type

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

string
got

Names the type of the new value.

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

Error codes

StatusErrorMeaning
400missing_scope_headerThe credential acts for a tenant or for the platform, and the request names no account in X-Account-Sid (or no tenant in X-Tenant-Sid).
400scope_conflictRefuses the value of the scope header. Returned when: - The scope header names an account or tenant the credential does not cover. - The scope header carries a value that is not an id of that kind.
401unauthenticatedRefuses a request that cannot be authenticated. Returned when: - The request carries no usable credential. - The user, account or tenant behind the credential is not active.
403permission_deniedThe credential is valid and in scope, but the caller's roles do not grant the permission the operation needs.
403tenant_managedRefuses a write that belongs to the tenant, made by a caller without the role tenant_admin. Returned when: - The tenant declares this resource type in managed_resources. - The tenant administers this SMS provider.
404not_foundRefuses an identifier that names no resource the caller can use. Returned when: - No live resource with this identifier is visible to the caller. - The resource the identifier names belongs to another account.
404number_pool_not_foundNo live number pool of the account with this id or external identifier.
409number_pool_in_useAgents use the pool; data.agents names them, the first twenty of them.