Skip to content
Start here

Namespaces

List dispatch namespaces
client.workersForPlatforms.dispatch.namespaces.list(NamespaceListParams { account_id } params, RequestOptionsoptions?): SinglePage<NamespaceListResponse { created_by, created_on, modified_by, 5 more } >
GET/accounts/{account_id}/workers/dispatch/namespaces
Get dispatch namespace
client.workersForPlatforms.dispatch.namespaces.get(stringdispatchNamespace, NamespaceGetParams { account_id } params, RequestOptionsoptions?): NamespaceGetResponse { created_by, created_on, modified_by, 5 more }
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}
Create dispatch namespace
client.workersForPlatforms.dispatch.namespaces.create(NamespaceCreateParams { account_id, name } params, RequestOptionsoptions?): NamespaceCreateResponse { created_by, created_on, modified_by, 5 more }
POST/accounts/{account_id}/workers/dispatch/namespaces
Delete dispatch namespace
client.workersForPlatforms.dispatch.namespaces.delete(stringdispatchNamespace, NamespaceDeleteParams { account_id } params, RequestOptionsoptions?): NamespaceDeleteResponse | null
DELETE/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}
ModelsExpand Collapse
NamespaceListResponse { created_by, created_on, modified_by, 5 more }
created_by?: string

Identifier.

maxLength32
created_on?: string

When the script was created.

formatdate-time
modified_by?: string

Identifier.

maxLength32
modified_on?: string

When the script was last modified.

formatdate-time
namespace_id?: string

API Resource UUID tag.

maxLength36
namespace_name?: string

Name of the Workers for Platforms dispatch namespace.

script_count?: number

The current number of scripts in this Dispatch Namespace.

trusted_workers?: boolean

Whether the Workers in the namespace are executed in a “trusted” manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the request.cf object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and request.cf is undefined. By default, Workers in a namespace are “untrusted”.

NamespaceGetResponse { created_by, created_on, modified_by, 5 more }
created_by?: string

Identifier.

maxLength32
created_on?: string

When the script was created.

formatdate-time
modified_by?: string

Identifier.

maxLength32
modified_on?: string

When the script was last modified.

formatdate-time
namespace_id?: string

API Resource UUID tag.

maxLength36
namespace_name?: string

Name of the Workers for Platforms dispatch namespace.

script_count?: number

The current number of scripts in this Dispatch Namespace.

trusted_workers?: boolean

Whether the Workers in the namespace are executed in a “trusted” manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the request.cf object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and request.cf is undefined. By default, Workers in a namespace are “untrusted”.

NamespaceCreateResponse { created_by, created_on, modified_by, 5 more }
created_by?: string

Identifier.

maxLength32
created_on?: string

When the script was created.

formatdate-time
modified_by?: string

Identifier.

maxLength32
modified_on?: string

When the script was last modified.

formatdate-time
namespace_id?: string

API Resource UUID tag.

maxLength36
namespace_name?: string

Name of the Workers for Platforms dispatch namespace.

script_count?: number

The current number of scripts in this Dispatch Namespace.

trusted_workers?: boolean

Whether the Workers in the namespace are executed in a “trusted” manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the request.cf object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and request.cf is undefined. By default, Workers in a namespace are “untrusted”.

NamespaceDeleteResponse = unknown

NamespacesScripts

Worker Details
client.workersForPlatforms.dispatch.namespaces.scripts.get(stringscriptName, ScriptGetParams { account_id, dispatch_namespace } params, RequestOptionsoptions?): Script { created_on, dispatch_namespace, modified_on, script }
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}
Upload Worker Module
client.workersForPlatforms.dispatch.namespaces.scripts.update(stringscriptName, ScriptUpdateParams { account_id, dispatch_namespace, metadata, 2 more } params, RequestOptionsoptions?): ScriptUpdateResponse { startup_time_ms, id, cache_options, 22 more }
PUT/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}
Delete Worker
client.workersForPlatforms.dispatch.namespaces.scripts.delete(stringscriptName, ScriptDeleteParams { account_id, dispatch_namespace, force } params, RequestOptionsoptions?): ScriptDeleteResponse | null
DELETE/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}
ModelsExpand Collapse
Script { created_on, dispatch_namespace, modified_on, script }

Details about a worker uploaded to a Workers for Platforms namespace.

created_on?: string

When the script was created.

formatdate-time
dispatch_namespace?: string

Name of the Workers for Platforms dispatch namespace.

modified_on?: string

When the script was last modified.

formatdate-time
script?: Script { id, cache_options, compatibility_date, 20 more }
ScriptUpdateResponse { startup_time_ms, id, cache_options, 22 more }
startup_time_ms: number
id?: string

The name used to identify the script.

cache_options?: CacheOptions { enabled, cross_version_cache }

Global CacheW configuration for the Worker. When caching is on, the platform provisions a cloudflare.app zone for the Worker. A type: worker entry in the exports map can override this value for a single entrypoint.

enabled: boolean

Whether caching is enabled for this Worker.

cross_version_cache?: boolean

Whether cached responses are shared across Worker version uploads. This is independent of enabled. It can stay true while caching is off, so the preference survives turning caching off and back on.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.

created_on?: string

When the script was created.

formatdate-time
entry_point?: string

The entry point for the script.

etag?: string

Hashed script content, can be used in a If-None-Match header when updating.

exports?: Record<string, WorkersWorkerExport { type, cache, state } | WorkersDurableObjectExport { storage, type, container, state } | WorkersDurableObjectDeletedExport { state, type } | 3 more>

Declarative exports for the Worker’s most recent version, including Durable Object classes (with their storage backend) and named Worker entrypoints. Tombstoned lifecycle entries are omitted, so only live exports (created and expecting-transfer) are returned.

One of the following:
WorkersWorkerExport { type, cache, state }

A named Worker entrypoint export (type: worker). Worker entrypoints are always live (state: created) and carry no storage or lifecycle fields. The optional cache block overrides the Worker’s global cache_options.enabled for this entrypoint.

type: "worker"

Marks this entry as a Worker entrypoint export.

cache?: Cache { enabled }

Cache override for this entrypoint. Overrides the Worker’s global cache_options.enabled for this entrypoint only.

enabled: boolean

Whether caching is enabled for this entrypoint.

state?: "created"

Live export. May be omitted; defaults to created.

WorkersDurableObjectExport { storage, type, container, state }

A live Durable Object export (state: created, the default). The platform auto-provisions the namespace on first deploy, matches it on subsequent deploys, and never mutates or deletes it as a side effect of a code-only change. storage is required; renamed_to, transferred_to and transfer_from are not allowed on a live entry.

storage: "sqlite" | "legacy-kv"

Durable Object storage backend. sqlite is the recommended (and only) backend for new namespaces. legacy-kv is accepted only for a class whose namespace already exists as KV-backed; the exports flow never provisions a new legacy-kv namespace.

One of the following:
"sqlite"
"legacy-kv"
type: "durable-object"

Marks this entry as a Durable Object export.

container?: string

Name of the container (declared in the upload’s metadata.containers) that backs this Durable Object. When set, the namespace is container-enabled. Valid only on live entries.

maxLength128
state?: "created"

Live export. May be omitted; defaults to created.

WorkersDurableObjectDeletedExport { state, type }

A deleted tombstone: retires the provisioned namespace for this class and all of its data. The class must be absent from the uploaded code and no other Worker in the account may bind to the namespace, otherwise the deploy is rejected. No other fields are allowed. Deletion is irreversible.

state: "deleted"

Tombstone that deletes the namespace.

type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectRenamedExport { renamed_to, state, type }

A renamed tombstone: rewrites the provisioned namespace’s class name from this map key to renamed_to. The source class may stay in code during the rollout window (an info notice is emitted). storage, transferred_to and transfer_from are not allowed.

renamed_to: string

The destination class name. Must differ from the source class (the map key) and must be declared as a live (created) entry in the same exports map. Write-only: never present in GET responses.

maxLength128
state: "renamed"

Tombstone that renames the namespace’s class.

type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectTransferredExport { state, transferred_to, type }

A transferred tombstone (source side of a two-phase transfer): hands ownership of the provisioned namespace to another script in the same account, named by transferred_to. The target must have already deployed a matching expecting-transfer entry. The source class may stay in code during the rollout window (an info notice is emitted). storage, renamed_to and transfer_from are not allowed.

state: "transferred"

Tombstone that transfers the namespace to another script.

transferred_to: string

The destination script name. Must be in the same account and the same dispatch-namespace context (or both non-dispatch). Cross-dispatch-namespace transfers are rejected. Write-only: never present in GET responses.

maxLength128
type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectExpectingTransferExport { state, storage, transfer_from, 2 more }

The target side of a two-phase transfer (state: expecting-transfer). Declares that this script expects to receive a namespace for this class from the transfer_from script. This is a live entry, not a tombstone: bindings resolve through the source’s namespace until the source commits with a transferred tombstone. storage and transfer_from are required; renamed_to and transferred_to are not allowed.

state: "expecting-transfer"

Target side of a two-phase transfer.

storage: "sqlite" | "legacy-kv"

Durable Object storage backend. sqlite is the recommended (and only) backend for new namespaces. legacy-kv is accepted only for a class whose namespace already exists as KV-backed; the exports flow never provisions a new legacy-kv namespace.

One of the following:
"sqlite"
"legacy-kv"
transfer_from: string

The source script name to receive the namespace from. Must be in the same account and dispatch-namespace context. Present on reads for expecting-transfer entries.

maxLength128
type: "durable-object"

Marks this entry as a Durable Object export.

container?: string

Name of the container (declared in the upload’s metadata.containers) that backs this Durable Object once the transfer settles. Valid only on live entries.

maxLength128
handlers?: Array<string>

The names of handlers exported as part of the default export.

has_assets?: boolean

Whether a Worker contains assets.

has_modules?: boolean

Whether a Worker contains modules.

last_deployed_from?: string

The client most recently used to deploy this Worker.

logpush?: boolean

Whether Logpush is turned on for the Worker.

migration_tag?: string

The tag of the Durable Object migration that was most recently applied for this Worker.

modified_on?: string

When the script was last modified.

formatdate-time
named_handlers?: Array<NamedHandler>

Named exports, such as Durable Object class implementations and named entrypoints.

handlers?: Array<string>

The names of handlers exported as part of the named export.

name?: string

The name of the export.

observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

propagation_policy?: "authenticated" | "accept"

Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. “authenticated” (default) honors inbound trace context only when accompanied by a valid trace auth token. “accept” unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled.

One of the following:
"authenticated"
"accept"
placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 more

Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.

One of the following:
UnionMember0 { mode, last_analyzed_at, status }
mode: "smart"
last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember1 { region, last_analyzed_at, status }
region: string

Cloud region for targeted placement in format ‘provider:region’.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember2 { hostname, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember3 { host, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember4 { mode, region, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format ‘provider:region’.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember5 { hostname, mode, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember6 { host, mode, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember7 { mode, target, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format ‘provider:region’.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
Deprecatedplacement_mode?: "smart" | "targeted"
One of the following:
"smart"
"targeted"
Deprecatedplacement_status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"
One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
tag?: string

The immutable ID of the script.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"
ScriptDeleteResponse = unknown

NamespacesScriptsAsset Upload

Create Assets Upload Session
client.workersForPlatforms.dispatch.namespaces.scripts.assetUpload.create(stringscriptName, AssetUploadCreateParams { account_id, dispatch_namespace, manifest } params, RequestOptionsoptions?): AssetUploadCreateResponse { buckets, jwt }
POST/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/assets-upload-session
ModelsExpand Collapse
AssetUploadCreateResponse { buckets, jwt }
buckets?: Array<Array<string>>

The requests to make to upload assets.

jwt?: string

A JWT to use as authentication for uploading assets.

NamespacesScriptsContent

Get Script Content
client.workersForPlatforms.dispatch.namespaces.scripts.content.get(stringscriptName, ContentGetParams { account_id, dispatch_namespace } params, RequestOptionsoptions?): Response
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content
Put Script Content
client.workersForPlatforms.dispatch.namespaces.scripts.content.update(stringscriptName, ContentUpdateParams { account_id, dispatch_namespace, metadata, 3 more } params, RequestOptionsoptions?): Script { id, cache_options, compatibility_date, 20 more }
PUT/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content

NamespacesScriptsSettings

Get Script Settings
client.workersForPlatforms.dispatch.namespaces.scripts.settings.get(stringscriptName, SettingGetParams { account_id, dispatch_namespace } params, RequestOptionsoptions?): SettingGetResponse { bindings, cache_options, compatibility_date, 11 more }
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings
Patch Script Settings
client.workersForPlatforms.dispatch.namespaces.scripts.settings.edit(stringscriptName, SettingEditParams { account_id, dispatch_namespace, settings } params, RequestOptionsoptions?): SettingEditResponse { bindings, cache_options, compatibility_date, 11 more }
PATCH/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings
ModelsExpand Collapse
SettingGetResponse { bindings, cache_options, compatibility_date, 11 more }

Script and version settings for Workers for Platforms namespace scripts. Same as script-and-version-settings-item but without annotations, which are not supported for namespace scripts.

bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 33 more>

List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to “default” if omitted. Customers who don’t use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy — Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The “default” namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMessaging { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The Messaging namespace to bind to.

type: "messaging"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { database_id, name, type, id }
database_id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

Deprecatedid?: string

This property has been renamed to database_id.

Identifier of the D1 database to bind to.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal “latest” to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period, mitigation_timeout }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

mitigation_timeout?: number

Duration in seconds to apply the mitigation action after the rate limit is exceeded. Valid values are 0 (disabled), 10, or multiples of 60 up to 86400. Must be greater than or equal to the period when non-zero.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindFlagship { app_id, name, type }
app_id: string

ID of the Flagship app to bind to for feature flag evaluation.

maxLength128
name: string

A JavaScript variable name for the binding.

type: "flagship"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only “cf1:network” is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

cache_options?: CacheOptions { enabled, cross_version_cache }

Global CacheW configuration for the Worker. When caching is on, the platform provisions a cloudflare.app zone for the Worker. A type: worker entry in the exports map can override this value for a single entrypoint.

enabled: boolean

Whether caching is enabled for this Worker.

cross_version_cache?: boolean

Whether cached responses are shared across Worker version uploads. This is independent of enabled. It can stay true while caching is off, so the preference survives turning caching off and back on.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.

exports?: Record<string, WorkersWorkerExport { type, cache, state } | WorkersDurableObjectExport { storage, type, container, state } | WorkersDurableObjectDeletedExport { state, type } | 3 more>

Declarative exports for the Worker. Worker entrypoint entries (type: worker) carry cache configuration for that entrypoint.

One of the following:
WorkersWorkerExport { type, cache, state }

A named Worker entrypoint export (type: worker). Worker entrypoints are always live (state: created) and carry no storage or lifecycle fields. The optional cache block overrides the Worker’s global cache_options.enabled for this entrypoint.

type: "worker"

Marks this entry as a Worker entrypoint export.

cache?: Cache { enabled }

Cache override for this entrypoint. Overrides the Worker’s global cache_options.enabled for this entrypoint only.

enabled: boolean

Whether caching is enabled for this entrypoint.

state?: "created"

Live export. May be omitted; defaults to created.

WorkersDurableObjectExport { storage, type, container, state }

A live Durable Object export (state: created, the default). The platform auto-provisions the namespace on first deploy, matches it on subsequent deploys, and never mutates or deletes it as a side effect of a code-only change. storage is required; renamed_to, transferred_to and transfer_from are not allowed on a live entry.

storage: "sqlite" | "legacy-kv"

Durable Object storage backend. sqlite is the recommended (and only) backend for new namespaces. legacy-kv is accepted only for a class whose namespace already exists as KV-backed; the exports flow never provisions a new legacy-kv namespace.

One of the following:
"sqlite"
"legacy-kv"
type: "durable-object"

Marks this entry as a Durable Object export.

container?: string

Name of the container (declared in the upload’s metadata.containers) that backs this Durable Object. When set, the namespace is container-enabled. Valid only on live entries.

maxLength128
state?: "created"

Live export. May be omitted; defaults to created.

WorkersDurableObjectDeletedExport { state, type }

A deleted tombstone: retires the provisioned namespace for this class and all of its data. The class must be absent from the uploaded code and no other Worker in the account may bind to the namespace, otherwise the deploy is rejected. No other fields are allowed. Deletion is irreversible.

state: "deleted"

Tombstone that deletes the namespace.

type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectRenamedExport { renamed_to, state, type }

A renamed tombstone: rewrites the provisioned namespace’s class name from this map key to renamed_to. The source class may stay in code during the rollout window (an info notice is emitted). storage, transferred_to and transfer_from are not allowed.

renamed_to: string

The destination class name. Must differ from the source class (the map key) and must be declared as a live (created) entry in the same exports map. Write-only: never present in GET responses.

maxLength128
state: "renamed"

Tombstone that renames the namespace’s class.

type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectTransferredExport { state, transferred_to, type }

A transferred tombstone (source side of a two-phase transfer): hands ownership of the provisioned namespace to another script in the same account, named by transferred_to. The target must have already deployed a matching expecting-transfer entry. The source class may stay in code during the rollout window (an info notice is emitted). storage, renamed_to and transfer_from are not allowed.

state: "transferred"

Tombstone that transfers the namespace to another script.

transferred_to: string

The destination script name. Must be in the same account and the same dispatch-namespace context (or both non-dispatch). Cross-dispatch-namespace transfers are rejected. Write-only: never present in GET responses.

maxLength128
type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectExpectingTransferExport { state, storage, transfer_from, 2 more }

The target side of a two-phase transfer (state: expecting-transfer). Declares that this script expects to receive a namespace for this class from the transfer_from script. This is a live entry, not a tombstone: bindings resolve through the source’s namespace until the source commits with a transferred tombstone. storage and transfer_from are required; renamed_to and transferred_to are not allowed.

state: "expecting-transfer"

Target side of a two-phase transfer.

storage: "sqlite" | "legacy-kv"

Durable Object storage backend. sqlite is the recommended (and only) backend for new namespaces. legacy-kv is accepted only for a class whose namespace already exists as KV-backed; the exports flow never provisions a new legacy-kv namespace.

One of the following:
"sqlite"
"legacy-kv"
transfer_from: string

The source script name to receive the namespace from. Must be in the same account and dispatch-namespace context. Present on reads for expecting-transfer entries.

maxLength128
type: "durable-object"

Marks this entry as a Durable Object export.

container?: string

Name of the container (declared in the upload’s metadata.containers) that backs this Durable Object once the transfer settles. Valid only on live entries.

maxLength128
exports_reconciliation?: ExportsReconciliation { created, deleted, info, 6 more }

Summary of the declarative exports reconciliation that ran on this upload. Populated only when the uploaded metadata included an exports block. Durable Object entries drive reconciliation; type: worker entries do not contribute to this summary.

created: Array<string>

Class names for which a new namespace was provisioned.

deleted: Array<string>

Class names whose namespace was deleted by a deleted tombstone.

info: Array<Info>

Non-blocking info entries (stale tombstones, tombstone applied with class still in code). See exports_reconciliation_info.

class: string

The class name the info entry is about.

message: string

Human-readable explanation.

scenario: "code_class_not_in_exports" | "provisioned_class_missing_from_config" | "config_export_not_in_code" | 30 more

Stable, machine-readable tag identifying which reconciliation scenario produced an error, warning, or info entry. Clients may branch on this value instead of parsing message.

One of the following:
"code_class_not_in_exports"
"provisioned_class_missing_from_config"
"config_export_not_in_code"
"config_references_nonexistent_class"
"orphaned_provisioned_namespace"
"storage_type_mismatch"
"free_tier_requires_sqlite"
"invalid_export"
"tombstone_delete_class_still_in_code"
"tombstone_delete_blocked_by_external_bindings"
"tombstone_renamed_to_occupied"
"transferred_pending_not_found"
"transferred_target_missing"
"transferred_target_mismatch"
"phase_one_transfer_source_missing"
"phase_one_transfer_source_namespace_missing"
"phase_one_transfer_target_class_provisioned"
"phase_one_transfer_after_commit_mismatch"
"phase_one_transfer_duplicate"
"phase_one_transfer_target_in_dispatch_namespace"
"phase_one_transfer_source_in_dispatch_namespace"
"transferred_source_in_dispatch_namespace"
"transferred_target_in_dispatch_namespace"
"container_undeclared_reference"
"container_class_not_durable_object"
"container_wiring_inconsistent"
"container_multiple_durable_objects"
"transfer_container_parity_mismatch"
"transfer_container_parity_mismatch_on_commit"
"tombstone_class_still_in_code"
"stale_tombstone"
"transfer_receive_already_applied"
"transfer_receive_cleanup_complete"
namespace_id?: string

The provisioned namespace the entry relates to, when applicable.

formatuuid
referencing_scripts?: Array<string>

Other Workers in the account that still bind to the affected class. Advisory: while non-empty the tombstone is not yet safe to remove — redeploy these Workers with bindings re-pointed first.

removable_entries: Array<string>

Source class names whose tombstone entry is now stale and safe to delete from exports (no remaining referencing scripts).

renamed: Array<Renamed>

Applied renamed tombstones.

from: string

The original (source) class name.

to: string

The new class name (renamed_to).

transfer_pending: Array<TransferPending>

Phase-1 transfer hints recorded on the target side.

class: string

The target-side class name awaiting transfer.

from: string

The source script the namespace will be transferred from.

transferred: Array<Transferred>

Committed transferred tombstones (phase-2).

class: string

The source class name that was transferred.

phase: "committed"

The transfer phase. Currently always committed.

to: string

The destination script that now owns the namespace.

updated: Array<string>

Class names whose provisioned namespace was mutated in place.

warnings: Array<Warning>

Non-blocking warnings. See exports_reconciliation_warning.

class: string

The class name the warning is about.

message: string

Human-readable explanation of the warning.

scenario: "code_class_not_in_exports" | "provisioned_class_missing_from_config" | "config_export_not_in_code" | 30 more

Stable, machine-readable tag identifying which reconciliation scenario produced an error, warning, or info entry. Clients may branch on this value instead of parsing message.

One of the following:
"code_class_not_in_exports"
"provisioned_class_missing_from_config"
"config_export_not_in_code"
"config_references_nonexistent_class"
"orphaned_provisioned_namespace"
"storage_type_mismatch"
"free_tier_requires_sqlite"
"invalid_export"
"tombstone_delete_class_still_in_code"
"tombstone_delete_blocked_by_external_bindings"
"tombstone_renamed_to_occupied"
"transferred_pending_not_found"
"transferred_target_missing"
"transferred_target_mismatch"
"phase_one_transfer_source_missing"
"phase_one_transfer_source_namespace_missing"
"phase_one_transfer_target_class_provisioned"
"phase_one_transfer_after_commit_mismatch"
"phase_one_transfer_duplicate"
"phase_one_transfer_target_in_dispatch_namespace"
"phase_one_transfer_source_in_dispatch_namespace"
"transferred_source_in_dispatch_namespace"
"transferred_target_in_dispatch_namespace"
"container_undeclared_reference"
"container_class_not_durable_object"
"container_wiring_inconsistent"
"container_multiple_durable_objects"
"transfer_container_parity_mismatch"
"transfer_container_parity_mismatch_on_commit"
"tombstone_class_still_in_code"
"stale_tombstone"
"transfer_receive_already_applied"
"transfer_receive_cleanup_complete"
namespace_id?: string

The provisioned namespace the warning relates to, when applicable.

formatuuid
limits?: Limits { cpu_ms, subrequests }

Limits to apply for this Worker.

cpu_ms?: number

The amount of CPU time this Worker can use in milliseconds.

subrequests?: number

The number of subrequests this Worker can make per request.

logpush?: boolean

Whether Logpush is turned on for the Worker.

migrations?: SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } | WorkersMultipleStepMigrations { new_tag, old_tag, steps }

Migrations to apply for Durable Objects associated with this Worker.

One of the following:
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more }

A single set of migrations to apply.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.

steps?: Array<MigrationStep { deleted_classes, new_classes, new_sqlite_classes, 2 more } >

Migrations to apply in order.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

propagation_policy?: "authenticated" | "accept"

Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. “authenticated” (default) honors inbound trace context only when accompanied by a valid trace auth token. “accept” unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled.

One of the following:
"authenticated"
"accept"
placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 more

Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.

One of the following:
Mode { mode }
mode: "smart"
Region { region }
region: string

Cloud region for targeted placement in format ‘provider:region’.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host and port for targeted placement.

UnionMember4 { mode, region }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format ‘provider:region’.

UnionMember5 { hostname, mode }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember6 { host, mode }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember7 { mode, target }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format ‘provider:region’.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"
SettingEditResponse { bindings, cache_options, compatibility_date, 11 more }

Script and version settings for Workers for Platforms namespace scripts. Same as script-and-version-settings-item but without annotations, which are not supported for namespace scripts.

bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 33 more>

List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to “default” if omitted. Customers who don’t use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy — Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The “default” namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMessaging { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The Messaging namespace to bind to.

type: "messaging"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { database_id, name, type, id }
database_id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

Deprecatedid?: string

This property has been renamed to database_id.

Identifier of the D1 database to bind to.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal “latest” to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period, mitigation_timeout }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

mitigation_timeout?: number

Duration in seconds to apply the mitigation action after the rate limit is exceeded. Valid values are 0 (disabled), 10, or multiples of 60 up to 86400. Must be greater than or equal to the period when non-zero.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindFlagship { app_id, name, type }
app_id: string

ID of the Flagship app to bind to for feature flag evaluation.

maxLength128
name: string

A JavaScript variable name for the binding.

type: "flagship"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only “cf1:network” is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

cache_options?: CacheOptions { enabled, cross_version_cache }

Global CacheW configuration for the Worker. When caching is on, the platform provisions a cloudflare.app zone for the Worker. A type: worker entry in the exports map can override this value for a single entrypoint.

enabled: boolean

Whether caching is enabled for this Worker.

cross_version_cache?: boolean

Whether cached responses are shared across Worker version uploads. This is independent of enabled. It can stay true while caching is off, so the preference survives turning caching off and back on.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.

exports?: Record<string, WorkersWorkerExport { type, cache, state } | WorkersDurableObjectExport { storage, type, container, state } | WorkersDurableObjectDeletedExport { state, type } | 3 more>

Declarative exports for the Worker. Worker entrypoint entries (type: worker) carry cache configuration for that entrypoint.

One of the following:
WorkersWorkerExport { type, cache, state }

A named Worker entrypoint export (type: worker). Worker entrypoints are always live (state: created) and carry no storage or lifecycle fields. The optional cache block overrides the Worker’s global cache_options.enabled for this entrypoint.

type: "worker"

Marks this entry as a Worker entrypoint export.

cache?: Cache { enabled }

Cache override for this entrypoint. Overrides the Worker’s global cache_options.enabled for this entrypoint only.

enabled: boolean

Whether caching is enabled for this entrypoint.

state?: "created"

Live export. May be omitted; defaults to created.

WorkersDurableObjectExport { storage, type, container, state }

A live Durable Object export (state: created, the default). The platform auto-provisions the namespace on first deploy, matches it on subsequent deploys, and never mutates or deletes it as a side effect of a code-only change. storage is required; renamed_to, transferred_to and transfer_from are not allowed on a live entry.

storage: "sqlite" | "legacy-kv"

Durable Object storage backend. sqlite is the recommended (and only) backend for new namespaces. legacy-kv is accepted only for a class whose namespace already exists as KV-backed; the exports flow never provisions a new legacy-kv namespace.

One of the following:
"sqlite"
"legacy-kv"
type: "durable-object"

Marks this entry as a Durable Object export.

container?: string

Name of the container (declared in the upload’s metadata.containers) that backs this Durable Object. When set, the namespace is container-enabled. Valid only on live entries.

maxLength128
state?: "created"

Live export. May be omitted; defaults to created.

WorkersDurableObjectDeletedExport { state, type }

A deleted tombstone: retires the provisioned namespace for this class and all of its data. The class must be absent from the uploaded code and no other Worker in the account may bind to the namespace, otherwise the deploy is rejected. No other fields are allowed. Deletion is irreversible.

state: "deleted"

Tombstone that deletes the namespace.

type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectRenamedExport { renamed_to, state, type }

A renamed tombstone: rewrites the provisioned namespace’s class name from this map key to renamed_to. The source class may stay in code during the rollout window (an info notice is emitted). storage, transferred_to and transfer_from are not allowed.

renamed_to: string

The destination class name. Must differ from the source class (the map key) and must be declared as a live (created) entry in the same exports map. Write-only: never present in GET responses.

maxLength128
state: "renamed"

Tombstone that renames the namespace’s class.

type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectTransferredExport { state, transferred_to, type }

A transferred tombstone (source side of a two-phase transfer): hands ownership of the provisioned namespace to another script in the same account, named by transferred_to. The target must have already deployed a matching expecting-transfer entry. The source class may stay in code during the rollout window (an info notice is emitted). storage, renamed_to and transfer_from are not allowed.

state: "transferred"

Tombstone that transfers the namespace to another script.

transferred_to: string

The destination script name. Must be in the same account and the same dispatch-namespace context (or both non-dispatch). Cross-dispatch-namespace transfers are rejected. Write-only: never present in GET responses.

maxLength128
type: "durable-object"

Marks this entry as a Durable Object export.

WorkersDurableObjectExpectingTransferExport { state, storage, transfer_from, 2 more }

The target side of a two-phase transfer (state: expecting-transfer). Declares that this script expects to receive a namespace for this class from the transfer_from script. This is a live entry, not a tombstone: bindings resolve through the source’s namespace until the source commits with a transferred tombstone. storage and transfer_from are required; renamed_to and transferred_to are not allowed.

state: "expecting-transfer"

Target side of a two-phase transfer.

storage: "sqlite" | "legacy-kv"

Durable Object storage backend. sqlite is the recommended (and only) backend for new namespaces. legacy-kv is accepted only for a class whose namespace already exists as KV-backed; the exports flow never provisions a new legacy-kv namespace.

One of the following:
"sqlite"
"legacy-kv"
transfer_from: string

The source script name to receive the namespace from. Must be in the same account and dispatch-namespace context. Present on reads for expecting-transfer entries.

maxLength128
type: "durable-object"

Marks this entry as a Durable Object export.

container?: string

Name of the container (declared in the upload’s metadata.containers) that backs this Durable Object once the transfer settles. Valid only on live entries.

maxLength128
exports_reconciliation?: ExportsReconciliation { created, deleted, info, 6 more }

Summary of the declarative exports reconciliation that ran on this upload. Populated only when the uploaded metadata included an exports block. Durable Object entries drive reconciliation; type: worker entries do not contribute to this summary.

created: Array<string>

Class names for which a new namespace was provisioned.

deleted: Array<string>

Class names whose namespace was deleted by a deleted tombstone.

info: Array<Info>

Non-blocking info entries (stale tombstones, tombstone applied with class still in code). See exports_reconciliation_info.

class: string

The class name the info entry is about.

message: string

Human-readable explanation.

scenario: "code_class_not_in_exports" | "provisioned_class_missing_from_config" | "config_export_not_in_code" | 30 more

Stable, machine-readable tag identifying which reconciliation scenario produced an error, warning, or info entry. Clients may branch on this value instead of parsing message.

One of the following:
"code_class_not_in_exports"
"provisioned_class_missing_from_config"
"config_export_not_in_code"
"config_references_nonexistent_class"
"orphaned_provisioned_namespace"
"storage_type_mismatch"
"free_tier_requires_sqlite"
"invalid_export"
"tombstone_delete_class_still_in_code"
"tombstone_delete_blocked_by_external_bindings"
"tombstone_renamed_to_occupied"
"transferred_pending_not_found"
"transferred_target_missing"
"transferred_target_mismatch"
"phase_one_transfer_source_missing"
"phase_one_transfer_source_namespace_missing"
"phase_one_transfer_target_class_provisioned"
"phase_one_transfer_after_commit_mismatch"
"phase_one_transfer_duplicate"
"phase_one_transfer_target_in_dispatch_namespace"
"phase_one_transfer_source_in_dispatch_namespace"
"transferred_source_in_dispatch_namespace"
"transferred_target_in_dispatch_namespace"
"container_undeclared_reference"
"container_class_not_durable_object"
"container_wiring_inconsistent"
"container_multiple_durable_objects"
"transfer_container_parity_mismatch"
"transfer_container_parity_mismatch_on_commit"
"tombstone_class_still_in_code"
"stale_tombstone"
"transfer_receive_already_applied"
"transfer_receive_cleanup_complete"
namespace_id?: string

The provisioned namespace the entry relates to, when applicable.

formatuuid
referencing_scripts?: Array<string>

Other Workers in the account that still bind to the affected class. Advisory: while non-empty the tombstone is not yet safe to remove — redeploy these Workers with bindings re-pointed first.

removable_entries: Array<string>

Source class names whose tombstone entry is now stale and safe to delete from exports (no remaining referencing scripts).

renamed: Array<Renamed>

Applied renamed tombstones.

from: string

The original (source) class name.

to: string

The new class name (renamed_to).

transfer_pending: Array<TransferPending>

Phase-1 transfer hints recorded on the target side.

class: string

The target-side class name awaiting transfer.

from: string

The source script the namespace will be transferred from.

transferred: Array<Transferred>

Committed transferred tombstones (phase-2).

class: string

The source class name that was transferred.

phase: "committed"

The transfer phase. Currently always committed.

to: string

The destination script that now owns the namespace.

updated: Array<string>

Class names whose provisioned namespace was mutated in place.

warnings: Array<Warning>

Non-blocking warnings. See exports_reconciliation_warning.

class: string

The class name the warning is about.

message: string

Human-readable explanation of the warning.

scenario: "code_class_not_in_exports" | "provisioned_class_missing_from_config" | "config_export_not_in_code" | 30 more

Stable, machine-readable tag identifying which reconciliation scenario produced an error, warning, or info entry. Clients may branch on this value instead of parsing message.

One of the following:
"code_class_not_in_exports"
"provisioned_class_missing_from_config"
"config_export_not_in_code"
"config_references_nonexistent_class"
"orphaned_provisioned_namespace"
"storage_type_mismatch"
"free_tier_requires_sqlite"
"invalid_export"
"tombstone_delete_class_still_in_code"
"tombstone_delete_blocked_by_external_bindings"
"tombstone_renamed_to_occupied"
"transferred_pending_not_found"
"transferred_target_missing"
"transferred_target_mismatch"
"phase_one_transfer_source_missing"
"phase_one_transfer_source_namespace_missing"
"phase_one_transfer_target_class_provisioned"
"phase_one_transfer_after_commit_mismatch"
"phase_one_transfer_duplicate"
"phase_one_transfer_target_in_dispatch_namespace"
"phase_one_transfer_source_in_dispatch_namespace"
"transferred_source_in_dispatch_namespace"
"transferred_target_in_dispatch_namespace"
"container_undeclared_reference"
"container_class_not_durable_object"
"container_wiring_inconsistent"
"container_multiple_durable_objects"
"transfer_container_parity_mismatch"
"transfer_container_parity_mismatch_on_commit"
"tombstone_class_still_in_code"
"stale_tombstone"
"transfer_receive_already_applied"
"transfer_receive_cleanup_complete"
namespace_id?: string

The provisioned namespace the warning relates to, when applicable.

formatuuid
limits?: Limits { cpu_ms, subrequests }

Limits to apply for this Worker.

cpu_ms?: number

The amount of CPU time this Worker can use in milliseconds.

subrequests?: number

The number of subrequests this Worker can make per request.

logpush?: boolean

Whether Logpush is turned on for the Worker.

migrations?: SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } | WorkersMultipleStepMigrations { new_tag, old_tag, steps }

Migrations to apply for Durable Objects associated with this Worker.

One of the following:
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more }

A single set of migrations to apply.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.

steps?: Array<MigrationStep { deleted_classes, new_classes, new_sqlite_classes, 2 more } >

Migrations to apply in order.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

propagation_policy?: "authenticated" | "accept"

Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. “authenticated” (default) honors inbound trace context only when accompanied by a valid trace auth token. “accept” unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled.

One of the following:
"authenticated"
"accept"
placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 more

Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.

One of the following:
Mode { mode }
mode: "smart"
Region { region }
region: string

Cloud region for targeted placement in format ‘provider:region’.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host and port for targeted placement.

UnionMember4 { mode, region }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format ‘provider:region’.

UnionMember5 { hostname, mode }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember6 { host, mode }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember7 { mode, target }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format ‘provider:region’.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"

NamespacesScriptsBindings

Get Script Bindings
client.workersForPlatforms.dispatch.namespaces.scripts.bindings.get(stringscriptName, BindingGetParams { account_id, dispatch_namespace } params, RequestOptionsoptions?): SinglePage<BindingGetResponse>
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/bindings
ModelsExpand Collapse
BindingGetResponse = WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 33 more

A binding to allow the Worker to communicate with resources.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to “default” if omitted. Customers who don’t use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy — Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The “default” namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMessaging { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The Messaging namespace to bind to.

type: "messaging"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { database_id, name, type, id }
database_id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

Deprecatedid?: string

This property has been renamed to database_id.

Identifier of the D1 database to bind to.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal “latest” to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period, mitigation_timeout }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

mitigation_timeout?: number

Duration in seconds to apply the mitigation action after the rate limit is exceeded. Valid values are 0 (disabled), 10, or multiples of 60 up to 86400. Must be greater than or equal to the period when non-zero.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindFlagship { app_id, name, type }
app_id: string

ID of the Flagship app to bind to for feature flag evaluation.

maxLength128
name: string

A JavaScript variable name for the binding.

type: "flagship"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only “cf1:network” is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

NamespacesScriptsSecrets

List Script Secrets
client.workersForPlatforms.dispatch.namespaces.scripts.secrets.list(stringscriptName, SecretListParams { account_id, dispatch_namespace } params, RequestOptionsoptions?): SinglePage<SecretListResponse>
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets
Get secret binding
client.workersForPlatforms.dispatch.namespaces.scripts.secrets.get(stringsecretName, SecretGetParams { account_id, dispatch_namespace, script_name, url_encoded } params, RequestOptionsoptions?): SecretGetResponse
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets/{secret_name}
Add script secret
client.workersForPlatforms.dispatch.namespaces.scripts.secrets.update(stringscriptName, SecretUpdateParamsparams, RequestOptionsoptions?): SecretUpdateResponse
PUT/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets
Delete script secret
client.workersForPlatforms.dispatch.namespaces.scripts.secrets.delete(stringsecretName, SecretDeleteParams { account_id, dispatch_namespace, script_name, url_encoded } params, RequestOptionsoptions?): SecretDeleteResponse | null
DELETE/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets/{secret_name}
Patch multiple script secrets
client.workersForPlatforms.dispatch.namespaces.scripts.secrets.bulkUpdate(stringscriptName, SecretBulkUpdateParams { account_id, dispatch_namespace, secrets, version_tags } params, RequestOptionsoptions?): SecretBulkUpdateResponse { , }
PATCH/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets-bulk
ModelsExpand Collapse
SecretListResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more }

A secret value accessible through a binding.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

SecretGetResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more }

A secret value accessible through a binding.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

SecretUpdateResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more }

A secret value accessible through a binding.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

SecretDeleteResponse = unknown
SecretBulkUpdateResponse = Record<string, WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more } >

Map of secret names to secret metadata for resulting secrets.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is “jwk”.

NamespacesScriptsTags

Get Script Tags
client.workersForPlatforms.dispatch.namespaces.scripts.tags.list(stringscriptName, TagListParams { account_id, dispatch_namespace } params, RequestOptionsoptions?): SinglePage<TagListResponse>
GET/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags
Put Script Tags
client.workersForPlatforms.dispatch.namespaces.scripts.tags.update(stringscriptName, TagUpdateParams { account_id, dispatch_namespace, body } params, RequestOptionsoptions?): SinglePage<TagUpdateResponse>
PUT/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags
Delete Script Tag
client.workersForPlatforms.dispatch.namespaces.scripts.tags.delete(stringtag, TagDeleteParams { account_id, dispatch_namespace, script_name } params, RequestOptionsoptions?): TagDeleteResponse | null
DELETE/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags/{tag}
ModelsExpand Collapse
TagListResponse = string
TagUpdateResponse = string
TagDeleteResponse = unknown