> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-docs-landing-rework.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a Run

You can cancel a running workflow both programatically and from your Upstash Workflow console.

## Cancelling via console

In your Upstash Workflow console, find the run you'd like to cancel and press the `Cancel Workflow` button on the right side:

<Frame>
  <img src="https://mintcdn.com/upstash-docs-landing-rework/onxha2oH1ZYoruUe/img/qstash-workflow/cancel_workflow.png?fit=max&auto=format&n=onxha2oH1ZYoruUe&q=85&s=1355b15272f7c071aee2b7d8538d7820" width="2053" height="813" data-path="img/qstash-workflow/cancel_workflow.png" />
</Frame>

## Cancelling programatically

<Note>
  This feature is not yet available in
  [workflow-py](https://github.com/upstash/workflow-py). See our
  [Roadmap](/workflow/roadmap) for feature parity plans and
  [Changelog](/workflow/changelog) for updates.
</Note>

```javascript theme={null}
import { Client } from "@upstash/workflow";

const client = new Client({ token: "<QSTASH_TOKEN>" });
await client.cancel({ ids: "<WORKFLOW_RUN_ID>" });
```

And replace `<WORKFLOW_RUN_ID>` with your actual run ID. See [the documentation of `client.cancel` method for more information about other ways of canceling workflows](/workflow/basics/client/cancel).

You can also use the [Upstash Workflow REST API](/workflow/api-reference/runs/cancel-workflow-run) to cancel a run programatically.
