Skip to main content
Cloudflare Queues is a global message queuing service. Use the API to create queues, send messages, and manage consumers.

Overview

Access the Queues API:

Queues

Manage queue creation and configuration.

Create a queue

Create a new queue.
string
required
Your Cloudflare account ID
string
required
Name for the queue
string
The unique identifier for the queue
string
The queue name
string
ISO 8601 timestamp when the queue was created
string
ISO 8601 timestamp when the queue was last modified

List queues

Retrieve all queues in your account.
string
required
Your Cloudflare account ID

Get a queue

Retrieve details about a specific queue.
string
required
The queue ID
string
required
Your Cloudflare account ID

Update a queue

Update queue configuration.
string
required
The queue ID to update
string
required
Your Cloudflare account ID
string
The new queue name
object
Queue settings object
number
Number of seconds to delay delivery of all messages (0-43200)
number
Number of seconds to retain unconsumed messages (60-1209600, default: 345600)
boolean
Whether message delivery to consumers is paused

Delete a queue

Delete a queue.
string
required
The queue ID to delete
string
required
Your Cloudflare account ID

Messages

Send and receive messages from queues.

Send a message

Send a single message to a queue.
string
required
The queue ID or name
string
required
Your Cloudflare account ID
string
required
The message body (up to 128 KB)
string
Content type (default: ‘text/plain’)

Send multiple messages

Send multiple messages in a single request.
string
required
The queue ID or name
string
required
Your Cloudflare account ID
array
required
Array of message objects (up to 100 messages)

Pull messages

Pull messages from a queue (HTTP pull).
string
required
The queue ID or name
string
required
Your Cloudflare account ID
number
Number of messages to pull (1-100, default: 10)
number
Time in milliseconds to hide messages from other consumers (default: 30000)

Acknowledge messages

Acknowledge messages after processing.
string
required
The queue ID or name
string
required
Your Cloudflare account ID
array
required
Array of acknowledgment objects with lease IDs

Consumers

Manage queue consumers (Workers that process messages).

Create a consumer

Create a Worker consumer for a queue.
string
required
The queue ID or name
string
required
Your Cloudflare account ID
string
required
Name of the Worker script to process messages
object
Consumer settings
number
Number of messages per batch (1-100, default: 10)
number
Maximum retry attempts (0-100, default: 3)
number
Maximum time to wait for messages in milliseconds (default: 5000)

List consumers

Retrieve all consumers for a queue.

Delete a consumer

Purge

Delete all messages from a queue.

Start purge

Check purge status