Update an outbound SIP trunk
curl --request PUT \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/outbound-trunks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth": {
"type": "basic",
"username": "clarity-outbound-2"
},
"transport": "tcp"
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/outbound-trunks/{id}"
payload = {
"auth": {
"type": "basic",
"username": "clarity-outbound-2"
},
"transport": "tcp"
}
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({auth: {type: 'basic', username: 'clarity-outbound-2'}, transport: 'tcp'})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/outbound-trunks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"outbound_trunk": {
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"name": "Carrier primary",
"address": "sip.carrier.example.com",
"auth": {
"type": "basic",
"username": "clarity-outbound-2",
"has_secret": true
},
"status": "active",
"transport": "tcp",
"media_encryption": "enabled",
"created_at": "Mon Nov 09 2026 13:58:20 GMT+0000 (Coordinated Universal Time)",
"updated_at": "Wed Nov 11 2026 09:45:03 GMT+0000 (Coordinated Universal Time)"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "password is required when enabling basic auth"
}Outbound SIP trunks
Update an outbound SIP trunk
Changes the fields you send and keeps the others; send at least one. The change applies to the next outbound call. auth is replaced as a whole: type: none clears the stored password, and type: basic without password keeps the stored one (422 if there is none). Needs the publish permission, which organization API keys carry.
PUT
/
v1
/
projects
/
{projectId}
/
telephony
/
outbound-trunks
/
{id}
Update an outbound SIP trunk
curl --request PUT \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/outbound-trunks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth": {
"type": "basic",
"username": "clarity-outbound-2"
},
"transport": "tcp"
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/outbound-trunks/{id}"
payload = {
"auth": {
"type": "basic",
"username": "clarity-outbound-2"
},
"transport": "tcp"
}
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({auth: {type: 'basic', username: 'clarity-outbound-2'}, transport: 'tcp'})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/telephony/outbound-trunks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"outbound_trunk": {
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"name": "Carrier primary",
"address": "sip.carrier.example.com",
"auth": {
"type": "basic",
"username": "clarity-outbound-2",
"has_secret": true
},
"status": "active",
"transport": "tcp",
"media_encryption": "enabled",
"created_at": "Mon Nov 09 2026 13:58:20 GMT+0000 (Coordinated Universal Time)",
"updated_at": "Wed Nov 11 2026 09:45:03 GMT+0000 (Coordinated Universal Time)"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "password is required when enabling basic auth"
}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.