PHP Client for Cloudflare API
Client Reference

Zones

Zones endpoint reference.

List

Lists, searches, sorts, and filters your zones. Listing zones across more than 500 accounts is currently not allowed.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount Identifier.
paramsarrayNo[]Query Parameters.
php
$response = $client->zones()->list('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Create

Create Zone

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount Identifier.
namestringYesThe domain name
typestringNo'full'A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.
php
$response = $client->zones()->create('ACCOUNT_ID', 'NAME', 'TYPE');
View this operation on the Cloudflare API Reference

Get

Zone Details

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->zones()->get('ZONE_ID');
View this operation on the Cloudflare API Reference

Delete

Delete Zone

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->zones()->delete('ZONE_ID');
View this operation on the Cloudflare API Reference

Edit

Edit Zone

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
typestringYesA full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. This parameter is only available to Enterprise customers or if it has been explicitly enabled on a zone.
vanityNameServersarrayNo[]An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
php
$response = $client->zones()->edit('ZONE_ID', 'TYPE', []);
View this operation on the Cloudflare API Reference

Activation Check

Triggeres a new activation check for a PENDING Zone. This can be triggered every 5 min for paygo/ent customers, every hour for FREE Zones.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->zones()->activationCheck('ZONE_ID');
View this operation on the Cloudflare API Reference

Purge

Purge Cached Content

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
purgeBymixedYes
php
$response = $client->zones()->purge('ZONE_ID', $purgeBy);
View this operation on the Cloudflare API Reference
Copyright © 2026