Trunks
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.
POST
/
api
/
v1
/
Account
/
{auth_id}
/
trunks
Create a trunk
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": "active",
"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
trunk_id and an auto-generated SIP domain. Authentication and routing are added afterwards with their own endpoints.
When to use it
- Connect a PBX, SBC, or carrier to Vobiz over SIP for inbound or outbound calling.
- Give an AI voice agent its own trunk so its call limits are separate from your other traffic.
- Separate environments or customers onto their own trunks, each with its own
concurrent_calls_limit.
Authentication required:
X-Auth-ID- Your account Auth IDX-Auth-Token- Your account Auth TokenContent-Type: application/json
Auto-Generated Domain: Upon creation, Vobiz automatically generates a unique SIP domain for your trunk in the format:
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. |
Request headers
| Header | Value |
|---|---|
X-Auth-ID | Your account Auth ID |
X-Auth-Token | Your account Auth Token |
Content-Type | application/json |
Trunk direction
trunk_type is sent in uppercase. The trunk object reports the direction in lowercase as trunk_direction, and carries different routing fields for each direction.
trunk_type | trunk_direction on the trunk object | Direction-specific fields on the trunk object |
|---|---|---|
OUTBOUND | outbound | credential_uuid, the credential attached to the trunk |
INBOUND | inbound | primary_uri_uuid (the primary origination URI) and inbound_destination |
Defaults applied at creation. New trunks come back with
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.Defaults applied at creation
| Field | Value on a new trunk | Change it with |
|---|---|---|
cps_limit | 2 | Update a Trunk |
secure | false | Update a Trunk |
transport | udp | Update a Trunk |
trunk_status | active | Update a Trunk |
trunk_domain | {trunk_id}.sip.vobiz.ai | Generated by Vobiz |
concurrent_calls_limit | The max_concurrent_calls you sent | Update a Trunk |
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.| Limit | What it caps | Purpose | Set it with |
|---|---|---|---|
cps_limit | New calls started per second | Flood protection | Update a Trunk |
concurrent_calls_limit | Calls live at the same time | Capacity and cost control | max_concurrent_calls here, or Update a Trunk |
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.
Response - 201 Created
{
"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"
}
Response fields
| Field | Type | Description |
|---|---|---|
trunk_id | string (UUID) | Unique identifier for the trunk. Every other trunk endpoint needs it. |
account_id | string | Account (auth_id) that owns the trunk. |
name | string | The name you sent. |
trunk_domain | string | Auto-generated SIP domain, {trunk_id}.sip.vobiz.ai. |
trunk_status | string | Status of the trunk. active on creation. |
secure | boolean | Whether media is encrypted with SRTP. false on creation. |
trunk_direction | string | One of inbound, outbound, or both. |
concurrent_calls_limit | integer | Maximum simultaneous calls, from max_concurrent_calls. |
cps_limit | integer | Calls-per-second limit. 2 on creation. |
description | string | Optional description. Empty on creation. |
transport | string | SIP transport protocol: udp, tcp, or tls. udp on creation. |
recording | boolean | Whether call recording is enabled. |
enable_transcription | boolean | Whether call transcription is enabled. |
pii_redaction | boolean | Whether PII redaction is applied to transcripts. |
webhook_method | string | HTTP method used for trunk webhooks, for example POST. |
recording_webhook_enabled | boolean | Whether the recording webhook is enabled. |
created_at | string (ISO 8601) | When the trunk was created (UTC). |
updated_at | string (ISO 8601) | When the trunk was last updated (UTC). |
Next steps
A new trunk has a name, a direction, and a call limit. To make it usable:- Save the
trunk_id. Every other trunk endpoint needs it. - Add credentials or IP ACLs for authentication.
- Configure origination URIs for outbound call routing.
- Adjust limits if needed with Update a Trunk.
- Test the trunk with a sample call before production use.
Choose an authentication method
A new trunk has no authentication attached. Add one or both of these methods after you create it. See SIP Trunking for details.| Username and password | IP whitelisting | |
|---|---|---|
| Endpoint | Create Credential | Create IP ACL |
| How it works | SIP digest authentication with a username and password | Calls from whitelisted IPv4 addresses are accepted without a password |
| Works from | Any IP address | Static IP addresses only |
| Best for | Devices with dynamic IP addresses and mobile softphones | PBX systems, SIP gateways, and carrier connections |
| Per trunk | Multiple credentials, for different devices or use cases | Specific whitelisted IPv4 addresses |
Related endpoints
| Task | Endpoint |
|---|---|
| List every trunk on the account | Retrieve All Trunks |
| Read one trunk by ID | Retrieve a Trunk |
| Change limits, transport, or recording | Update a Trunk |
| Add SIP username and password auth | Create Credential |
| Allow traffic from specific IP addresses | Create IP ACL |
| Route calls to your SIP server | Create Origination URI |
| Remove the trunk | Delete a Trunk |
Authorizations
Body
application/json
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.
Maximum string length:
500Example:
"https://example.com/vobiz/webhook"
Response
Success
Was this page helpful?
⌘I
Create a trunk
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": "active",
"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"
}