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

# Bulk Cancel Workflow Runs

> Cancel all matching workflow runs.



## OpenAPI

````yaml /workflow/openapi.yaml delete /v2/workflows/runs
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:
    delete:
      tags:
        - Runs
      summary: Bulk Cancel Workflow Runs
      description: Cancel all matching workflow runs.
      parameters:
        - in: query
          name: workflowRunIds
          required: false
          schema:
            type: array
            items:
              type: string
          description: >-
            Optional list of specific workflow run IDs to cancel. If provided,
            the other filters are ignored.
        - in: query
          name: workflowUrl
          required: true
          schema:
            type: array
            items:
              type: string
          description: >-
            The URL of the workflow whose runs to cancel. Supports multiple
            values.
        - in: query
          name: workflowUrlExactMatch
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            workflow url is searched as a prefix by default. To make it exact
            match, `workflowUrlExactMatch` can be set to true.
        - in: query
          name: fromDate
          required: false
          schema:
            type: number
            format: date-time
          description: >-
            Optional start date to filter workflow runs to cancel. Unix
            timestamp in milliseconds.
        - in: query
          name: toDate
          required: false
          schema:
            type: number
            format: date-time
          description: >-
            Optional end date to filter workflow runs to cancel. Unix timestamp
            in milliseconds.
        - in: query
          name: callerIp
          required: false
          schema:
            type: array
            items:
              type: string
          description: >-
            Optional caller IP address to filter workflow runs to cancel.
            Supports multiple values.
        - in: query
          name: flowControlKey
          required: false
          schema:
            type: array
            items:
              type: string
          description: >-
            Optional flow control key to filter workflow runs to cancel.
            Supports multiple values.
        - in: query
          name: label
          required: false
          schema:
            type: array
            items:
              type: string
          description: >
            Optional label to filter workflow runs to cancel. Supports multiple
            values. You can pass multiple values to match workflow runs with any
            of the given labels (OR logic).


            Examples:

            - `label=my_label`

            - `label=label_1&label=label_2`

            - `label=label_1,label_2`
        - in: query
          name: count
          required: false
          schema:
            type: integer
            default: 100
          description: Maximum number of workflow runs to cancel. Default is 100.
      responses:
        '200':
          description: All workflow runs cancelled successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  cancelled:
                    type: integer
                    description: The number of workflow runs that were cancelled.
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

````