---
title: "Upsert a Queue"
method: POST
path: "/v2/queues"
tags: ["Queues"]
---

# Upsert a Queue

`POST /v2/queues`

## Request

- Base URL: `https://qstash-eu-central-1.upstash.io`
- URL: `https://qstash-eu-central-1.upstash.io/v2/queues`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `qstash_token`
- TypeScript: <https://skmtc.dev/upstash/apis/qstash-rest-api/docs/v2/queues/post.ts> (a function with typed inputs; its response is checked against the schema)

Updates or creates a queue

## Request body

- object
  - `queueName` string, required: The name of the queue
  - `parallelism` integer, required: The number of parallel consumers consuming from the queue. Must be greater than 0.

## Response `200`

Queue created or updated successfully

## Other responses

- `400`: Queue name is invalid. Queue names can only contain alphanumeric characters, hyphens, periods, and underscores.
- `412`: Either exceeded the maximum number of queues allowed or the maximum parallelism per queue.

## Changes

- **2026-06-09** `d859c277ced2`: 1 warning
  - the `parallelism` request property's min was set to `1.00`

[Operation history](https://skmtc.dev/upstash/apis/qstash-rest-api/changes/v2/queues/post.md)

---

[API](https://skmtc.dev/upstash/apis/qstash-rest-api.md) - [All operations](https://skmtc.dev/upstash/apis/qstash-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upstash/apis/qstash-rest-api/revisions/0c3b83ef4770?raw)
