Cloudflare has updated the rules governing dispatch namespace naming. Names must now consist solely of lowercase letters, digits, underscores, or dashes, begin with a letter, digit, or underscore, and be no longer than 256 characters. The change aligns dispatch namespace names with the existing worker‑name constraints.
What Changed
Previously, a dispatch namespace could include characters such as slashes, percent signs, spaces, and uppercase letters. Those characters sometimes broke API calls that read, deploy, or delete workers within the namespace. The new validation rejects any name that does not meet the stricter pattern, returning a 400 response with error code 100120.
Invalid dispatch namespace name. Ensure it does not already exist and uses only lowercase letters, numbers, underscores and dashes (do not start with a dash).
Impact on Tooling and Automation
Three primary interfaces now surface the validation error:
POSTto the dispatch namespace creation endpoint returns400/100120for invalid names.- The
wrangler dispatch-namespace createcommand mirrors the same error code. - Terraform resources of type
cloudflare_workers_for_platforms_dispatch_namespacefail duringapplyif thenameattribute violates the new rules.
Existing namespaces remain functional; the rule only applies to new creations.
Operational and Security Considerations
From an operational standpoint, the change reduces the likelihood of malformed API requests that could cause silent failures or require manual remediation. For security‑focused teams, limiting the character set eliminates edge‑case parsing issues that might be exploited in downstream services that assume well‑formed identifiers.
Practitioners should review any CI/CD pipelines, IaC templates, or scripts that generate namespace names dynamically. Automated checks that enforce the new pattern can prevent build breaks. If a legacy namespace uses prohibited characters, it will continue to work, but any attempt to clone or recreate it with a new name must follow the updated rules.
Related CloudNinjas coverage: hands-on guides.
What This Means For Practitioners
Audit your naming conventions now and update any tooling that constructs dispatch namespace identifiers. Add a simple regex check—^[a-z0-9_-][a-z0-9_-]{0,255}$—to validation steps in CI pipelines, Terraform modules, and Wrangler wrappers. By aligning with the new constraints, you avoid unexpected 400 errors, keep deployment automation smooth, and maintain a cleaner surface for downstream services that consume namespace identifiers.
