---
title: "Clear a queue"
method: POST
path: "/v1/queue.clear"
tags: ["Querator V1"]
---

# Clear a queue

`POST /v1/queue.clear`

Clears all data from a queue, optionally clears all retry and scheduled items

## Request body

- QueueClearRequest
  - `queue_name` string, required — The name of the queue to clear
  - `retry` boolean, required — Indicates the 'retry' queue will be cleared. If true, any items scheduled to be retried at a future date will be removed.
  - `scheduled` boolean, required — Indicates any 'scheduled' items in the queue will be cleared. If true, any items scheduled to be enqueued at a future date will be removed.
  - `queue` boolean, required — Indicates any items currently waiting in the FIFO queue will clear. If true, any items in the queue which have NOT been leased will be removed.
  - `destructive` boolean, required — Indicates the Retry, Scheduled, Queue operations should be destructive in that all data regardless of status will be removed. For example, if used with ClearRequest.Queue = true, then ALL items in the queue regardless of lease status will be removed. This means that clients who currently have ownership of those items will not be able to "complete" those items, as querator will have no knowledge of those items.

## Response `200`

- Reply
  - `code` integer, required — Response status code
  - `code_text` string — Human readable status message
  - `message` string — Additional details about the response

## Changes

- **2025-06-05** `db1e2b747f3c` — 3 breaking
  - the response property `code_text` became optional for the status `200`
  - the response property `message` became optional for the status `200`
  - removed the required property `details` from the response with the `200` status
- **2025-04-21** `3de0078c9268` — 1 breaking, 1 warning
  - added the new required request property `retry`
  - removed the request property `defer`
- **2024-09-16** `22a36c374092` — 1 breaking
  - the `destructive` request property type/format changed from `string`/`` to `boolean`/``
- **2024-09-15** `ba3240950bb2` — 2 breaking, 1 warning, 4 info
  - added the new required request property `defer`
  - the `destructive` request property type/format changed from `boolean`/`` to `string`/``
  - removed the request property `retry`
  - request body became optional
  - …3 more

[Change history](https://skmtc.dev/kapetan-io/apis/querator-api/changes/v1/queue.clear/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/00a535961201/schema)
