Update an inbound SIP trunk
curl --request PUT \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"whitelist_cidrs": [
"203.0.113.10/32",
"203.0.113.11/32"
],
"secure_media": "required"
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id}"
payload = {
"whitelist_cidrs": ["203.0.113.10/32", "203.0.113.11/32"],
"secure_media": "required"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
whitelist_cidrs: ['203.0.113.10/32', '203.0.113.11/32'],
secure_media: 'required'
})
};
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));{
"sip_trunk": {
"id": "2d4f6a8c-0e1b-4c3d-8e5f-7a9b1c2d3e4f",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"name": "Head office PBX",
"whitelist_cidrs": [
"203.0.113.10/32",
"203.0.113.11/32"
],
"allowed_e164s": [
"14155550123"
],
"status": "active",
"secure_media": "required",
"livekit_trunk_id": "ST_a1b2c3d4e5f6",
"livekit_dispatch_rule_id": "SDR_f6e5d4c3b2a1",
"sip_headers": [],
"created_at": "Mon Nov 09 2026 14:00:02 GMT+0000 (Coordinated Universal Time)",
"updated_at": "Wed Nov 11 2026 09:40:00 GMT+0000 (Coordinated Universal Time)"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "name: String must contain at least 1 character(s)",
"issues": [
{
"path": "name",
"code": "too_small",
"message": "String must contain at least 1 character(s)",
"minimum": 1
}
]
}{
"error": "<string>",
"code": "<string>"
}Inbound SIP trunks
Update an inbound SIP trunk
Changes the fields you send and keeps the others; send at least one. On an active trunk the change applies to the next call. status: inactive deactivates the trunk, which stops taking calls; status: active on a trunk that is not registered activates it, as the activate endpoint does. Needs the publish permission, which organization API keys carry.
PUT
/
v1
/
projects
/
{projectId}
/
telephony
/
sip-trunks
/
{id}
Update an inbound SIP trunk
curl --request PUT \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"whitelist_cidrs": [
"203.0.113.10/32",
"203.0.113.11/32"
],
"secure_media": "required"
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/sip-trunks/{id}"
payload = {
"whitelist_cidrs": ["203.0.113.10/32", "203.0.113.11/32"],
"secure_media": "required"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
whitelist_cidrs: ['203.0.113.10/32', '203.0.113.11/32'],
secure_media: 'required'
})
};
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));{
"sip_trunk": {
"id": "2d4f6a8c-0e1b-4c3d-8e5f-7a9b1c2d3e4f",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"name": "Head office PBX",
"whitelist_cidrs": [
"203.0.113.10/32",
"203.0.113.11/32"
],
"allowed_e164s": [
"14155550123"
],
"status": "active",
"secure_media": "required",
"livekit_trunk_id": "ST_a1b2c3d4e5f6",
"livekit_dispatch_rule_id": "SDR_f6e5d4c3b2a1",
"sip_headers": [],
"created_at": "Mon Nov 09 2026 14:00:02 GMT+0000 (Coordinated Universal Time)",
"updated_at": "Wed Nov 11 2026 09:40:00 GMT+0000 (Coordinated Universal Time)"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "name: String must contain at least 1 character(s)",
"issues": [
{
"path": "name",
"code": "too_small",
"message": "String must contain at least 1 character(s)",
"minimum": 1
}
]
}{
"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.
Body
application/json
Send at least one field; the others keep their value. Fields not listed here are ignored.