---
title: "Stop Workflow Task"
method: POST
path: "/workflows/tasks/{task_id}/stop"
tags: ["Workflow Runs"]
---

# Stop Workflow Task

`POST /workflows/tasks/{task_id}/stop`

**Available for**: Workflow apps.

Stop a running workflow task. Only supported in `streaming` mode.

## Path parameters

- `task_id` string, required

## Request body

- object
  - `user` string, required — End-user identifier, defined by your app and unique within it. Need not match the `user` that started the run; the stop applies to the task regardless of `user`. See [End User Identity](/en/api-reference/guides/end-user-identity).

## Response `200`

Operation successful.

- object
  - `result` string — Operation result. Always `success`.

## Other responses

- `400` — - `not_workflow_app` : App mode does not match the API route. - `invalid_param` : A request parameter is missing or invalid, such as a missing `user`.

---

[API](https://skmtc.net/langgenius/apis/dify-service-api.md) · [All operations](https://skmtc.net/langgenius/apis/dify-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langgenius/dify-service-api/revisions/e49b3db72bad/schema)
