Upstash Documentation

Batch Messages

Send multiple messages in a single request
1 min read
post/v2/batch
Request example
Response
post/v2/batch

Authorization

Authorizationstringheaderrequired#
QStash authentication token

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

Body

application/json
destinationstringrequired#

Destination can either be a valid URL where the message gets sent to, or a URL Group name.

  • If the destination is a URL, make sure the URL is prefixed with a valid protocol (http:// or https://)
  • If the destination is a URL Group, a new message will be created for each endpoint in the group.

Note that destination must be publicly accessible over the internet. If you are working with local endpoints, consider using QStash local development server or a public tunnel service.

bodystring#
The raw request message passed to the endpoints as is
headersobject#
HTTP headers of the message. You can pass all the headers supported in the single publish API.
Show child attributes
{key}string#
queuestring#
Queue name to enqueue the message to if desired.

Responses

application/json
Messages published successfully
messageIdstring#
Unique identifier for the published message or the old message ID if deduplicated
deduplicatedboolean#
Whether this message is a duplicate and was not sent to the destination.