List all Tunnels
Lists the tunnels on the account with their status and connected tunnel processes. Responses never include tunnel_token.
GET
/
tunnels
List all Tunnels
curl --request GET \
--url https://api.telnyx.com/v2/tunnels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/tunnels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telnyx.com/v2/tunnels', 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.telnyx.com/v2/tunnels",
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.telnyx.com/v2/tunnels"
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.telnyx.com/v2/tunnels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/tunnels")
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{
"data": [
{
"id": "62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39",
"record_type": "tunnel",
"name": "chicago-dc",
"status": "healthy",
"connection_count": 2,
"connections": [
{
"hostname": "dc1-tunnel-a",
"version": "0.6.0",
"region_code": "chicago-il",
"connected_at": "2026-10-21T15:04:05.123456Z"
},
{
"hostname": "dc1-tunnel-b",
"version": "0.6.0",
"region_code": "chicago-il",
"connected_at": "2026-10-21T15:04:05.123456Z"
}
],
"created_at": "2026-10-21T15:04:05.123456Z"
}
],
"meta": {
"cursors": {}
}
}{
"errors": [
{
"code": "10022",
"title": "Unprocessable Entity",
"detail": "unsupported sort field",
"source": {
"pointer": "sort"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Consolidated filter parameter (deepObject style). Originally: filter[name], filter[status]
Show child attributes
Show child attributes
Sorts the results by a field, ascending, or descending with a leading -. The default is -created_at.
Available options:
name, -name, status, -status, created_at, -created_at, updated_at, -updated_at Example:
"-created_at"
Consolidated page parameter (deepObject style). Originally: page[after], page[limit]
Show child attributes
Show child attributes
Was this page helpful?
List all Tunnels
curl --request GET \
--url https://api.telnyx.com/v2/tunnels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/tunnels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telnyx.com/v2/tunnels', 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.telnyx.com/v2/tunnels",
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.telnyx.com/v2/tunnels"
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.telnyx.com/v2/tunnels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/tunnels")
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{
"data": [
{
"id": "62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39",
"record_type": "tunnel",
"name": "chicago-dc",
"status": "healthy",
"connection_count": 2,
"connections": [
{
"hostname": "dc1-tunnel-a",
"version": "0.6.0",
"region_code": "chicago-il",
"connected_at": "2026-10-21T15:04:05.123456Z"
},
{
"hostname": "dc1-tunnel-b",
"version": "0.6.0",
"region_code": "chicago-il",
"connected_at": "2026-10-21T15:04:05.123456Z"
}
],
"created_at": "2026-10-21T15:04:05.123456Z"
}
],
"meta": {
"cursors": {}
}
}{
"errors": [
{
"code": "10022",
"title": "Unprocessable Entity",
"detail": "unsupported sort field",
"source": {
"pointer": "sort"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}