PHP Client for Cloudflare API
Tunnel

Routes

Routes endpoint reference.

List

Lists and filters private network routes in an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
paramsarrayNo[]Array containing the necessary params.
php
$response = $client->tunnel()->routes()->list('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Get By IP

Fetches routes that contain the given IP address.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
ipstringYesIP
virtualNetworkIdstring|nullNoUUID of the virtual network.
php
$response = $client->tunnel()->routes()->getByIP('ACCOUNT_ID', 'IP', 'VIRTUAL_NETWORK_ID');
View this operation on the Cloudflare API Reference

Create

Routes a private network through a Cloudflare Tunnel.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
networkstringYesThe private IPv4 or IPv6 range connected by the route, in CIDR notation.
virtualNetworkIdstring|nullNoUUID of the virtual network.
commentstring|nullNoOptional remark describing the route.
php
$response = $client->tunnel()->routes()->create('ACCOUNT_ID', 'NETWORK', 'VIRTUAL_NETWORK_ID', 'COMMENT');
View this operation on the Cloudflare API Reference

Get

Get a private network route in an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
routeIdstringYesUUID of the route.
php
$response = $client->tunnel()->routes()->get('ACCOUNT_ID', 'ROUTE_ID');
View this operation on the Cloudflare API Reference

Edit

Updates an existing private network route in an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
routeIdstringYesUUID of the route.
valuesarrayNo[]The fields that are meant to be updated
php
$response = $client->tunnel()->routes()->edit('ACCOUNT_ID', 'ROUTE_ID', []);

Delete

Deletes a private network route from an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
routeIdstringYesUUID of the route.
php
$response = $client->tunnel()->routes()->delete('ACCOUNT_ID', 'ROUTE_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026