Workers for Platforms enables you to deploy Workers on behalf of your customers. This API provides multi-tenant isolation through dispatch namespaces.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudflare/cloudflare-typescript/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Access the Workers for Platforms API:Dispatch namespaces
Dispatch namespaces provide isolation between customer Workers in a multi-tenant environment.Create a dispatch namespace
Create a new namespace for isolating customer Workers.Your Cloudflare account ID
Name for the dispatch namespace
The unique identifier for the namespace
The namespace name
ISO 8601 timestamp when the namespace was created
List dispatch namespaces
Retrieve all dispatch namespaces in your account.Your Cloudflare account ID
Get a dispatch namespace
Retrieve details about a specific dispatch namespace.The name of the dispatch namespace
Your Cloudflare account ID
Delete a dispatch namespace
Delete a dispatch namespace and all Workers within it.The name of the dispatch namespace to delete
Your Cloudflare account ID
Use cases
Multi-tenant SaaS platforms
Use dispatch namespaces to isolate customer code:Dynamic Worker deployment
Deploy Workers programmatically for your users:Best practices
- Namespace naming: Use a consistent naming convention for customer namespaces (e.g.,
customer-{id}) - Isolation: Each customer should have their own namespace to ensure security and isolation
- Cleanup: Delete namespaces when customers churn to free up resources
- Monitoring: Track namespace usage and performance per customer