> ## 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-pagination-api&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.

# Sync Bulk

> Delete DLQ Messages with Pagination

`DELETE /v2/dlq`

<Warning>
  The synchronous pagination API is deprecated. It’s recommended to use Async Bulk endpoint to process all matching entries in a bulk action.
</Warning>

This paginated request processes at most `count` matching messages and returns a `cursor` for the next page.

## OpenAPI

````yaml qstash/openapi.yaml delete /v2/dlq
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:
    delete:
      summary: Delete Sync Bulk
      description: Delete one page of messages from the DLQ and use the returned
        cursor to continue
      tags:
        - DLQ
      x-mint:
        href: /qstash/api-reference/dlq/delete/delete-pagination-api
        metadata:
          title: Sync Bulk
          sidebarTitle: Sync Bulk
          description: Delete DLQ Messages with Pagination
        content: >
          <Warning>
            The synchronous pagination API is deprecated. It’s recommended to use Async Bulk endpoint to process all matching entries in a bulk action.
          </Warning>


          This paginated request processes at most `count` matching messages and
          returns a `cursor` for the next page.
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: By providing a cursor you can paginate through all of the messages
            in the DLQ
        - name: messageId
          in: query
          schema:
            type: string
          description: Filter DLQ messages by message ID
        - name: url
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter DLQ messages by destination URL. Supports multiple values.
        - name: topicName
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter DLQ messages by URL Group name. Supports multiple values.
        - name: scheduleId
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter DLQ messages by schedule ID. Supports multiple values.
        - name: queueName
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter DLQ messages by queue name. Supports multiple values.
        - name: fromDate
          in: query
          schema:
            type: integer
            format: int64
          description: Filter DLQ messages by starting date, in milliseconds (Unix
            timestamp). This is inclusive.
        - name: toDate
          in: query
          schema:
            type: integer
            format: int64
          description: Filter DLQ messages by ending date, in milliseconds (Unix
            timestamp). This is inclusive.
        - name: responseStatus
          in: query
          schema:
            type: array
            items:
              type: integer
          description: Filter DLQ messages by HTTP response status code of the last
            delivery attempt. Supports multiple values.
        - name: callerIp
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter DLQ messages by IP address of the publisher. Supports
            multiple values.
        - name: label
          in: query
          schema:
            type: array
            items:
              type: string
          description: |
            Filter DLQ messages by label. Supports multiple values.
        - name: flowControlKey
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter DLQ messages by Flow Control Key. Supports multiple values.
        - name: count
          in: query
          schema:
            type: integer
            default: 100
            maximum: 100
          description: The number of messages to delete.
      responses:
        "200":
          description: DLQ messages deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  cursor:
                    type: string
                    description: >
                      A cursor which you can use in subsequent requests to
                      paginate through all messages. 

                      If no cursor is returned, you have reached the end of the
                      messages.
                  deleted:
                    type: integer
                    description: The number of messages that were deleted.
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
````
