PHP Client for Cloudflare API
Workers

Deployments

Deployments endpoint reference.

List

List of Worker Deployments. The first deployment in the list is the latest deployment actively serving traffic.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptMamestringYesName of the script, used in URLs and route configuration.
php
$response = $client->workers()->deployments()->list('ACCOUNT_ID', 'SCRIPT_MAME');
View this operation on the Cloudflare API Reference

Create

Deployments configure how Worker Versions are deployed to traffic. A deployment can consist of one or two versions of a Worker.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptMamestringYesName of the script, used in URLs and route configuration.
valuesmixedYesDployment config.
forceboolNofalseIf set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.
php
$response = $client->workers()->deployments()->create('ACCOUNT_ID', 'SCRIPT_MAME', $values, true);
View this operation on the Cloudflare API Reference
Copyright © 2026