PHP Client for Cloudflare API
Workers

Subdomain

Subdomain endpoint reference.

Get

Returns a Workers subdomain for an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
php
$response = $client->workers()->subdomain()->get('ACCOUNT_ID');
View this operation on the Cloudflare API Reference

Create

Creates a Workers subdomain for an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
subdomainstringYesSubdomain.
php
$response = $client->workers()->subdomain()->create('ACCOUNT_ID', 'SUBDOMAIN');
View this operation on the Cloudflare API Reference
Copyright © 2026