Hanzo
OpenapiCloudflare

Publishes or withdraws one Worker script on the account's workers.dev subdomain.

Publishes or withdraws one Worker script on the account's workers.dev subdomain.

POST /v1/cloudflare/workers/scripts/{script}/subdomain

Addresshttps://api.hanzo.ai/v1/cloudflare/workers/scripts/{script}/subdomain
MethodPOST
Operationpost_cloudflare_workers_scripts_by_script_subdomain
AuthAuthorization: Bearer $HANZO_API_KEY

Publishes or withdraws one Worker script on the account's workers.dev subdomain. Requires org admin.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
scriptpathstringyesScript is the Worker script name, from the path.
enabledbodybooleanEnabled publishes the script on <script>.<subdomain>.workers.dev when true, and withdraws it when false.
scriptbodystringScript is the Worker script name, from the path.

Response

StatusBodyMeaning
200ok

200 body — 1 field.

FieldInTypeAlwaysDescription
(body)bodyanyyes

Failure carries the platform error shape — see Errors.

Examples

hanzo cloudflare workers scripts subdomain <script>

Cloudflare API · All Hanzo APIs · Interactive reference

How is this guide?

On this page