Skip to content

Release a phone number

DELETE
/v1/Accounts/{auth_id}/PhoneNumbers/{phone_number}
curl --request DELETE \
--url 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/PhoneNumbers/%2B15555550100?customerid=AC000000000000000001' \
--header 'Authorization: Basic <credentials>'

Releases a number from the account: its application is unlinked and its subscription moves to cancellation_request, so inbound calls and messages to it stop. Within the subscription period you can undo this with Undo a phone number release; a vendor can return it to its inventory with Return a released number to inventory. This operation acts on the account in the path, or on customerid (a direct child) when given; a vendor may also release a number from its own inventory that is assigned to one of its accounts. A number that is the account’s default outbound number, or that is still used by an application, IVR, AI agent, CX router or workflow action, is not released; the 400 message names what still uses it. On success the service answers 204 with no body.

auth_id
required
string

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

Example

AC000000000000000000
phone_number
required
string

The number, with or without +.

Example

+15555550100
customerid
string

Auth ID of a direct child account to release the number from.

Example

AC000000000000000001

Released

Still in use or the default number, does not belong to this account, or the gateway could not resolve your company (company id is empty)

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

Phone number not found, subscription not found, or the 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"
}