List all Network Routes
Lists the routes of the account’s Networks. A Network’s list is its effective route table: the routes added with POST /network_routes (origin static) and the routes that its attachments install (origin attachment). Lookup is longest prefix within the Network.
curl --request GET \
--url https://api.telnyx.com/v2/network_routes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/network_routes"
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/network_routes', 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/network_routes",
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/network_routes"
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/network_routes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/network_routes")
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": "b6a10cb9-2d4e-4f61-9a3b-7e5c8d1f0a26",
"record_type": "network_route",
"network_id": "91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24",
"cidr": "172.27.0.0/24",
"next_hop": {
"type": "wireguard_interface",
"id": "b6a10cb9-2d4e-4f61-9a3b-7e5c8d1f0a26"
},
"origin": "attachment",
"status": "active",
"created_at": "2026-10-21T15:04:05.123456Z"
},
{
"id": "e8a2c5d0-3f7b-4a19-b6d2-9c1e0f8a7b53",
"record_type": "network_route",
"network_id": "91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24",
"cidr": "10.20.0.0/16",
"next_hop": {
"type": "tunnel",
"id": "62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39"
},
"origin": "static",
"status": "active",
"created_at": "2026-10-21T15:04:05.123456Z"
}
],
"meta": {
"cursors": {}
}
}{
"errors": [
{
"code": "10022",
"title": "Unprocessable Entity",
"detail": "filter[network_id] is required",
"source": {
"parameter": "filter[network_id]"
}
}
]
}{
"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[network_id], filter[origin], filter[next_hop.type], filter[cidr], 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.
cidr, -cidr, status, -status, created_at, -created_at "-created_at"
Consolidated page parameter (deepObject style). Originally: page[after], page[limit]
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://api.telnyx.com/v2/network_routes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/network_routes"
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/network_routes', 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/network_routes",
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/network_routes"
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/network_routes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/network_routes")
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": "b6a10cb9-2d4e-4f61-9a3b-7e5c8d1f0a26",
"record_type": "network_route",
"network_id": "91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24",
"cidr": "172.27.0.0/24",
"next_hop": {
"type": "wireguard_interface",
"id": "b6a10cb9-2d4e-4f61-9a3b-7e5c8d1f0a26"
},
"origin": "attachment",
"status": "active",
"created_at": "2026-10-21T15:04:05.123456Z"
},
{
"id": "e8a2c5d0-3f7b-4a19-b6d2-9c1e0f8a7b53",
"record_type": "network_route",
"network_id": "91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24",
"cidr": "10.20.0.0/16",
"next_hop": {
"type": "tunnel",
"id": "62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39"
},
"origin": "static",
"status": "active",
"created_at": "2026-10-21T15:04:05.123456Z"
}
],
"meta": {
"cursors": {}
}
}{
"errors": [
{
"code": "10022",
"title": "Unprocessable Entity",
"detail": "filter[network_id] is required",
"source": {
"parameter": "filter[network_id]"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}