Skip to main content
DELETE
/
v2
/
messages
Bulk Cancel Messages
curl --request DELETE \
  --url https://qstash.upstash.io/v2/messages \
  --header 'Authorization: Bearer <token>'
{
  "cancelled": 123
}

Authorizations

Authorization
string
header
required

QStash authentication token

Query Parameters

messageIds
string[]

A list of message IDs to delete. If provided, other filters are ignored.

topicName
string

Filter messages by URL Group name.

queueName
string

Filter messages by Queue name.

url
string

Filter messages by URL.

label
string

Filter messages by label.

flowControlKey
string

Filter messages by Flow Control Key.

fromDate
integer

Filter messages created after this timestamp (Unix milli, inclusive).

toDate
integer

Filter messages created before this timestamp (Unix milli, inclusive).

scheduleId
string

Filter messages by Schedule ID.

callerIP
string

Filter messages by Caller IP.

count
integer

Maximum number of messages to delete. There is no default value, so if not provided, all messages matching the filters will be deleted.

Response

200 - application/json

All messages deleted successfully

cancelled
integer

Number of messages cancelled