Skip to main content
Workers for Platforms enables you to deploy Workers on behalf of your customers. This API provides multi-tenant isolation through dispatch namespaces.

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.
string
required
Your Cloudflare account ID
string
required
Name for the dispatch namespace
string
The unique identifier for the namespace
string
The namespace name
string
ISO 8601 timestamp when the namespace was created

List dispatch namespaces

Retrieve all dispatch namespaces in your account.
string
required
Your Cloudflare account ID

Get a dispatch namespace

Retrieve details about a specific dispatch namespace.
string
required
The name of the dispatch namespace
string
required
Your Cloudflare account ID

Delete a dispatch namespace

Delete a dispatch namespace and all Workers within it.
string
required
The name of the dispatch namespace to delete
string
required
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

  1. Namespace naming: Use a consistent naming convention for customer namespaces (e.g., customer-{id})
  2. Isolation: Each customer should have their own namespace to ensure security and isolation
  3. Cleanup: Delete namespaces when customers churn to free up resources
  4. Monitoring: Track namespace usage and performance per customer