Search + K

Command Palette

Search for a command to run...

Sign In

Update a tunnel route

PATCH /accounts/{account_id}/teamnet/routes/{route_id}
Copy endpoint
https://api.cloudflare.com/client/v4

Updates an existing private network route in an account. The fields that are meant to be updated should be provided in the body of the request.

Parameters

path Path Parameters

Name Type
route_id required
type TunnelRouteId = string
account_id required
type TunnelAccountId = string

Request Body

application/json required
{
comment?: TunnelRouteComment

Optional remark describing the route.

type TunnelRouteComment = string
;
network?: TunnelIpNetwork

The private IPv4 or IPv6 range connected by the route, in CIDR notation.

type TunnelIpNetwork = string
;
tunnel_id?: TunnelTunnelId

UUID of the tunnel.

type TunnelTunnelId = string
;
virtual_network_id?: TunnelVirtualNetworkIdComputedOptional

UUID of the virtual network.

type TunnelVirtualNetworkIdComputedOptional = string
;
}

Responses

200 application/json

Update a tunnel route response

type TunnelRouteResponseSingle = interface TunnelApiResponseCommon {
errors: TunnelMessages
type TunnelMessages = { code: number;message: string; }[]
;
messages: TunnelMessages
type TunnelMessages = { code: number;message: string; }[]
;
result: {} | unknown[] | string;
success: true;
}
& { result?: TunnelRoute
interface TunnelRoute {
comment?: TunnelRouteComment;
created_at?: TunnelCreatedAt;
deleted_at?: TunnelDeletedAt;
id?: TunnelRouteId;
network?: TunnelIpNetwork;
tunnel_id?: TunnelTunnelId;
virtual_network_id?: TunnelVirtualNetworkId;
}
; }

Client Errors

4XX application/json

Update a tunnel route response failure

type TunnelRouteResponseSingle = interface TunnelApiResponseCommon {
errors: TunnelMessages
type TunnelMessages = { code: number;message: string; }[]
;
messages: TunnelMessages
type TunnelMessages = { code: number;message: string; }[]
;
result: {} | unknown[] | string;
success: true;
}
& { result?: TunnelRoute
interface TunnelRoute {
comment?: TunnelRouteComment;
created_at?: TunnelCreatedAt;
deleted_at?: TunnelDeletedAt;
id?: TunnelRouteId;
network?: TunnelIpNetwork;
tunnel_id?: TunnelTunnelId;
virtual_network_id?: TunnelVirtualNetworkId;
}
; }
& interface TunnelApiResponseCommonFailure {
errors: TunnelMessages
type TunnelMessages = { code: number;message: string; }[]
;
messages: TunnelMessages
type TunnelMessages = { code: number;message: string; }[]
;
result: null;
success: false;
}