> ## 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/retry/retry-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

> Resume Failed Messages with Pagination

`POST /v2/dlq/retry`

<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.

When DLQ messages are retried, new messages with the same body and headers are created and scheduled for delivery.
The original DLQ messages are then removed from the DLQ.

## OpenAPI

````yaml qstash/openapi.yaml post /v2/dlq/retry
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/retry:
    post:
      summary: Retry Sync Bulk
      description: Retry one page of DLQ messages and use the returned cursor to continue
      tags:
        - DLQ
      x-mint:
        href: /qstash/api-reference/dlq/retry/retry-pagination-api
        metadata:
          title: Sync Bulk
          sidebarTitle: Sync Bulk
          description: Resume Failed 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.


          When DLQ messages are retried, new messages with the same body and
          headers are created and scheduled for delivery.

          The original DLQ messages are then removed from the DLQ.
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: Cursor returned by the previous page. Omit for the first page.
        - name: count
          in: query
          schema:
            type: integer
            default: 100
            maximum: 100
          description: Maximum number of messages to retry in this request.
        - 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.
        - $ref: "#/components/parameters/DLQOverrideMethod"
        - $ref: "#/components/parameters/DLQOverrideTimeout"
        - $ref: "#/components/parameters/DLQOverrideRetries"
        - $ref: "#/components/parameters/DLQOverrideRetryDelay"
        - $ref: "#/components/parameters/DLQOverrideDelay"
        - $ref: "#/components/parameters/DLQOverrideNotBefore"
        - $ref: "#/components/parameters/DLQOverrideLabel"
        - $ref: "#/components/parameters/DLQOverrideFlowControlKey"
        - $ref: "#/components/parameters/DLQOverrideFlowControlValue"
        - $ref: "#/components/parameters/DLQOverrideCallback"
        - $ref: "#/components/parameters/DLQOverrideFailureCallback"
      responses:
        "200":
          description: Messages retried 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.
                  responses:
                    type: array
                    items:
                      $ref: "#/components/schemas/PublishResponse"
        "404":
          description: Some messages were not found in the DLQ
          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
    PublishResponse:
      type: object
      properties:
        messageId:
          type: string
          description: Unique identifier for the published message or the old message ID
            if deduplicated
        deduplicated:
          type: boolean
          description: Whether this message is a duplicate and was not sent to the
            destination.
  parameters:
    DLQOverrideMethod:
      name: Upstash-Method
      in: header
      schema:
        type: string
        enum:
          - GET
          - POST
          - PUT
          - PATCH
          - DELETE
      description: Override the HTTP method used to deliver each retried message.
    DLQOverrideTimeout:
      name: Upstash-Timeout
      in: header
      schema:
        type: string
      description: Override the delivery timeout for each retried message, such as
        `30s` or `2m`.
    DLQOverrideRetries:
      name: Upstash-Retries
      in: header
      schema:
        type: integer
      description: Override the number of delivery retries for each retried message.
        Use `0` to disable retries.
    DLQOverrideRetryDelay:
      name: Upstash-Retry-Delay
      in: header
      schema:
        type: string
      description: Override the retry delay expression for each retried message.
    DLQOverrideDelay:
      name: Upstash-Delay
      in: header
      schema:
        type: string
      description: Delay each retried message's delivery. Format is `<value><unit>`,
        such as `10s` or `5m`.
    DLQOverrideNotBefore:
      name: Upstash-Not-Before
      in: header
      schema:
        type: integer
      description: Delay delivery until this Unix timestamp in seconds. Takes
        precedence over `Upstash-Delay`.
    DLQOverrideLabel:
      name: Upstash-Label
      in: header
      schema:
        type: string
      description: Override the labels on each retried message. Use a comma-separated
        list for multiple labels.
    DLQOverrideFlowControlKey:
      name: Upstash-Flow-Control-Key
      in: header
      schema:
        type: string
      description: Override the flow control key for each retried message. Set
        `Upstash-Flow-Control-Value` to define its limits.
    DLQOverrideFlowControlValue:
      name: Upstash-Flow-Control-Value
      in: header
      schema:
        type: string
      description: Override the flow control limits in the format
        `parallelism=<value>, rate=<value>, period=<value>`.
    DLQOverrideCallback:
      name: Upstash-Callback
      in: header
      schema:
        type: string
      description: Override the success or failure callback URL for each retried message.
    DLQOverrideFailureCallback:
      name: Upstash-Failure-Callback
      in: header
      schema:
        type: string
      description: Override the failure callback URL for each retried message.
````
