---
title: "Cancel Ongoing Task"
method: DELETE
path: "/{task}/cancel/{task_id}"
---

# Cancel Ongoing Task

`DELETE /{task}/cancel/{task_id}`

Cancel a running asynchronous task.

Args:
    task: The type of task (segment, bulkmatch, discogen)
    task_id: The UUID of the task to cancel
    request: FastAPI request object
    auth_info: Authentication information

Returns:
    JSON response: Cancellation status and message

## Path parameters

- `task` string, required — Task family: discogen, bulkmatch, contactmatch, or segment.
- `task_id` string, required

## Response `200`

Successful Response

- TaskCancelResponse — Response for task cancellation operations.
  - `success` boolean, required — Whether the cancellation request was successful
  - `message` string, required — Human-readable status message
  - `task_id` string, required — The task ID that was cancelled
  - `status` string, required — Current task status after cancellation attempt

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/discolike/apis/discolike-api.md) · [All operations](https://skmtc.net/discolike/apis/discolike-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/discolike/discolike-api/versions/3248fc62024c/schema)
