Skip to content

Return up to 15 released numbers to inventory

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

Vendor accounts only. Returns each listed released number to your inventory with the same rules as Return a released number to inventory. Each number is handled on its own, so the response lists which were returned 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 return

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
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 returned, with reasons.

Array<object>
object
phone_number

The number as sent.

string
reason

Why it was not returned, e.g. “no released subscription found for this phone number”.

string
failedCount

Number of numbers that could not be returned.

integer
message

Summary, e.g. “1 returned to inventory successfully, 1 could not be returned”.

string
returned

The numbers returned.

Array<string>
returnedCount

Number of numbers returned to the inventory.

integer

Example

{
"failed": [
{
"phone_number": "+15555550101",
"reason": "no released subscription found for this phone number"
}
],
"failedCount": 1,
"message": "1 returned to inventory successfully, 1 could not be returned",
"returned": [
"+15555550100"
],
"returnedCount": 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