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

# Stop Background Task

`POST /background-tasks/stop`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/background-tasks/stop`
- Auth: none declared

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.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
