---
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

---

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