---
title: List tunnel routes
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Zero Trust](https://developers.cloudflare.com/api/typescript/resources/zero_trust)

[Networks](https://developers.cloudflare.com/api/typescript/resources/zero_trust/subresources/networks)

[Routes](https://developers.cloudflare.com/api/typescript/resources/zero_trust/subresources/networks/subresources/routes)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List tunnel routes

client.zeroTrust.networks.routes.list(RouteListParams {account\_id, comment, existed\_at, 9 more } params, RequestOptionsoptions?): V4PagePaginationArray< [Teamnet](<https://developers.cloudflare.com/api/typescript/resources/zero_trust#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)>) {id, comment, created\_at, 7 more } >

GET/accounts/{account\_id}/teamnet/routes

Lists and filters private network routes in an account.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Cloudflare One Networks Write``Cloudflare One Networks Read``Cloudflare Tunnel Write``Cloudflare Tunnel Read`

##### ParametersExpand Collapse

<details>

<summary>

params: RouteListParams {account\_id, comment, existed\_at, 9 more }

</summary>

account\_id: string

Path param: Cloudflare account ID

maxLength32

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

comment?: string

Query param: Optional remark describing the route.

maxLength100

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20comment">Link to this property</a>

existed\_at?: string

Query param: If provided, include only resources that were created (and not deleted) before this time. URL encoded.

formaturl-encoded-date-time

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20existed_at">Link to this property</a>

is\_deleted?: boolean

Query param: If <code>true</code>, only include deleted routes. If <code>false</code>, exclude deleted routes. If empty, all routes will be included.

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20is_deleted">Link to this property</a>

network\_subset?: string

Query param: If set, only list routes that are contained within this IP range.

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20network_subset">Link to this property</a>

network\_superset?: string

Query param: If set, only list routes that contain this IP range.

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20network_superset">Link to this property</a>

page?: number

Query param: Page number of paginated results.

minimum1

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page">Link to this property</a>

per\_page?: number

Query param: Number of results to display.

maximum1000

minimum1

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page">Link to this property</a>

route\_id?: string

Query param: UUID of the route.

maxLength36

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20route_id">Link to this property</a>

<details>

<summary>

tun\_types?: Array&lt;"cfd\_tunnel"| "warp\_connector"| "warp"| 4 more&gt;

Query param: The types of tunnels to filter by, separated by commas.

</summary>

One of the following:

"cfd\_tunnel"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"warp\_connector"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"warp"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"magic"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"ip\_sec"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

"gre"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

"cni"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types">Link to this property</a>

tunnel\_id?: string

Query param: UUID of the tunnel.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tunnel_id">Link to this property</a>

virtual\_network\_id?: string

Query param: UUID of the virtual network.

formatuuid

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20virtual_network_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.networks.routes%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

Teamnet {id, comment, created\_at, 7 more }

</summary>

id?: string

UUID of the route.

maxLength36

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

comment?: string

Optional remark describing the route.

maxLength100

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20comment">Link to this property</a>

created\_at?: string

Timestamp of when the resource was created.

formatdate-time

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

deleted\_at?: string

Timestamp of when the resource was deleted. If <code>null</code>, the resource has not been deleted.

formatdate-time

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20deleted_at">Link to this property</a>

network?: string

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

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20network">Link to this property</a>

<details>

<summary>

tun\_type?: "cfd\_tunnel"| "warp\_connector"| "warp"| 4 more

The type of tunnel.

</summary>

One of the following:

"cfd\_tunnel"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%200">Link to this property</a>

"warp\_connector"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%201">Link to this property</a>

"warp"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%202">Link to this property</a>

"magic"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%203">Link to this property</a>

"ip\_sec"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%204">Link to this property</a>

"gre"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%205">Link to this property</a>

"cni"

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tun_type">Link to this property</a>

tunnel\_id?: string

UUID of the tunnel.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tunnel_id">Link to this property</a>

tunnel\_name?: string

A user-friendly name for a tunnel.

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20tunnel_name">Link to this property</a>

virtual\_network\_id?: string

UUID of the virtual network.

formatuuid

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20virtual_network_id">Link to this property</a>

virtual\_network\_name?: string

A user-friendly name for the virtual network.

maxLength256

<a href="#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)%20%3E%20(property)%20virtual_network_name">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.networks.routes%20%3E%20(model)%20teamnet%20%3E%20(schema)>)

### List tunnel routes

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const teamnet of client.zeroTrust.networks.routes.list({
  account_id: '699d98642c564d2e855e9661899b7252',
})) {
  console.log(teamnet.id);
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "comment": "Example comment for this route.",
      "created_at": "2021-01-25T18:22:34.317854Z",
      "deleted_at": "2009-11-10T23:00:00Z",
      "network": "172.16.0.0/16",
      "tun_type": "cfd_tunnel",
      "tunnel_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "tunnel_name": "blog",
      "virtual_network_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "virtual_network_name": "us-east-1-vpc"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "comment": "Example comment for this route.",
      "created_at": "2021-01-25T18:22:34.317854Z",
      "deleted_at": "2009-11-10T23:00:00Z",
      "network": "172.16.0.0/16",
      "tun_type": "cfd_tunnel",
      "tunnel_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "tunnel_name": "blog",
      "virtual_network_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "virtual_network_name": "us-east-1-vpc"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```