---
title: "Manage queue operations"
method: POST
path: "/api/queue"
tags: ["queue"]
deprecated: true
---

# Manage queue operations

`POST /api/queue`

> **Deprecated.**

Deprecated. Prefer the jobs-namespace cancel endpoints:
POST /api/jobs/cancel for cancelling jobs by ID, and
POST /api/jobs/{job_id}/cancel for a single job.

Cancel specific jobs by ID (the `delete` field) or clear all pending
jobs in the queue (the `clear` field). Despite the `delete` naming, this
does not delete anything — listed jobs transition to the cancelled state,
and `delete` cancels both pending and running jobs (not pending-only as
previously documented). Job-by-ID cancellation is superseded by
POST /api/jobs/cancel; `clear` has no jobs-namespace replacement yet.

## Request body

- QueueManageRequest — Request to manage queue operations
  - `clear` boolean — If true, clear all pending jobs from the queue
  - `delete` string[] — Array of job IDs to cancel; pending and running jobs transition to cancelled

## Response `200`

Success

- QueueManageResponse — Response after a queue management action (delete or clear).
  - `cleared` boolean — Whether the queue was cleared
  - `deleted` string[] — Array of job IDs that were successfully cancelled

## Other responses

- `400` — Invalid request parameters
- `401` — Unauthorized
- `500` — Internal server error

## Changes

- **2026-06-18** `82d930769975` — 1 info
  - endpoint deprecated
- **2026-06-03** `8560879e6188` — 3 info
  - added the optional property `details` to the response with the `400` status
  - added the optional property `details` to the response with the `401` status
  - added the optional property `details` to the response with the `500` status
- **2026-05-26** `64d5956d0104` — 1 info
  - added the media type `application/json` for the response with the status `200`
- **2026-05-22** `09a5075587c8` — 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - added the non-success response with the status `500`
- **2026-04-24** `a66055fa384e` — 1 breaking, 4 info
  - removed the media type `application/json` for the response with the status `200`
  - endpoint reactivated
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `401`
  - …1 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/queue/post.md)

---

[API](https://skmtc.dev/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.dev/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/da017caf56f1/schema)
