> ## 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/qstash/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 QStash DLQ messages in a bulk action.

`POST /v2/dlq/bulkDelete`

The request returns after creating the action. Use its `actionId` with [Get a Bulk Action](/qstash/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 qstash/openapi.yaml post /v2/dlq/bulkDelete
openapi: 3.1.0
info:
  title: QStash REST API
  description: |
    QStash is a message queue and scheduler built on top of 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: []
tags:
  - name: Messages
    description: Publish and manage messages
  - name: Queues
    description: Manage message queues
  - name: Schedules
    description: Create and manage scheduled messages
  - name: URL Groups
    description: Manage URL groups and endpoints
  - name: DLQ
    description: Dead Letter Queue operations
  - name: Logs
    description: Log operations
  - name: Signing Keys
    description: Manage signing keys
  - name: Flow Control
    description: Monitor flow control keys
  - name: Bulk Actions
    description: Track filter-based bulk operations
paths:
  /v2/dlq/bulkDelete:
    post:
      summary: Delete Async Bulk
      description: Create a bulk action that deletes every QStash DLQ message matching
        the query filters. Omit all filters to delete the entire DLQ.
      tags:
        - DLQ
      x-mint:
        href: /qstash/api-reference/dlq/delete/delete-bulk-action
        metadata:
          title: Async Bulk
          sidebarTitle: Async Bulk
          description: Delete all matching QStash DLQ messages in a bulk action.
        content: >
          The request returns after creating the action. Use its `actionId` with
          [Get a Bulk
          Action](/qstash/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/DLQMessageIdFilter"
        - $ref: "#/components/parameters/DLQUrlFilter"
        - $ref: "#/components/parameters/DLQTopicNameFilter"
        - $ref: "#/components/parameters/DLQScheduleIdFilter"
        - $ref: "#/components/parameters/DLQQueueNameFilter"
        - $ref: "#/components/parameters/DLQResponseStatusFilter"
        - $ref: "#/components/parameters/DLQFromDateFilter"
        - $ref: "#/components/parameters/DLQToDateFilter"
        - $ref: "#/components/parameters/DLQCallerIpFilter"
        - $ref: "#/components/parameters/DLQLabelFilter"
        - $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 DLQ messages matching the filters when the action was
            created.
  parameters:
    DLQMessageIdFilter:
      name: messageId
      in: query
      schema:
        type: string
      description: Filter by message ID.
    DLQUrlFilter:
      name: url
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by destination URL. Supports multiple values.
    DLQTopicNameFilter:
      name: topicName
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by URL Group name. Supports multiple values.
    DLQScheduleIdFilter:
      name: scheduleId
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by schedule ID. Supports multiple values.
    DLQQueueNameFilter:
      name: queueName
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by queue name. Supports multiple values.
    DLQResponseStatusFilter:
      name: responseStatus
      in: query
      schema:
        type: array
        items:
          type: integer
      description: Filter by the last delivery attempt's HTTP response status.
        Supports multiple values.
    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.
    DLQCallerIpFilter:
      name: callerIp
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by publisher IP address. Supports multiple values.
    DLQLabelFilter:
      name: label
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by message label. Supports multiple values.
    DLQFlowControlKeyFilter:
      name: flowControlKey
      in: query
      schema:
        type: array
        items:
          type: string
      description: Filter by flow control key. Supports multiple values.
````
