## Create Subdomain `workers.subdomains.update(SubdomainUpdateParams**kwargs) -> SubdomainUpdateResponse` **put** `/accounts/{account_id}/workers/subdomain` Creates a Workers subdomain for an account. ### Parameters - `account_id: str` Identifier. - `subdomain: str` ### Returns - `class SubdomainUpdateResponse: …` - `subdomain: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) subdomain = client.workers.subdomains.update( account_id="023e105f4ecef8ad9ca31a8372d0c353", subdomain="my-subdomain", ) print(subdomain.subdomain) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "subdomain": "my-subdomain" }, "success": true } ```