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.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
params | array | No | [] | Query Parameters. |
php
$response = $client->zones()->list('ACCOUNT_ID', []);
Create
Create Zone
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
name | string | Yes | The domain name | |
type | string | No | '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');
Get
Zone Details
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->zones()->get('ZONE_ID');
Delete
Delete Zone
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->zones()->delete('ZONE_ID');
Edit
Edit Zone
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
type | string | Yes | A 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. | |
vanityNameServers | array | No | [] | 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', []);
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.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->zones()->activationCheck('ZONE_ID');
Purge
Purge Cached Content
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
purgeBy | mixed | Yes |
php
$response = $client->zones()->purge('ZONE_ID', $purgeBy);

