---
title: "Cancel a task"
method: POST
path: "/dispatch/tasks/{task_id}/cancel"
tags: ["Dispatch"]
---

# Cancel a task

`POST /dispatch/tasks/{task_id}/cancel`

Cancel an in-flight build or revision task. Only tasks in a non-terminal state (queued, running, needs_input) can be cancelled.

## Path parameters

- `task_id` string, required

## Response `200`

Cancellation result

- object
  - `task_id` string
  - `previous_status` string
  - `cancelled` boolean

## Other responses

- `404` — Task not found
- `409` — Task is already in a terminal state

---

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