PHP Client for Cloudflare API
Networks

Virtual Networks

Virtual Networks endpoint reference.

List

Lists and filters virtual networks in an account.

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

Create

Adds a new virtual network to an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
valuesarrayYes`name` is required. `is_default` makes this the account's default virtual network, and `comment` describes it.
php
$response = $client->zeroTrust()->networks()->virtualNetworks()->create('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Get

Get a virtual network.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
virtualNetworkIdstringYesUUID of the virtual network.
php
$response = $client->zeroTrust()->networks()->virtualNetworks()->get('ACCOUNT_ID', 'VIRTUAL_NETWORK_ID');
View this operation on the Cloudflare API Reference

Edit

Updates an existing virtual network.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
virtualNetworkIdstringYesUUID of the virtual network.
valuesarrayNo[]he fields that are meant to be updated
php
$response = $client->zeroTrust()->networks()->virtualNetworks()->edit('ACCOUNT_ID', 'VIRTUAL_NETWORK_ID', []);
View this operation on the Cloudflare API Reference

Delete

Deletes an existing virtual network.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
virtualNetworkIdstringYesUUID of the virtual network.
php
$response = $client->zeroTrust()->networks()->virtualNetworks()->delete('ACCOUNT_ID', 'VIRTUAL_NETWORK_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026