PHP Client for Cloudflare API
Workers

Domains

Domains endpoint reference.

List

Lists all Worker Domains for an account.

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

Attach

Attaches a Worker to a zone and hostname.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
valuesarrayNo[]Values to set on account.
php
$response = $client->workers()->domains()->attach('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Detach

Detaches a Worker from a zone and hostname.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
domainIdstringYesIdentifer of the Worker Domain.
php
$response = $client->workers()->domains()->detach('ACCOUNT_ID', 'DOMAIN_ID');
View this operation on the Cloudflare API Reference

Get

Gets a Worker domain.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
domainIdstringYesIdentifer of the Worker Domain.
php
$response = $client->workers()->domains()->get('ACCOUNT_ID', 'DOMAIN_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026