Delete a SIP trunk
const url = 'https://api.siprtc.io/v1/Accounts/example/SipTrunk/example';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.siprtc.io/v1/Accounts/example/SipTrunk/example \ --header 'Authorization: Basic <credentials>'Deletes one of your SIP trunks so that calls stop routing over it. The trunk is marked deleted together with its termination URI, one of its phone numbers and one of its origination URIs. A vendor account can pass customer_id to act on a direct child account’s record.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
ID of the trunk.
Query Parameters
Section titled “ Query Parameters ”Vendor accounts only: act on this direct child account instead of your own.
Responses
Section titled “ Responses ”Deleted (message “Trunk deleted successfully”).
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}The gateway did not supply your company (message “company id is empty”).
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleCustomer_id is not a direct child of your account.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}The trunk does not exist, or an account lookup or the delete failed.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}