Skip to content

Undo the release of up to 15 numbers

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

Restores each listed released number with the same rules as Undo a phone number release, on your account or with customerid on a direct child account. Each number is handled on its own, so the response lists which were restored 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 restore

Media type application/json
object
customerid

Auth ID of a direct child account to restore the numbers for. Omit to restore them for yourself.

string

Example

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

Array<object>
object
phone_number

The number as sent.

string
reason

Why it was not restored.

string
failedCount

Number of numbers that could not be restored.

integer
message

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

string
revoked

The numbers restored.

Array<string>
revokedCount

Number of numbers restored.

integer

Example

{
"failed": [
{
"phone_number": "+15555550101",
"reason": "record not found"
}
],
"failedCount": 1,
"message": "1 revoked successfully, 1 could not be revoked",
"revoked": [
"+15555550100"
],
"revokedCount": 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

Customerid is not your account or a direct child

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

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

The account named in customerid 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"
}