Upstash Documentation

Bulk Delete Failed Workflow Runs

Delete multiple failed workflow runs from the DLQ.

When a workflow run fails, it is moved to the DLQ. You can manually remove a failed workflow run from the DLQ using this endpoint. This is useful for cleaning up failed runs that you no longer wish to retry or analyze.

You can either specify specific DLQ IDs to delete, or use filters to delete matching workflows.
When using filters without DLQ IDs, the operation supports pagination via cursor.

1 min read
delete/v2/workflows/dlq
Request example
Response
delete/v2/workflows/dlq
Info

For multi-value filters, a workflow run matches if its value equals any of the given values (OR logic), and multiple filters are combined with AND logic.

Multiple values can be passed either by repeating the query parameter (label=label_1&label=label_2) or as a single comma-separated value (label=label_1,label_2).

Authorization

Authorizationstringheaderrequired#
QStash authentication token

1 alternative authorization method available — see the spec for details.

Query parameters

dlqIdsstring[]#
List of specific DLQ IDs to delete. If provided, other filters are ignored.
cursorstring#
Pagination cursor for deleting in batches.
countinteger#
Maximum number of workflows to delete per request.
fromDateinteger#
Filter by starting date in milliseconds (Unix timestamp). This is inclusive.
toDateinteger#
Filter by ending date in milliseconds (Unix timestamp). This is inclusive.
workflowUrlstring[]#
Filter by workflow URL. Supports multiple values.
workflowRunIdstring#
Filter by workflow run ID.
workflowCreatedAtinteger#
Filter by workflow creation timestamp in milliseconds (Unix timestamp).
labelstring[]#

Filter by label assigned to the workflow run. Supports multiple values. You can pass multiple values to match workflow runs with any of the given labels (OR logic).

Examples:

  • label=my_label
  • label=label_1&label=label_2
  • label=label_1,label_2
failureFunctionStatestring[]#

Filter by failure function state. Supports multiple values.

StateDescription
CALLBACK_INPROGRESSThe failure function is in progress.
CALLBACK_SUCCESSThe failure function run successfully.
CALLBACK_FAILThe failure function failed to run.
CALLBACK_CANCELEDThe failure function was manually canceled
callerIpstring[]#
Filter by IP address of the publisher. Supports multiple values.
flowControlKeystring[]#
Filter by Flow Control Key. Supports multiple values.

Responses

application/json
Workflows deleted successfully
deletedinteger#
The number of workflow runs that were deleted.
cursorstring#
Pagination cursor for the next batch. Only present when using filters without DLQ IDs.