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

## Changes

- **2026-07-26** `43a9c0d55a69` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/discolike/apis/discolike-api/changes/:task/cancel/:task_id/delete.md)

---

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