---
title: "Queue Receive"
method: POST
path: "/api/v1.msgs.queue.receive"
tags: ["Msgs"]
---

# Queue Receive

`POST /api/v1.msgs.queue.receive`

Receives messages from a topic as competing consumers.

Messages are individually leased for the specified duration. Multiple consumers can receive
different messages from the same topic concurrently. Leased messages are skipped until they
are acked or their lease expires.

## Request body

- MsgQueueReceiveIn
  - `namespace` string, nullable
  - `topic` string, required
  - `consumer_group` string, required
  - `batch_size` integer
  - `lease_duration_ms` integer
  - `batch_wait_ms` integer, nullable — Maximum time (in milliseconds) to wait for messages before returning.

## Response `200`

- MsgQueueReceiveOut
  - `msgs` QueueMsgOut[], required
    - `msg_id` string, required
    - `value` integer[], required
    - `headers` object, required
    - `timestamp` integer, required
    - `scheduled_at` integer, nullable

## Other responses

- `400`
- `401`
- `403`
- `422`

## Changes

- **2026-04-28** `a542ced3f593` — 12 warning, 12 info
  - added the new `invalid-input` enum value to the `type` response property for the response status `400`
  - added the new `invalid-input` enum value to the `type` response property for the response status `401`
  - added the new `invalid-input` enum value to the `type` response property for the response status `403`
  - added the new `invalid-input` enum value to the `type` response property for the response status `422`
  - …20 more
- **2026-04-28** `b1d873e9a6e4` — 4 info
  - added the required property `type` to the response with the `400` status
  - added the required property `type` to the response with the `401` status
  - added the required property `type` to the response with the `403` status
  - added the required property `type` to the response with the `422` status
- **2026-04-21** `c30222181768` — 1 breaking, 5 info
  - the `detail` response's property type/format changed from `array`/`` to `string`/`` for status `422`
  - added the optional property `location` to the response with the `400` status
  - added the optional property `location` to the response with the `401` status
  - added the optional property `location` to the response with the `403` status
  - …2 more
- **2026-04-14** `7f5edfb12f87` — 1 breaking
  - the `namespace` request property's minLength was increased from `0` to `1`
- …earlier changes not shown

[Full history](https://skmtc.dev/svix/apis/diom-api/changes/api/v1.msgs.queue.receive/post.md)

---

[API](https://skmtc.dev/svix/apis/diom-api.md) · [All operations](https://skmtc.dev/svix/apis/diom-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/svix/diom-api/revisions/58636beb376c/schema)
