PHP Client for Cloudflare API
Workers

Versions

Versions endpoint reference.

List

List of Worker Versions. The first version in the list is the latest version.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptNamestringYesName of the script, used in URLs and route configuration.
paramsarrayNo[]Array containing the necessary params.
php
$response = $client->workers()->versions()->list('ACCOUNT_ID', 'SCRIPT_NAME', []);
View this operation on the Cloudflare API Reference

Upload

Upload a Worker Version without deploying to Cloudflare's network. You can find more about the multipart metadata on Cloudflare docs.

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

Get

Get Version Details.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptNamestringYesName of the script, used in URLs and route configuration.
versionIdstringYesVersion identifier.
php
$response = $client->workers()->versions()->get('ACCOUNT_ID', 'SCRIPT_NAME', 'VERSION_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026