Delete an origination trunk
DELETE
/v1/Accounts/{auth_id}/Trunks/Origination/{trunk_id}
const url = 'https://api.siprtc.io/v1/Accounts/example/Trunks/Origination/1';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/Trunks/Origination/1 \ --header 'Authorization: Basic <credentials>'Deletes one of your origination trunks and removes its whitelisted addresses, login and reachability checks from the SIP proxy. Calls from that carrier or PBX are refused from then on.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” auth_id
required
string
Your account Auth ID (20 characters). The request always acts on the authenticated account.
trunk_id
required
integer
Trunk ID, as returned by create or list
Responses
Section titled “ Responses ”Deleted
Invalid trunk ID, or the SIP proxy could not remove the trunk
Media type application/json
object
message
What went wrong, in plain words.
string
status
Always “failed”.
string
Example
{ "message": "trunk not found", "status": "failed"}Missing or wrong Auth ID / Auth Secret (answered by the API gateway)
Media type application/json
string
Example generated
exampleSigned in as a sub-user (portal login) rather than the account owner: only the owner can change trunks
Media type application/json
object
message
What went wrong, in plain words.
string
status
Always “failed”.
string
Example
{ "message": "trunk not found", "status": "failed"}No trunk with this ID on your account
Media type application/json
object
message
What went wrong, in plain words.
string
status
Always “failed”.
string
Example
{ "message": "trunk not found", "status": "failed"}