Search + K

Command Palette

Search for a command to run...

Sign In

Delete a tunnel route (CIDR Endpoint)

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

Deletes a private network route from an account. The CIDR in ip_network_encoded must be written in URL-encoded format. If no virtual_network_id is provided it will delete the route from the default vnet. If no tun_type is provided it will fetch the type from the tunnel_id or if that is missing it will assume Cloudflare Tunnel as default. If tunnel_id is provided it will delete the route from that tunnel, otherwise it will delete the route based on the vnet and tun_type.

Parameters

path Path Parameters

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

query Query Parameters

Name Type
virtual_network_id
type TunnelVirtualNetworkId = string
tun_type
type TunnelTunnelType = "cfd_tunnel" | "warp_connector" | "warp" | "magic" | "ip_sec" | "gre" | "cni"
tunnel_id
type TunnelTunnelId = string

Responses

200 application/json

Delete 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

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