Skip to content

Delete up to 15 unassigned inventory numbers

POST
/v1/Accounts/{auth_id}/AvailablePhoneNumbers/BulkDelete
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/AC000000000000000000/AvailablePhoneNumbers/BulkDelete \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "modified_by": "jane@example.com", "numbers": [ "+15555550100", "+15555550101" ] }'

Vendor accounts only. Deletes each listed number from your inventory with the same rules as Delete an unassigned inventory number. Each number is handled on its own, so the response lists which were deleted and which failed, with a reason; the call succeeds even when every number fails.

auth_id
required
string

Your Auth ID.

Example

AC000000000000000000

Numbers to delete

Media type application/json
object
modified_by

Optional name of the person making the change, recorded in the audit log.

string

Example

jane@example.com
numbers
required

1 to 15 numbers. Duplicates (ignoring + and spaces) and blank entries are dropped.

Array<string>
>= 1 items <= 15 items

Example

[
"+15555550100",
"+15555550101"
]

Per-number results

Media type application/json
object
deleted

The numbers deleted.

Array<string>
deletedCount

Number of numbers deleted.

integer
failed

The numbers not deleted, with reasons.

Array<object>
object
phone_number

The number as sent.

string
reason

Why it was not deleted, e.g. “unavailable number cannot be deleted”.

string
failedCount

Number of numbers that could not be deleted.

integer
message

Summary, e.g. “1 deleted successfully, 1 could not be deleted”.

string

Example

{
"deleted": [
"+15555550100"
],
"deletedCount": 1,
"failed": [
{
"phone_number": "+15555550101",
"reason": "unavailable number cannot be deleted"
}
],
"failedCount": 1,
"message": "1 deleted successfully, 1 could not be deleted"
}

Body not valid JSON, no numbers, or more than 15

Media type application/json
object
message

Human-readable result or error.

string
status

Success or failed.

string

Example

{
"message": "phone number not found",
"status": "failed"
}

Missing or invalid credentials (returned by the API gateway)

Media type application/json
string

Example generated

example