---
title: "Creates a queue"
method: POST
path: "/apps/{app_id}/queues"
tags: ["queues"]
---

# Creates a queue

`POST /apps/{app_id}/queues`

Creates a queue for the application specified by application ID. The properties for the queue to be created are specified in the request body.

## Path parameters

- `app_id` string, required

## Request body

- Queue
  - `maxLength` integer, required — Message limit in number of messages.
  - `name` string, required — A friendly name for your queue.
  - `region` string, required — The data center region. US East (Virginia) or EU West (Ireland). Values are `us-east-1-a` or `eu-west-1-a`.
  - `ttl` integer, required — TTL in minutes.

## Response `201`

Queue created

- QueueResponse
  - `amqp` object
    - `queueName` string — Name of the Ably queue.
    - `uri` string — URI for the AMQP queue interface.
  - `appId` string — The Ably application ID.
  - `deadletter` boolean — A boolean that indicates whether this is a dead letter queue or not.
  - `deadletterId` string, nullable
  - `id` string — The ID of the Ably queue
  - `maxLength` integer — Message limit in number of messages.
  - `messages` object — Details of messages in the queue.
    - `ready` integer, nullable — The number of ready messages in the queue.
    - `total` integer, nullable — The total number of messages in the queue.
    - `unacknowledged` integer, nullable — The number of unacknowledged messages in the queue.
  - `name` string — The friendly name of the queue.
  - `region` string — The data center region for the queue.
  - `state` string — The current state of the queue.
  - `stats` object
    - `acknowledgementRate` number, nullable — The rate at which messages are acknowledged. Rate is messages per minute.
    - `deliveryRate` number, nullable — The rate at which messages are delivered from the queue. Rate is messages per minute.
    - `publishRate` number, nullable — The rate at which messages are published to the queue. Rate is messages per minute.
  - `stomp` object
    - `destination` string — Destination queue.
    - `host` string — The host type for the queue.
    - `uri` string — URI for the STOMP queue interface.
  - `ttl` integer — TTL in minutes.

## Other responses

- `400` — Bad request
- `401` — Authentication failed
- `404` — App not found
- `422` — Invalid request
- `500` — Internal server error

---

[API](https://skmtc.net/ably/apis/control.md) · [All operations](https://skmtc.net/ably/apis/control/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ably/control/revisions/85e2f4b0deb6/schema)
