---
title: "Stop Background Task"
method: POST
path: "/background-tasks/stop"
---

# Stop Background Task

`POST /background-tasks/stop`

Stop a running background task.

Looks up the task type from the database and sends the appropriate
abort signal to the Temporal workflow.

## Request body

- StopBackgroundTaskRequest — Request to stop a running background task.
  - `task_id` string, required — Primary key of the background task to stop

## Response `200`

Successful Response

- StopBackgroundTaskResponse — Response from stopping a background task.
  - `workflow_id` string, required — Temporal workflow ID that was targeted
  - `task_type` string, required — Type of background task
  - `aborted` boolean, required — Whether the abort signal was sent successfully
  - `error` string, nullable — Error message if something went wrong

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/traversal/apis/fastapi.md) · [All operations](https://skmtc.net/traversal/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/traversal/fastapi/revisions/2134ebffd1ef/schema)
