---
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 — User identifier, used to attribute the stop request to an end user. It does not need to match the `user` passed to [Run Workflow](/en/api-reference/workflow-runs/run-workflow); the stop applies to the task regardless of user.

## 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` : Required parameter missing or invalid.

---

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