---
title: "Cancel a job"
method: POST
path: "/api/jobs/{job_id}/cancel"
tags: ["workflow"]
---

# Cancel a job

`POST /api/jobs/{job_id}/cancel`

Cancel a specific job for the authenticated user.

Idempotent: a job that is already in a terminal state (completed, failed,
cancelled) or already cancelling is treated as a successful no-op and
returns 200. Only truly missing or cross-user jobs return 404.

## Path parameters

- `job_id` string, uuid, required

## Response `200`

Success - Cancel request accepted (or job was already terminal)

- JobCancelResponse — Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops.
  - `cancelled` boolean, required — True when a cancel event was successfully dispatched by this call. False when the job was already in a terminal or cancelling state, in which case the call is a no-op (still 200 — idempotent).

## Other responses

- `400` — Bad Request - job_id is not a valid UUID (emitted by request validation before the handler runs)
- `401` — Unauthorized - Authentication required
- `404` — Job not found for this user
- `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)
