> ## 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.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/workflow/api-reference/dlq/delete/delete-bulk-action&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.

# Async Bulk

> Delete all matching failed Workflow runs in a bulk action.

`POST /v2/workflows/dlq/bulkDelete`

The request returns after creating the action. Use its `actionId` with [Get a Bulk Action](/workflow/api-reference/bulk-actions/get-a-bulk-action) to check progress.

Identical filters submitted while an action is already in-progress return the existing action.

## OpenAPI

````yaml workflow/openapi.yaml post /v2/workflows/dlq/bulkDelete
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/dlq/bulkDelete:
    post:
      tags:
        - DLQ
      summary: Delete Async Bulk
      description: Create a bulk action that deletes every failed workflow run
        matching the query filters.
      x-mint:
        href: /workflow/api-reference/dlq/delete/delete-bulk-action
        metadata:
          title: Async Bulk
          sidebarTitle: Async Bulk
          description: Delete all matching failed Workflow runs in a bulk action.
        content: >
          The request returns after creating the action. Use its `actionId` with
          [Get a Bulk
          Action](/workflow/api-reference/bulk-actions/get-a-bulk-action) to
          check progress.


          Identical filters submitted while an action is already in-progress
          return the existing action.
      parameters:
        - $ref: "#/components/parameters/DLQFromDateFilter"
        - $ref: "#/components/parameters/DLQToDateFilter"
        - $ref: "#/components/parameters/DLQWorkflowUrlFilter"
        - $ref: "#/components/parameters/DLQWorkflowRunIdFilter"
        - $ref: "#/components/parameters/DLQWorkflowCreatedAtFilter"
        - $ref: "#/components/parameters/DLQLabelFilter"
        - $ref: "#/components/parameters/DLQFailureFunctionStateFilter"
        - $ref: "#/components/parameters/DLQCallerIpFilter"
        - $ref: "#/components/parameters/DLQFlowControlKeyFilter"
      responses:
        "200":
          description: The background action was created or an identical in-progress
            action was returned.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DLQBulkActionCreated"
        "412":
          description: Too many bulk actions are already in progress.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
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
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
    DLQBulkActionCreated:
      type: object
      required:
        - actionId
        - total
      example:
        actionId: action_...
        total: 42
      properties:
        actionId:
          type: string
          description: ID used to check the background action's progress.
        total:
          type: integer
          format: int64
          description: Number of failed workflow runs matching the filters when the action
            was created.
  parameters:
    DLQFromDateFilter:
      name: fromDate
      in: query
      schema:
        type: integer
        format: int64
      description: Inclusive start of the DLQ date range, in Unix milliseconds.
    DLQToDateFilter:
      name: toDate
      in: query
      schema:
        type: integer
        format: int64
      description: Inclusive end of the DLQ date range, in Unix milliseconds.
    DLQWorkflowUrlFilter:
      name: workflowUrl
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by workflow URL. Supports multiple values.
    DLQWorkflowRunIdFilter:
      name: workflowRunId
      in: query
      schema:
        type: string
      description: Filter by workflow run ID.
    DLQWorkflowCreatedAtFilter:
      name: workflowCreatedAt
      in: query
      schema:
        type: integer
        format: int64
      description: Filter by workflow creation time, in Unix milliseconds.
    DLQLabelFilter:
      name: label
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by workflow label. Supports multiple values.
    DLQFailureFunctionStateFilter:
      name: failureFunctionState
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by failure function state. Supports multiple values.
    DLQCallerIpFilter:
      name: callerIp
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by publisher IP address. Supports multiple values.
    DLQFlowControlKeyFilter:
      name: flowControlKey
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by flow control key. Supports multiple values.
````
