List SIP trunks
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/phone-numbers/sip-trunks \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/phone-numbers/sip-trunks"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.lehar.ai/ca/api/v0/phone-numbers/sip-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.lehar.ai/ca/api/v0/phone-numbers/sip-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 => [
"X-API-KEY: <api-key>"
],
]);
$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.lehar.ai/ca/api/v0/phone-numbers/sip-trunks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.lehar.ai/ca/api/v0/phone-numbers/sip-trunks")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/phone-numbers/sip-trunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "trunk_x1y2z3",
"name": "Acme SIP",
"kind": "byo",
"provider": "acme-telecom",
"sip_address": "sip.acme.example.com",
"sip_transport": "tls",
"auth_username": "acme_user",
"auth_password_last4": "7788",
"livekit_outbound_trunk_id": "ST_abc123",
"status": "active",
"created_at": "2026-09-01T12:00:00Z",
"updated_at": "2026-09-01T12:00:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 1
}
}{
"error": {
"code": "invalid_request",
"message": "limit and offset must be non-negative integers"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "forbidden",
"message": "Scope 'phone_numbers:read' is required"
}
}{
"error": {
"code": "not_found",
"message": "Customer not found"
}
}Phone Numbers
List SIP trunks
List the workspace’s connected BYO SIP trunks, optionally filtered by status. SIP credentials are never returned — only auth_username and the last four digits of the password (auth_password_last4) are exposed. Scope phone_numbers:read.
GET
/
phone-numbers
/
sip-trunks
List SIP trunks
curl --request GET \
--url https://api.lehar.ai/ca/api/v0/phone-numbers/sip-trunks \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.lehar.ai/ca/api/v0/phone-numbers/sip-trunks"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.lehar.ai/ca/api/v0/phone-numbers/sip-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.lehar.ai/ca/api/v0/phone-numbers/sip-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 => [
"X-API-KEY: <api-key>"
],
]);
$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.lehar.ai/ca/api/v0/phone-numbers/sip-trunks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.lehar.ai/ca/api/v0/phone-numbers/sip-trunks")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/phone-numbers/sip-trunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "trunk_x1y2z3",
"name": "Acme SIP",
"kind": "byo",
"provider": "acme-telecom",
"sip_address": "sip.acme.example.com",
"sip_transport": "tls",
"auth_username": "acme_user",
"auth_password_last4": "7788",
"livekit_outbound_trunk_id": "ST_abc123",
"status": "active",
"created_at": "2026-09-01T12:00:00Z",
"updated_at": "2026-09-01T12:00:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 1
}
}{
"error": {
"code": "invalid_request",
"message": "limit and offset must be non-negative integers"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "forbidden",
"message": "Scope 'phone_numbers:read' is required"
}
}{
"error": {
"code": "not_found",
"message": "Customer not found"
}
}Authorizations
ApiKeyAuthBearerAuth
Query Parameters
Maximum rows to return.
Required range:
0 <= x <= 100Number of rows to skip.
Required range:
x >= 0Filter by trunk status.
Available options:
active, archived Response
Paginated list of SIP trunks.

