Create Queue·续

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings%20%3E%20(property)%20visibility_timeout_ms">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings">Link to this property</a>

type: optional "http_pull"

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20consumers">Link to this property</a>

consumers_total_count: optional number

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20consumers_total_count">Link to this property</a>

created_on: optional string

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

<details>

<summary>

jurisdiction: optional "eu"or "us"or "fedramp"

</summary>

One of the following:

"eu"

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%200">Link to this property</a>

"us"

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%201">Link to this property</a>

"fedramp"

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20jurisdiction%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20jurisdiction">Link to this property</a>

modified_on: optional string

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

<details>

<summary>

producers: optional array of object {script, type } or object {bucket_name, type }

</summary>

One of the following:

<details>

<summary>

MqWorkerProducer object {script, type }

</summary>

script: optional string

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20script">Link to this property</a>

type: optional "worker"

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

MqR2Producer object {bucket_name, type }

</summary>

bucket_name: optional string

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20bucket_name">Link to this property</a>

type: optional "r2_bucket"

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers">Link to this property</a>

producers_total_count: optional number

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20producers_total_count">Link to this property</a>

queue_id: optional string

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20queue_id">Link to this property</a>

queue_name: optional string

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20queue_name">Link to this property</a>

<details>

<summary>

settings: optional object {delivery_delay, delivery_paused, message_retention_period }

</summary>

delivery_delay: optional number

Number of seconds to delay delivery of all messages to consumers.

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20settings%20%3E%20(property)%20delivery_delay">Link to this property</a>

delivery_paused: optional boolean

Indicates if message delivery to consumers is currently paused.

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20settings%20%3E%20(property)%20delivery_paused">Link to this property</a>

message_retention_period: optional number

Number of seconds after which an unconsumed message will be delayed.

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20settings%20%3E%20(property)%20message_retention_period">Link to this property</a>

</details>

<a href="#(resource)%20queues%20%3E%20(method)%20create%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20queues%20%3E%20(model)%20queue%20%3E%20(schema)%20%3E%20(property)%20settings">Link to this property</a>

</details>

Link to this property

success: optional true

Indicates if the API call was successful or not.

Link to this property

Create Queue

HTTP

HTTPTypeScriptPythonGoTerraform

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/queues \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "queue_name": "example-queue",
          "jurisdiction": "eu"
        }'

200 example

{
  "errors": [
    {
      "code": 7003,
      "message": "No route for the URI",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "consumers": [
      {
        "consumer_id": "023e105f4ecef8ad9ca31a8372d0c353",
        "created_on": "2019-12-27T18:11:19.117Z",
        "dead_letter_queue": "dead_letter_queue",
        "queue_name": "example-queue",
        "script_name": "my-consumer-worker",
        "settings": {
          "batch_size": 50,
          "max_concurrency": 10,
          "max_retries": 3,
          "max_wait_time_ms": 5000,
          "retry_delay": 10
        },
        "type": "worker"
      }
    ],
    "consumers_total_count": 0,
    "created_on": "created_on",
    "jurisdiction": "eu",
    "modified_on": "modified_on",
    "producers": [
      {
        "script": "script",
        "type": "worker"
      }
    ],
    "producers_total_count": 0,
    "queue_id": "queue_id",
    "queue_name": "example-queue",
    "settings": {
      "delivery_delay": 5,
      "delivery_paused": true,
      "message_retention_period": 345600
    }
  },
  "success": true
}
Returns Examples

200 example

{
  "errors": [
    {
      "code": 7003,
      "message": "No route for the URI",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "consumers": [
      {
        "consumer_id": "023e105f4ecef8ad9ca31a8372d0c353",
        "created_on": "2019-12-27T18:11:19.117Z",
        "dead_letter_queue": "dead_letter_queue",
        "queue_name": "example-queue",
        "script_name": "my-consumer-worker",
        "settings": {
          "batch_size": 50,
          "max_concurrency": 10,
          "max_retries": 3,
          "max_wait_time_ms": 5000,
          "retry_delay": 10
        },
        "type": "worker"
      }
    ],
    "consumers_total_count": 0,
    "created_on": "created_on",
    "jurisdiction": "eu",
    "modified_on": "modified_on",
    "producers": [
      {
        "script": "script",
        "type": "worker"
      }
    ],
    "producers_total_count": 0,
    "queue_id": "queue_id",
    "queue_name": "example-queue",
    "settings": {
      "delivery_delay": 5,
      "delivery_paused": true,
      "message_retention_period": 345600
    }
  },
  "success": true
}


description: Cloudflare R2 is a cost-effective, scalable object storage solution for cloud-native apps, web content, and data lakes without egress fees. title: Cloudflare R2 image: https://developers.cloudflare.com/r2/og.png?v=7479185c8cb07032


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/r2/llms.txt
Use this file to discover all available pages before exploring further.