Search + K

Command Palette

Search for a command to run...

Sign In

Create a tunnel route (CIDR Endpoint)

Deprecated
POST /accounts/{account_id}/teamnet/routes/network/{ip_network_encoded}
Copy endpoint
https://api.cloudflare.com/client/v4

Routes a private network through a Cloudflare Tunnel. The CIDR in ip_network_encoded must be written in URL-encoded format.

Parameters

path Path Parameters

Name Type
ip_network_encoded required
type TunnelIpNetworkEncoded = string
account_id required
type TunnelAccountId = string

Request Body

application/json required
{ comment?: TunnelRouteComment

Optional remark describing the route.

type TunnelRouteComment = string
;tunnel_id: TunnelTunnelId

UUID of the tunnel.

type TunnelTunnelId = string
;virtual_network_id?: TunnelVirtualNetworkId

UUID of the virtual network.

type TunnelVirtualNetworkId = string
; }

Responses

200 application/json

Create 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

Create 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;
}