> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/workflow/api-reference/runs/cancel-workflow-run&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Cancel Workflow Run

> Cancel an ongoing workflow run.

`DELETE /v2/workflows/runs/{workflowRunId}`

## OpenAPI

````yaml workflow/openapi.yaml delete /v2/workflows/runs/{workflowRunId}
openapi: 3.1.0
info:
  title: Upstash Workflow REST API
  description: >
    Upstash Workflow is a serverless workflow orchestration service built on top
    of Upstash QStash and Upstash Redis.
  version: 2.0.0
  contact:
    name: Upstash
    url: https://upstash.com
servers:
  - url: https://qstash-{region}.upstash.io
    description: Regional
    variables:
      region:
        default: eu-central-1
        enum:
          - us-east-1
          - eu-central-1
security:
  - bearerAuth: []
  - bearerAuthQuery: []
paths:
  /v2/workflows/runs/{workflowRunId}:
    delete:
      tags:
        - Runs
      summary: Cancel Workflow Run
      description: Cancel an ongoing workflow run.
      parameters:
        - in: path
          name: workflowRunId
          required: true
          schema:
            type: string
          description: The ID of the workflow run to cancel.
      responses:
        "200":
          description: Workflow run cancelled successfully
        "404":
          description: A workflow run is not found with the given id.
        "500":
          description: An unexpected error occured.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: QStash authentication token
    bearerAuthQuery:
      type: apiKey
      in: query
      name: qstash_token
      description: QStash authentication token passed as a query parameter
````
