Amazon Simple Queue Service
API Reference (API Version 2012-11-05)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...



Delivers up to ten messages to the specified queue. This is a batch version of SendMessage. The result of the send action on each message is reported individually in the response. The maximum allowed individual message size is 256 KB (262,144 bytes).

The maximum total payload size (i.e., the sum of all a batch's individual message lengths) is also 256 KB (262,144 bytes).

If the DelaySeconds parameter is not specified for an entry, the default for the queue is used.


The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification. For more information, go to If you send any characters that are not included in the list, your request will be rejected.

#x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]


Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.


Some API actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:



Request Parameters

For information about the common parameters that all actions use, see Common Parameters.


A list of SendMessageBatchRequestEntry items.

Type: SendMessageBatchRequestEntry list

Required: Yes


The URL of the Amazon SQS queue to take action on.

Type: String

Required: Yes

Response Elements

The following elements are returned in a structure named SendMessageBatchResult.


A list of BatchResultErrorEntry items with the error detail about each message that could not be enqueued.

Type: BatchResultErrorEntry list


A list of SendMessageBatchResultEntry items.

Type: SendMessageBatchResultEntry list


For information about the errors that are common to all actions, see Common Errors.


Two or more batch entries have the same Id in the request.

HTTP Status Code: 400


The length of all the messages put together is more than the limit.

HTTP Status Code: 400


Batch request does not contain an entry.

HTTP Status Code: 400


The Id of a batch entry in a batch request does not abide by the specification.

HTTP Status Code: 400


Batch request contains more number of entries than permissible.

HTTP Status Code: 400


Error code 400. Unsupported operation.

HTTP Status Code: 400


The following example SendMessageBatch request sends two messages to the queue. You must URL encode the entire URL; however, we've URL encoded only the message body to make the example easier for you to read. The following example response includes the MD5 digest for the messages.

Sample Request



Sample Response