# 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
````
