Skip to content
Start here

Subscriptions

List Event Subscriptions
client.queues.subscriptions.list(SubscriptionListParams { account_id, direction, order, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<SubscriptionListResponse { id, created_at, destination, 5 more } >
GET/accounts/{account_id}/event_subscriptions/subscriptions
Get Event Subscription
client.queues.subscriptions.get(stringsubscriptionId, SubscriptionGetParams { account_id } params, RequestOptionsoptions?): SubscriptionGetResponse { id, created_at, destination, 5 more }
GET/accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}
Create Event Subscription
client.queues.subscriptions.create(SubscriptionCreateParams { account_id, destination, enabled, 3 more } params, RequestOptionsoptions?): SubscriptionCreateResponse { id, created_at, destination, 5 more }
POST/accounts/{account_id}/event_subscriptions/subscriptions
Update Event Subscription
client.queues.subscriptions.update(stringsubscriptionId, SubscriptionUpdateParams { account_id, destination, enabled, 2 more } params, RequestOptionsoptions?): SubscriptionUpdateResponse { id, created_at, destination, 5 more }
PATCH/accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}
Delete Event Subscription
client.queues.subscriptions.delete(stringsubscriptionId, SubscriptionDeleteParams { account_id } params, RequestOptionsoptions?): SubscriptionDeleteResponse { id, created_at, destination, 5 more }
DELETE/accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}
ModelsExpand Collapse
SubscriptionListResponse { id, created_at, destination, 5 more }
id: string

Unique identifier for the subscription

created_at: string

When the subscription was created

formatdate-time
destination: Destination { queue_id, type }

Destination configuration for the subscription

queue_id: string

ID of the target queue

type: "queues.queue"

Type of destination

enabled: boolean

Whether the subscription is active

events: Array<string>

List of event types this subscription handles

modified_at: string

When the subscription was last modified

formatdate-time
name: string

Name of the subscription

source: MqEventSourceImages { type } | MqEventSourceKV { type } | MqEventSourceR2 { type } | 5 more

Source configuration for the subscription

One of the following:
MqEventSourceImages { type }
type?: "images"

Type of source

MqEventSourceKV { type }
type?: "kv"

Type of source

MqEventSourceR2 { type }
type?: "r2"

Type of source

MqEventSourceSuperSlurper { type }
type?: "superSlurper"

Type of source

MqEventSourceVectorize { type }
type?: "vectorize"

Type of source

MqEventSourceWorkersAIModel { model_name, type }
model_name?: string

Name of the Workers AI model

type?: "workersAi.model"

Type of source

MqEventSourceWorkersBuildsWorker { type, worker_name }
type?: "workersBuilds.worker"

Type of source

worker_name?: string

Name of the worker

MqEventSourceWorkflowsWorkflow { type, workflow_name }
type?: "workflows.workflow"

Type of source

workflow_name?: string

Name of the workflow

SubscriptionGetResponse { id, created_at, destination, 5 more }
id: string

Unique identifier for the subscription

created_at: string

When the subscription was created

formatdate-time
destination: Destination { queue_id, type }

Destination configuration for the subscription

queue_id: string

ID of the target queue

type: "queues.queue"

Type of destination

enabled: boolean

Whether the subscription is active

events: Array<string>

List of event types this subscription handles

modified_at: string

When the subscription was last modified

formatdate-time
name: string

Name of the subscription

source: MqEventSourceImages { type } | MqEventSourceKV { type } | MqEventSourceR2 { type } | 5 more

Source configuration for the subscription

One of the following:
MqEventSourceImages { type }
type?: "images"

Type of source

MqEventSourceKV { type }
type?: "kv"

Type of source

MqEventSourceR2 { type }
type?: "r2"

Type of source

MqEventSourceSuperSlurper { type }
type?: "superSlurper"

Type of source

MqEventSourceVectorize { type }
type?: "vectorize"

Type of source

MqEventSourceWorkersAIModel { model_name, type }
model_name?: string

Name of the Workers AI model

type?: "workersAi.model"

Type of source

MqEventSourceWorkersBuildsWorker { type, worker_name }
type?: "workersBuilds.worker"

Type of source

worker_name?: string

Name of the worker

MqEventSourceWorkflowsWorkflow { type, workflow_name }
type?: "workflows.workflow"

Type of source

workflow_name?: string

Name of the workflow

SubscriptionCreateResponse { id, created_at, destination, 5 more }
id: string

Unique identifier for the subscription

created_at: string

When the subscription was created

formatdate-time
destination: Destination { queue_id, type }

Destination configuration for the subscription

queue_id: string

ID of the target queue

type: "queues.queue"

Type of destination

enabled: boolean

Whether the subscription is active

events: Array<string>

List of event types this subscription handles

modified_at: string

When the subscription was last modified

formatdate-time
name: string

Name of the subscription

source: MqEventSourceImages { type } | MqEventSourceKV { type } | MqEventSourceR2 { type } | 5 more

Source configuration for the subscription

One of the following:
MqEventSourceImages { type }
type?: "images"

Type of source

MqEventSourceKV { type }
type?: "kv"

Type of source

MqEventSourceR2 { type }
type?: "r2"

Type of source

MqEventSourceSuperSlurper { type }
type?: "superSlurper"

Type of source

MqEventSourceVectorize { type }
type?: "vectorize"

Type of source

MqEventSourceWorkersAIModel { model_name, type }
model_name?: string

Name of the Workers AI model

type?: "workersAi.model"

Type of source

MqEventSourceWorkersBuildsWorker { type, worker_name }
type?: "workersBuilds.worker"

Type of source

worker_name?: string

Name of the worker

MqEventSourceWorkflowsWorkflow { type, workflow_name }
type?: "workflows.workflow"

Type of source

workflow_name?: string

Name of the workflow

SubscriptionUpdateResponse { id, created_at, destination, 5 more }
id: string

Unique identifier for the subscription

created_at: string

When the subscription was created

formatdate-time
destination: Destination { queue_id, type }

Destination configuration for the subscription

queue_id: string

ID of the target queue

type: "queues.queue"

Type of destination

enabled: boolean

Whether the subscription is active

events: Array<string>

List of event types this subscription handles

modified_at: string

When the subscription was last modified

formatdate-time
name: string

Name of the subscription

source: MqEventSourceImages { type } | MqEventSourceKV { type } | MqEventSourceR2 { type } | 5 more

Source configuration for the subscription

One of the following:
MqEventSourceImages { type }
type?: "images"

Type of source

MqEventSourceKV { type }
type?: "kv"

Type of source

MqEventSourceR2 { type }
type?: "r2"

Type of source

MqEventSourceSuperSlurper { type }
type?: "superSlurper"

Type of source

MqEventSourceVectorize { type }
type?: "vectorize"

Type of source

MqEventSourceWorkersAIModel { model_name, type }
model_name?: string

Name of the Workers AI model

type?: "workersAi.model"

Type of source

MqEventSourceWorkersBuildsWorker { type, worker_name }
type?: "workersBuilds.worker"

Type of source

worker_name?: string

Name of the worker

MqEventSourceWorkflowsWorkflow { type, workflow_name }
type?: "workflows.workflow"

Type of source

workflow_name?: string

Name of the workflow

SubscriptionDeleteResponse { id, created_at, destination, 5 more }
id: string

Unique identifier for the subscription

created_at: string

When the subscription was created

formatdate-time
destination: Destination { queue_id, type }

Destination configuration for the subscription

queue_id: string

ID of the target queue

type: "queues.queue"

Type of destination

enabled: boolean

Whether the subscription is active

events: Array<string>

List of event types this subscription handles

modified_at: string

When the subscription was last modified

formatdate-time
name: string

Name of the subscription

source: MqEventSourceImages { type } | MqEventSourceKV { type } | MqEventSourceR2 { type } | 5 more

Source configuration for the subscription

One of the following:
MqEventSourceImages { type }
type?: "images"

Type of source

MqEventSourceKV { type }
type?: "kv"

Type of source

MqEventSourceR2 { type }
type?: "r2"

Type of source

MqEventSourceSuperSlurper { type }
type?: "superSlurper"

Type of source

MqEventSourceVectorize { type }
type?: "vectorize"

Type of source

MqEventSourceWorkersAIModel { model_name, type }
model_name?: string

Name of the Workers AI model

type?: "workersAi.model"

Type of source

MqEventSourceWorkersBuildsWorker { type, worker_name }
type?: "workersBuilds.worker"

Type of source

worker_name?: string

Name of the worker

MqEventSourceWorkflowsWorkflow { type, workflow_name }
type?: "workflows.workflow"

Type of source

workflow_name?: string

Name of the workflow