---
title: "Produce an item on a queue"
method: POST
path: "/v1/queue.produce"
tags: ["Querator V1"]
---

# Produce an item on a queue

`POST /v1/queue.produce`

Produce an item on a queue. Calls to the endpoint may provide multiple items to produce. The call will not return until all items provided have been written to storage.
### Timeout Semantics
The call will return when the item(s) provided are written to storage or when `request_timeout` has been reached. If the call returns with a non 200 response code, the client should consider the items provided as not written to the queue. The client should NOT cancel the request before `request_timeout` has been reached. If the call fails to return after `request_timeout` is reached the client can safely cancel the request.

## Request body

- QueueProduceRequest
  - `queue_name` string, required — The name of the queue
  - `request_timeout` string, required — The duration this request should block before the client will cancel the request
  - `items` QueueProduceItem[], required — List of items to be queued
    - `encoding` string — A user specified field which indicates the encoding the user used to encode the payload
    - `kind` string — A user specified field that describes the kind or type the payload contains. Consumers can use this field to determine handling of the payload prior to unmarshalling
    - `reference` string — A user specified field that can be used by the consumer to determine handling of the item without needing to unmarshall the body
    - `bytes` string — The payload of the item as an array of raw bytes with no predetermined character set. Clients who communicate with Querator with `Content-Type: application/protobuf` should use this field instead of `utf8` When using `Content-Type: application/json` this field must be encoded as base64. If you are using `Content-Type: application/json` and your payload is using the utf8 character set, then you should use the `utf8` field instead.
    - `utf8` string — This is an a convenience field useful for clients that are communicating with Querator via`Content-Type: application/json`. This field assumes a utf8 encoded payload and does not require the payload to be encoded as base64. As such is is an excellent choice for clients who do not have access to a base64 encoder and can't use the `bytes` field for their payload. NOTE: Both `bytes` and `utf8` can be set, but `bytes` takes precedence. If `bytes` is set, then that will be used as the payload. If `utf8` is set and `bytes` is empty, then `utf8` will be used. If both `bytes` and `utf8` are set, then `bytes` will be used and `utf8` will be dropped.

## Response `200`

- QueueProduceResponse
  - `code` integer, required — The response code
  - `code_text` string — The text explanation of the code
  - `message` string — The message that contains details explaining the reason for the code

## Changes

- **2026-07-17** `b67c2fa641f7` — 1 breaking
  - request body became required
- **2024-09-15** `ba3240950bb2` — 1 info
  - request body became optional

[Change history](https://skmtc.dev/kapetan-io/apis/querator-api/changes/v1/queue.produce/post.md)

---

[API](https://skmtc.dev/kapetan-io/apis/querator-api.md) · [All operations](https://skmtc.dev/kapetan-io/apis/querator-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kapetan-io/querator-api/revisions/b67c2fa641f7/schema)
