List all Tunnels
Lists the tunnels on the account with their status and connected tunnel processes. Responses never include tunnel_token.
GET
/
tunnels
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.tunnels.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.tunnels.list()
print(page.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
tunnels, err := client.Tunnels.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tunnels.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.tunnels().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.tunnels.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->tunnels->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx tunnels list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/tunnels \
--header 'Authorization: Bearer <token>'{
"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?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.tunnels.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.tunnels.list()
print(page.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
tunnels, err := client.Tunnels.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tunnels.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.tunnels().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.tunnels.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->tunnels->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx tunnels list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/tunnels \
--header 'Authorization: Bearer <token>'{
"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": {}
}
]
}