Create a Trunk
Provision a new Vobiz SIP trunk with concurrent-call limits, CPS caps, TLS/SRTP, credentials, IP ACLs, and origination URIs - all in a single API call.
curl --request POST \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "Retell AI SIP"
}
'import requests
url = "https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks"
payload = { "name": "Retell AI SIP" }
headers = {
"X-Auth-ID": "<api-key>",
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Retell AI SIP'})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"trunk_id": "<string>",
"account_id": "<string>",
"name": "<string>",
"trunk_domain": "<string>",
"trunk_status": "<string>",
"secure": true,
"trunk_direction": "<string>",
"concurrent_calls_limit": 123,
"cps_limit": 123,
"description": "<string>",
"transport": "<string>",
"recording": true,
"enable_transcription": true,
"pii_redaction": true,
"webhook_method": "<string>",
"recording_webhook_enabled": true,
"created_at": "<string>",
"updated_at": "<string>"
}{
"trunk_id": "aabbccdd-1234-5678-90ab-cdef12345678",
"account_id": "MA_XXXXXXXX",
"name": "My Outbound Trunk",
"trunk_domain": "aabbccdd-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
"trunk_status": "active",
"secure": false,
"trunk_direction": "outbound",
"concurrent_calls_limit": 10,
"cps_limit": 2,
"description": "",
"transport": "udp",
"recording": false,
"enable_transcription": false,
"pii_redaction": false,
"webhook_method": "POST",
"recording_webhook_enabled": false,
"created_at": "2026-03-25T05:11:52.054462Z",
"updated_at": "2026-03-25T05:11:52.054462Z"
}POST https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks
X-Auth-ID- Your account Auth IDX-Auth-Token- Your account Auth TokenContent-Type: application/json
trunk_id.sip.vobiz.ai. This domain is used for routing inbound calls to your trunk.Request Parameters
Only three fields are required to create a trunk. The rest of the trunk’s configuration - transport, TLS/SRTP, recording, attached credentials, IP ACLs, and origination URIs - is applied afterwards through the dedicated endpoints or the Console.| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Descriptive name for the trunk. Maximum 255 characters. |
trunk_type | string | Yes | Trunk direction. One of INBOUND or OUTBOUND (uppercase). Determines how the trunk routes traffic. |
max_concurrent_calls | integer | Yes | Maximum number of simultaneous calls. Returned on the trunk object as concurrent_calls_limit. |
cps_limit: 2, secure: false, transport: udp, and trunk_status: active. The trunk_domain is auto-generated as {trunk_id}.sip.vobiz.ai. Tune limits later with Update a Trunk, and attach auth and routing with Credentials, IP ACLs, and Origination URIs.cps_limit vs concurrent_calls_limit. cps_limit caps how many new calls can be started per second (flood protection); concurrent_calls_limit caps how many calls can be live at once (capacity and cost control). They are independent.Examples
curl -X POST https://api.vobiz.ai/api/v1/Account/AUTH_ID/trunks \
-H "X-Auth-ID: AUTH_ID" \
-H "X-Auth-Token: AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My SIP Trunk",
"trunk_type": "OUTBOUND",
"max_concurrent_calls": 10
}'
const response = await fetch(
'https://api.vobiz.ai/api/v1/Account/AUTH_ID/trunks',
{
method: 'POST',
headers: {
'X-Auth-ID': 'AUTH_ID',
'X-Auth-Token': 'AUTH_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'My SIP Trunk',
trunk_type: 'OUTBOUND',
max_concurrent_calls: 10,
}),
}
);
const trunk = await response.json();
console.log(trunk.trunk_id);
import requests
response = requests.post(
"https://api.vobiz.ai/api/v1/Account/AUTH_ID/trunks",
headers={
"X-Auth-ID": "AUTH_ID",
"X-Auth-Token": "AUTH_TOKEN",
"Content-Type": "application/json",
},
json={
"name": "My SIP Trunk",
"trunk_type": "OUTBOUND",
"max_concurrent_calls": 10,
},
)
trunk = response.json()
print(trunk["trunk_id"])
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]any{
"name": "My SIP Trunk",
"trunk_type": "OUTBOUND",
"max_concurrent_calls": 10,
})
req, _ := http.NewRequest("POST",
"https://api.vobiz.ai/api/v1/Account/AUTH_ID/trunks",
bytes.NewBuffer(body))
req.Header.Set("X-Auth-ID", "AUTH_ID")
req.Header.Set("X-Auth-Token", "AUTH_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, _ := (&http.Client{}).Do(req)
defer resp.Body.Close()
var trunk map[string]any
json.NewDecoder(resp.Body).Decode(&trunk)
fmt.Println(trunk["trunk_id"])
}
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.vobiz.ai/api/v1/Account/AUTH_ID/trunks')
req = Net::HTTP::Post.new(uri)
req['X-Auth-ID'] = 'AUTH_ID'
req['X-Auth-Token'] = 'AUTH_TOKEN'
req['Content-Type'] = 'application/json'
req.body = {
name: 'My SIP Trunk',
trunk_type: 'OUTBOUND',
max_concurrent_calls: 10
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts JSON.parse(res.body)['trunk_id']
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Auth-ID", "AUTH_ID");
client.DefaultRequestHeaders.Add("X-Auth-Token", "AUTH_TOKEN");
var payload = new StringContent(
System.Text.Json.JsonSerializer.Serialize(new {
name = "My SIP Trunk",
trunk_type = "OUTBOUND",
max_concurrent_calls = 10
}),
System.Text.Encoding.UTF8,
"application/json");
var res = await client.PostAsync(
"https://api.vobiz.ai/api/v1/Account/AUTH_ID/trunks", payload);
Console.WriteLine(await res.Content.ReadAsStringAsync());
Response
Returns the complete trunk object, including the auto-generatedtrunk_id UUID and timestamps.
{
"trunk_id": "aabbccdd-1234-5678-90ab-cdef12345678",
"account_id": "MA_XXXXXXXX",
"name": "My Outbound Trunk",
"trunk_domain": "aabbccdd-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
"trunk_status": "active",
"secure": false,
"trunk_direction": "both",
"concurrent_calls_limit": 10,
"cps_limit": 2,
"description": "",
"transport": "udp",
"recording": false,
"enable_transcription": false,
"pii_redaction": false,
"webhook_method": "POST",
"recording_webhook_enabled": false,
"created_at": "2026-05-12T05:11:52.054462Z",
"updated_at": "2026-05-12T05:11:52.054462Z"
}
- Save the
trunk_idfor all future operations - Add credentials or IP ACLs for authentication
- Configure origination URIs for outbound call routing
- Test the trunk with a sample call before production use
Authorizations
Your Vobiz account Auth ID
Your Vobiz account Auth Token
Path Parameters
Your account Auth ID
"MA_XXXXXX"
Body
Trunk name.
100Direction of the trunk - inbound or outbound only (a trunk is one direction, not both).
inbound, outbound Trunk status - enabled or disabled (note: not active).
enabled, disabled SIP domain. Auto-generated as {first8ofUUID}.sip.vobiz.ai if omitted.
255udp, tcp, tls 255500Stored on the trunk. The enforced concurrency limit is account-level (account base + channel subscriptions), not this field.
0 <= x <= 1000Stored on the trunk. The enforced CPS is account-level, not this field.
0 <= x <= 100Attach an existing SIP credential (username / password / realm) by UUID.
Attach an existing IP access-control list (IP-based auth) by UUID.
Primary origination URI UUID.
Fallback origination URI UUID.
Enable call recording.
Auto-transcribe recordings when recording=true.
Redact PII from transcriptions.
Comma-separated list of entity types to redact.
Customer webhook for call-admission events (CallInitiated / Hangup).
Must be a valid public http/https URL. SSRF-validated - localhost,
private (RFC1918), and cloud-metadata (169.254.169.254) URLs are
rejected with invalid webhook_url. See Trunk Webhooks.
500"https://example.com/vobiz/webhook"
HTTP method for the webhook callback.
POST, GET Fire a recording.completed webhook to webhook_url after a recording is saved.
Deprecated - use credential_uuid.
100Deprecated - use credential_uuid.
100Deprecated - use ipacl_uuid.
Response
Success
Was this page helpful?
curl --request POST \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "Retell AI SIP"
}
'import requests
url = "https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks"
payload = { "name": "Retell AI SIP" }
headers = {
"X-Auth-ID": "<api-key>",
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Retell AI SIP'})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/trunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"trunk_id": "<string>",
"account_id": "<string>",
"name": "<string>",
"trunk_domain": "<string>",
"trunk_status": "<string>",
"secure": true,
"trunk_direction": "<string>",
"concurrent_calls_limit": 123,
"cps_limit": 123,
"description": "<string>",
"transport": "<string>",
"recording": true,
"enable_transcription": true,
"pii_redaction": true,
"webhook_method": "<string>",
"recording_webhook_enabled": true,
"created_at": "<string>",
"updated_at": "<string>"
}{
"trunk_id": "aabbccdd-1234-5678-90ab-cdef12345678",
"account_id": "MA_XXXXXXXX",
"name": "My Outbound Trunk",
"trunk_domain": "aabbccdd-1234-5678-90ab-cdef12345678.sip.vobiz.ai",
"trunk_status": "active",
"secure": false,
"trunk_direction": "outbound",
"concurrent_calls_limit": 10,
"cps_limit": 2,
"description": "",
"transport": "udp",
"recording": false,
"enable_transcription": false,
"pii_redaction": false,
"webhook_method": "POST",
"recording_webhook_enabled": false,
"created_at": "2026-03-25T05:11:52.054462Z",
"updated_at": "2026-03-25T05:11:52.054462Z"
}