Update a Tailscale Subnet Router
Renames the router, changes its advertised routes, or retries a failed enrollment. Any change queues a new provisioning run and returns the router with status provisioning. The router keeps its machine identity on the tailnet. Send an empty object to retry a failed router with its stored auth key. Include a new auth_key only while the router has never enrolled. The router’s Network and region cannot change: create a new router instead.
curl --request PATCH \
--url https://api.telnyx.com/v2/tailscale_subnet_routers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"advertised_routes": [
"172.27.0.0/24",
"172.27.1.0/24"
]
}
'import requests
url = "https://api.telnyx.com/v2/tailscale_subnet_routers/{id}"
payload = { "advertised_routes": ["172.27.0.0/24", "172.27.1.0/24"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({advertised_routes: ['172.27.0.0/24', '172.27.1.0/24']})
};
fetch('https://api.telnyx.com/v2/tailscale_subnet_routers/{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/tailscale_subnet_routers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'advertised_routes' => [
'172.27.0.0/24',
'172.27.1.0/24'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telnyx.com/v2/tailscale_subnet_routers/{id}"
payload := strings.NewReader("{\n \"advertised_routes\": [\n \"172.27.0.0/24\",\n \"172.27.1.0/24\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.telnyx.com/v2/tailscale_subnet_routers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"advertised_routes\": [\n \"172.27.0.0/24\",\n \"172.27.1.0/24\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/tailscale_subnet_routers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"advertised_routes\": [\n \"172.27.0.0/24\",\n \"172.27.1.0/24\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "5c6f0a7e-6c7b-4d7f-9f2e-3b1e4e9a8c21",
"record_type": "tailscale_subnet_router",
"name": "tailnet-ashburn",
"network_id": "0de011ae-ee53-4df4-ba96-754728eb5aad",
"region_code": "ashburn-va",
"advertised_routes": [
"172.27.0.0/24",
"172.27.1.0/24"
],
"status": "provisioning",
"customer_address": "172.27.254.1",
"device_id": "n5c6f0a7e1CNTRL",
"tailnet_name": "acme.example",
"tailscale_ips": [
"100.101.2.30",
"fd7a:115c:a1e0::2a"
],
"created_at": "2026-10-13T15:04:05.123456Z",
"updated_at": "2026-10-14T09:12:00.000000Z"
}
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "Routes must exclude default, local, and Tailscale ranges.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
}
}
]
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The request failed because it was not well-formed.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10027",
"title": "Unprocessable Entity",
"detail": "The server understood the syntax of the request but was unable to process the instructions."
}
]
}{
"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
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Body
Every field is optional. A change queues a new provisioning run and returns the router with status provisioning. An empty object retries a failed router.
A user specified name for the router.
1 - 128"tailnet-ashburn"
IPv4 subnets of the Network that the router advertises to the tailnet. Each entry is a canonical CIDR that the Network routes. Default, loopback, link-local, multicast, and Tailscale (100.64.0.0/10) ranges are rejected. So are ranges that overlap the router's own, 172.27.254.0/24 and 198.18.0.0/20.
1 - 64 elements["172.27.0.0/24"]
A replacement Tailscale auth key. Accepted only while the router has never enrolled, for example after a failed enrollment. Never returned.
^tskey-auth-[A-Za-z0-9_-]{10,250}$"tskey-auth-k1AbCdEfGh2IjKlMnOpQrStUv"
Response
Successful response. The change is queued and provisioning has started.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.telnyx.com/v2/tailscale_subnet_routers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"advertised_routes": [
"172.27.0.0/24",
"172.27.1.0/24"
]
}
'import requests
url = "https://api.telnyx.com/v2/tailscale_subnet_routers/{id}"
payload = { "advertised_routes": ["172.27.0.0/24", "172.27.1.0/24"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({advertised_routes: ['172.27.0.0/24', '172.27.1.0/24']})
};
fetch('https://api.telnyx.com/v2/tailscale_subnet_routers/{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/tailscale_subnet_routers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'advertised_routes' => [
'172.27.0.0/24',
'172.27.1.0/24'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telnyx.com/v2/tailscale_subnet_routers/{id}"
payload := strings.NewReader("{\n \"advertised_routes\": [\n \"172.27.0.0/24\",\n \"172.27.1.0/24\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.telnyx.com/v2/tailscale_subnet_routers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"advertised_routes\": [\n \"172.27.0.0/24\",\n \"172.27.1.0/24\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/tailscale_subnet_routers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"advertised_routes\": [\n \"172.27.0.0/24\",\n \"172.27.1.0/24\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "5c6f0a7e-6c7b-4d7f-9f2e-3b1e4e9a8c21",
"record_type": "tailscale_subnet_router",
"name": "tailnet-ashburn",
"network_id": "0de011ae-ee53-4df4-ba96-754728eb5aad",
"region_code": "ashburn-va",
"advertised_routes": [
"172.27.0.0/24",
"172.27.1.0/24"
],
"status": "provisioning",
"customer_address": "172.27.254.1",
"device_id": "n5c6f0a7e1CNTRL",
"tailnet_name": "acme.example",
"tailscale_ips": [
"100.101.2.30",
"fd7a:115c:a1e0::2a"
],
"created_at": "2026-10-13T15:04:05.123456Z",
"updated_at": "2026-10-14T09:12:00.000000Z"
}
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "Routes must exclude default, local, and Tailscale ranges.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
}
}
]
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The request failed because it was not well-formed.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10027",
"title": "Unprocessable Entity",
"detail": "The server understood the syntax of the request but was unable to process the instructions."
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}