---
title: "Cancel multiple jobs"
method: POST
path: "/api/jobs/cancel"
tags: ["workflow"]
---

# Cancel multiple jobs

`POST /api/jobs/cancel`

Cancel one or more jobs for the authenticated user in a single request.

State-agnostic: cancels both pending and running jobs (both transition to
the cancelled state via the same mechanism as the single-job endpoint).

Idempotent per job: a job already in a terminal or cancelling state is a
no-op and simply will not appear in the returned `cancelled` list.

Fail-fast on unknown IDs: if any provided job ID does not exist for this
user, the request returns 404 and no jobs are cancelled. This surfaces
bad IDs to the caller rather than silently dropping them.

This is the canonical batch-cancel endpoint. The delete operation on
POST /api/queue is deprecated in favour of this.

## Request body

- JobsCancelRequest — Request to cancel multiple jobs by ID.
  - `job_ids` string[], required — Job identifiers (UUIDs) to cancel.

## Response `200`

Success - cancel requests dispatched (or jobs were already terminal)

- JobsCancelResponse — Response for POST /api/jobs/cancel.
  - `cancelled` string[], required — Job IDs for which a cancel event was successfully dispatched by this call. Jobs already in a terminal or cancelling state are idempotently skipped and will not appear here.

## Other responses

- `400` — Bad Request - job_ids is missing, empty, exceeds the maximum count, or contains an invalid UUID
- `401` — Unauthorized - Authentication required
- `404` — One or more job IDs not found for this user (no jobs cancelled)
- `500` — Internal server error - cancellation failed

---

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