---
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-14** `7f5edfb12f87` — 1 breaking
  - the `namespace` request property's minLength was increased from `0` to `1`
- **2026-04-14** `14bcce06404b` — 1 breaking, 1 warning
  - added the pattern `^[a-zA-Z0-9\-/_.=+]+$` to the request property `namespace`
  - the `namespace` request property's maxLength was set to `256`
- **2026-04-13** `e6c44b12ecfb` — 2 breaking
  - the `msgs/items/scheduled_at` response's property type changed from `string` to `integer`, and format from `date-time` to `uint64` for status `200`
  - the `msgs/items/timestamp` response's property type changed from `string` to `integer`, and format from `date-time` to `uint64` for status `200`
- **2026-04-10** `4bfee3499c4c` — 2 info
  - the response property `msgs/items/headers` became required for the status `200`
  - the `headers` response's property default value `{}` was removed for the status `200`
- **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`

[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/a13efaccef64/schema)
