---
title: "Enqueue a Message"
method: POST
path: "/v2/enqueue/{queueName}/{destination}"
tags: ["Messages"]
---

# Enqueue a Message

`POST /v2/enqueue/{queueName}/{destination}`

## Request

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

Enqueue a message to the specified queue

## Path parameters

- `queueName` string, required
- `destination` string, required
- `queueName` string, required

## Headers

- `Content-Type` string
- `Upstash-Forward-*` string
- `Upstash-Method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
- `Upstash-Timeout` string
- `Upstash-Retries` integer
- `Upstash-Retry-Delay` string
- `Upstash-Label` string
- `Upstash-Deduplication-Id` string
- `Upstash-Content-Based-Deduplication` 'true' | 'false'
- `Upstash-Callback` string
- `Upstash-Callback-Forward-*` string
- `Upstash-Callback-*` string
- `Upstash-Failure-Callback` string
- `Upstash-Failure-Callback-Forward-*` string
- `Upstash-Failure-Callback-*` string
- `Upstash-Redact-Fields` string

## Request body

- object

## Response `200`

Message(s) enqueued successfully

- union
  - PublishResponse
    - `messageId` string: Unique identifier for the published message or the old message ID if deduplicated
    - `deduplicated` boolean: Whether this message is a duplicate and was not sent to the destination.
  - object: Enqueued to URL Group and created multiple messages for each endpoint the URL Group
    - `messages` PublishToUrlGroupResponse[]
      - `messageId` string: Unique identifier for the published message or the old message ID if deduplicated
      - `deduplicated` boolean: Whether this message is a duplicate and was not sent to the destination.
      - `url` string: Destination URL of the URL Group endpoint.

## Other responses

- `400`: Bad request
- `404`: Queue not found

## Changes

- **2026-10-06** `0c3b83ef4770`: 1 breaking, 1 warning
  - added the new path request parameter `queueName`
  - deleted the `path` request parameter `queueName`
- **2026-09-22** `a41c323ee502`: 1 breaking, 1 warning
  - added the new path request parameter `queueName`
  - deleted the `path` request parameter `queueName`
- **2026-09-16** `ed23e37f87f3`: 1 breaking, 1 warning
  - added the new path request parameter `queueName`
  - deleted the `path` request parameter `queueName`
- **2026-07-20** `33a274e74797`: 1 breaking, 1 warning
  - added the new path request parameter `queueName`
  - deleted the `path` request parameter `queueName`
- **2026-06-25** `9bff0f72df49`: 1 breaking, 1 warning
  - added the new path request parameter `queueName`
  - deleted the `path` request parameter `queueName`

[Operation history](https://skmtc.dev/upstash/apis/qstash-rest-api/changes/v2/enqueue/:queueName/:destination/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)
