Delete an inbound SIP trunk
curl --request DELETE \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"deleted_numbers": 2
}{
"error": "Invalid or revoked token"
}{
"error": "publish_capability_required",
"code": "PUBLISH_CAPABILITY_REQUIRED"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Inbound SIP trunks
Delete an inbound SIP trunk
Deletes the trunk; it stops taking calls. By default its phone numbers are kept and become unassigned (no provider, no sip_trunk_id), and the answer is 204. With delete_numbers=true they are deleted too, and the answer is 200 with how many were deleted. Needs the publish permission, which organization API keys carry.
DELETE
/
v1
/
projects
/
{projectId}
/
telephony
/
sip-trunks
/
{id}
Delete an inbound SIP trunk
curl --request DELETE \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"deleted_numbers": 2
}{
"error": "Invalid or revoked token"
}{
"error": "publish_capability_required",
"code": "PUBLISH_CAPABILITY_REQUIRED"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.