---
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
    - `timestamp` string, date-time, required
    - `scheduled_at` string, date-time, nullable

## Other responses

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

## Changes

- **2026-03-31** `cb1523fc3cdd` — 2 warning
  - the `batch_wait_ms` request property's min was set to `0.00`
  - the `lease_duration_ms` request property's min was set to `0.00`
- **2026-03-31** `f62be26d2a53` — 9 breaking, 4 warning, 3 info
  - the response property `msgs/items/headers` became optional for the status `200`
  - the `detail` response's property type changed from `string` to `array` for status `422`
  - the `msgs/items/scheduled_at` response's property type changed from `integer` to `string`, and format from `uint64` to `date-time` for status `200`
  - the `msgs/items/timestamp` response's property type changed from `integer` to `string`, and format from `uint64` to `date-time` for status `200`
  - …12 more

[Change 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/9be964e9f7db/schema)
