Retrieve a Network Route
Retrieves a route and its status.
GET
/
network_routes
/
{id}
Retrieve a Network Route
curl --request GET \
--url https://api.telnyx.com/v2/network_routes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/network_routes/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/network_routes/{id}")
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": "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"
}
}{
"errors": [
{
"code": "10020",
"title": "Resource not found",
"detail": "get route: not found"
}
]
}{
"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.
Path Parameters
The id of the route.
Example:
"e8a2c5d0-3f7b-4a19-b6d2-9c1e0f8a7b53"
Response
Successful response.
Show child attributes
Show child attributes
Was this page helpful?
Retrieve a Network Route
curl --request GET \
--url https://api.telnyx.com/v2/network_routes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/network_routes/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/network_routes/{id}")
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": "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"
}
}{
"errors": [
{
"code": "10020",
"title": "Resource not found",
"detail": "get route: not found"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}