Skip to content

Release up to 15 phone numbers

POST
/v1/Accounts/{auth_id}/PhoneNumbers/BulkRelease
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/AC000000000000000000/PhoneNumbers/BulkRelease \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "phone_numbers": [ "+15555550100", "+15555550101" ] }'

Releases each listed number from the account in the path, with the same rules as Release a phone number: numbers that are the default or still in use are skipped. Each number is handled on its own, so the response lists which were released and which failed, with a reason; the call succeeds even when every number fails. A vendor may also release numbers from its own inventory that are assigned to its accounts.

auth_id
required
string

Auth ID of the account to act on: yours or a direct child’s.

Example

AC000000000000000000

Numbers to release

Media type application/json
object
phone_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
failed

The numbers not released, with reasons.

Array<object>
object
phone_number

The number as sent.

string
reason

Why it was not released, e.g. “phone number not found” or a message naming the application or routing that still uses it.

string
failedCount

Number of numbers that could not be released.

integer
message

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

string
released

The numbers released.

Array<string>
releasedCount

Number of numbers released.

integer

Example

{
"failed": [
{
"phone_number": "+15555550101",
"reason": "phone number not found"
}
],
"failedCount": 1,
"message": "1 released successfully, 1 could not be released",
"released": [
"+15555550100"
],
"releasedCount": 1
}

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

The account in the path could not be looked up

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"
}