# Bulk Retry DLQ messages

> Retry delivery of multiple messages from the DLQ

## Endpoint

`POST https://qstash-{region}.upstash.io/v2/dlq/retry`

## Parameters

- `dlqIds` (query, string[]): List of DLQ IDs to retry. If provided, other filters are ignored.
- `messageId` (query, string): Filter DLQ messages by message ID
- `url` (query, string[]): Filter DLQ messages by destination URL. Supports multiple values.
- `topicName` (query, string[]): Filter DLQ messages by URL Group name. Supports multiple values.
- `scheduleId` (query, string[]): Filter DLQ messages by schedule ID. Supports multiple values.
- `queueName` (query, string[]): Filter DLQ messages by queue name. Supports multiple values.
- `fromDate` (query, integer): Filter DLQ messages by starting date, in milliseconds (Unix timestamp). This is inclusive.
- `toDate` (query, integer): Filter DLQ messages by ending date, in milliseconds (Unix timestamp). This is inclusive.
- `responseStatus` (query, integer[]): Filter DLQ messages by HTTP response status code of the last delivery attempt. Supports multiple values.
- `callerIp` (query, string[]): Filter DLQ messages by IP address of the publisher. Supports multiple values.
- `label` (query, string[]): Filter DLQ messages by label. Supports multiple values. You can pass multiple values to match messages with any of the given labels (OR logic).

Examples:
- `label=my_label`
- `label=label_1&label=label_2`
- `label=label_1,label_2`

- `flowControlKey` (query, string[]): Filter DLQ messages by Flow Control Key. Supports multiple values.

## Responses

### 201 - Messages retry initiated successfully

- `cursor` (string): 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` (object[])
  - `messageId` (string): Unique identifier for the published message or the old message ID if deduplicated
  - `deduplicated` (boolean): Whether this message is a duplicate and was not sent to the destination.

### 404 - Some messages were not found in the DLQ

- `error` (string, required): Error message

## cURL

```bash
curl --request POST \
  --url https://qstash-{region}.upstash.io/v2/dlq/retry \
  --header 'Authorization: Bearer <token>'
```
