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.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.tailscaleSubnetRouters.update('id', {
name: 'tailnet-ashburn',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.tailscale_subnet_routers.update(
id="id",
name="tailnet-ashburn",
)
print(response.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"),
)
tailscaleSubnetRouter, err := client.TailscaleSubnetRouters.Update(
context.TODO(),
"id",
telnyx.TailscaleSubnetRouterUpdateParams{
Name: telnyx.String("tailnet-ashburn"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tailscaleSubnetRouter.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.tailscaleSubnetRouters.TailscaleSubnetRouterUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
TailscaleSubnetRouterUpdateParams params = TailscaleSubnetRouterUpdateParams.builder()
.name("tailnet-ashburn")
.build();
var response = client.tailscaleSubnetRouters().update("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.tailscale_subnet_routers.update("id", name: "tailnet-ashburn")
puts(response)<?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 {
$response = $client->tailscaleSubnetRouters->update(
'id',
name: 'tailnet-ashburn',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx tailscale-subnet-routers update \
--api-key 'My API Key' \
--id 6a09cdc3-8948-47f0-aa62-74ac943d6c58 \
--name tailnet-ashburncurl --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"
]
}
'{
"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?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.tailscaleSubnetRouters.update('id', {
name: 'tailnet-ashburn',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.tailscale_subnet_routers.update(
id="id",
name="tailnet-ashburn",
)
print(response.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"),
)
tailscaleSubnetRouter, err := client.TailscaleSubnetRouters.Update(
context.TODO(),
"id",
telnyx.TailscaleSubnetRouterUpdateParams{
Name: telnyx.String("tailnet-ashburn"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tailscaleSubnetRouter.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.tailscaleSubnetRouters.TailscaleSubnetRouterUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
TailscaleSubnetRouterUpdateParams params = TailscaleSubnetRouterUpdateParams.builder()
.name("tailnet-ashburn")
.build();
var response = client.tailscaleSubnetRouters().update("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.tailscale_subnet_routers.update("id", name: "tailnet-ashburn")
puts(response)<?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 {
$response = $client->tailscaleSubnetRouters->update(
'id',
name: 'tailnet-ashburn',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx tailscale-subnet-routers update \
--api-key 'My API Key' \
--id 6a09cdc3-8948-47f0-aa62-74ac943d6c58 \
--name tailnet-ashburncurl --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"
]
}
'{
"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": {}
}
]
}