Skip to content

Remove a phone number from a trunk

DELETE
/v1/Accounts/{auth_id}/SipTrunk/{trunk_id}/PhoneNumber/{trunk_number_id}
curl --request DELETE \
--url https://api.siprtc.io/v1/Accounts/example/SipTrunk/example/PhoneNumber/example \
--header 'Authorization: Basic <credentials>'

Marks a trunk phone number record as deleted, so the number is no longer routed over the trunk. A vendor account can pass customer_id to act on a direct child account’s record.

auth_id
required
string

Auth ID of your account.

trunk_id
required
string

ID of the trunk.

trunk_number_id
required
string

ID of the trunk phone number record (not the number itself).

customer_id
string

Vendor accounts only: act on this direct child account instead of your own.

Removed (message “Trunk phone number deleted successfully”).

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}

The gateway did not supply your company (message “company id is empty”).

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}

Missing or wrong Basic-auth credentials (returned by the API gateway).

Media type application/json
string

Example generated

example

Customer_id is not a direct child of your account.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}

No live trunk phone number with this ID, or the delete failed.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}

Your account or the customer account could not be looked up.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}