Cloudflare

Change subdomain

Change subdomain

PUT /cloudflare/client/v4/accounts/{account_id}/workers/subdomain

Change the account subdomain.

Support: supported

Parameters

NameLocationTypeRequiredDescription
account_idpathstringtrueAny value; your account comes from the API key.

Request body (application/json)

Required: true

NameTypeDescription
subdomainstringAccount subdomain, 8–32 lowercase letters and digits; part of every Worker URL.
{
  "type": "object",
  "required": [
    "subdomain"
  ],
  "properties": {
    "subdomain": {
      "type": "string",
      "description": "Account subdomain, 8–32 lowercase letters and digits; part of every Worker URL.",
      "pattern": "^[a-z0-9]{8,32}$",
      "example": "acme1234"
    }
  }
}

Response

HTTP 200

Success

application/json

NameTypeDescription
successbooleanAlways true on success.
errorsarray<any>Always empty on success.
messagesarray<any>Always empty on success.
resultobject
result.subdomainstringAccount subdomain, 8–32 lowercase letters and digits; part of every Worker URL.
result_infoobjectPresent on list responses.
result_info.pageintegerPage number.
result_info.per_pageintegerPage size.
result_info.countintegerItems on this page.
Export

On this page