WorkerWorker Subdomain

Create Subdomain

PUT
Creates a Workers subdomain for an account.

Path parameters

account_identifierstringRequired
Identifier

Request

This endpoint expects a string.

Response

This endpoint returns an object
result
objectOptional
PUT
1curl -X PUT https://api.cloudflare.com/client/v4/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/subdomain \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d "{'subdomain': 'example-subdomain'}"
200Updated
1{
2 "result": {}
3}