SIP trunks
List SIP trunks API
List your SIP trunks via GET /trunk/trunks, each with its gateways, carrier IPs, numbers, health and active calls.
GET
/
trunk
/
trunks
cURL
curl --request GET \
--url https://api.bolna.ai/trunk/trunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bolna.ai/trunk/trunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bolna.ai/trunk/trunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bolna.ai/trunk/trunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bolna.ai/trunk/trunks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bolna.ai/trunk/trunks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolna.ai/trunk/trunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"trunks": [
{
"id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"name": "Telnyx production",
"description": null,
"preset": "telnyx",
"is_active": true,
"inbound_enabled": true,
"outbound_enabled": true,
"channels": 20,
"default_inbound_agent_id": null,
"auth_username": "bolna-outbound",
"transport": "udp",
"codecs": "PCMU,PCMA",
"outbound_leading_plus_enabled": true,
"last_inbound_at": null,
"last_outbound_at": null,
"converted_from_byot_trunk_id": null,
"organization_id": "7a1c2e3f-4b5d-4c6e-8f90-a1b2c3d4e5f6",
"sub_account_id": null,
"user_id": null,
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null,
"health": "waiting_for_carrier",
"active_calls": 0,
"gateways": [
{
"id": "8b1d4e2f-0a3c-4d5e-9f60-7182a3b4c5d6",
"trunk_id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"host": "sip.example.com",
"resolved_ips": [
"203.0.113.30"
],
"port": 5060,
"priority": 0,
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null
}
],
"ip_acls": [
{
"id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"trunk_id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"cidr": "203.0.113.10/32",
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null
},
{
"id": "d3e4f5a6-b7c8-4d9e-8f01-2b3c4d5e6f7a",
"trunk_id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"cidr": "198.51.100.0/28",
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null
}
],
"numbers": []
}
]
}{
"message": "a sub-account outside an organisation has no trunks"
}Was this page helpful?
⌘I
cURL
curl --request GET \
--url https://api.bolna.ai/trunk/trunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bolna.ai/trunk/trunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bolna.ai/trunk/trunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bolna.ai/trunk/trunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bolna.ai/trunk/trunks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bolna.ai/trunk/trunks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolna.ai/trunk/trunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"trunks": [
{
"id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"name": "Telnyx production",
"description": null,
"preset": "telnyx",
"is_active": true,
"inbound_enabled": true,
"outbound_enabled": true,
"channels": 20,
"default_inbound_agent_id": null,
"auth_username": "bolna-outbound",
"transport": "udp",
"codecs": "PCMU,PCMA",
"outbound_leading_plus_enabled": true,
"last_inbound_at": null,
"last_outbound_at": null,
"converted_from_byot_trunk_id": null,
"organization_id": "7a1c2e3f-4b5d-4c6e-8f90-a1b2c3d4e5f6",
"sub_account_id": null,
"user_id": null,
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null,
"health": "waiting_for_carrier",
"active_calls": 0,
"gateways": [
{
"id": "8b1d4e2f-0a3c-4d5e-9f60-7182a3b4c5d6",
"trunk_id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"host": "sip.example.com",
"resolved_ips": [
"203.0.113.30"
],
"port": 5060,
"priority": 0,
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null
}
],
"ip_acls": [
{
"id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"trunk_id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"cidr": "203.0.113.10/32",
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null
},
{
"id": "d3e4f5a6-b7c8-4d9e-8f01-2b3c4d5e6f7a",
"trunk_id": "3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21",
"cidr": "198.51.100.0/28",
"created_at": "2026-10-16T09:12:44.512381+00:00",
"updated_at": "2026-10-16T09:12:44.512381+00:00",
"is_deleted": false,
"deleted_at": null
}
],
"numbers": []
}
]
}{
"message": "a sub-account outside an organisation has no trunks"
}
