Method for deleting multiple messages from a queue. You can delete up to 10 messages at once.

The result of changing each message's visibility timeout is reported individually in the response. Since a message can be deleted successfully or this action may fail, you should check all the results, even if code 200 is returned in response to the DeleteMessageBatch method call.


Request parameters

Parameter Type Required parameter Description
QueueUrl string Yes URL of the queue where the message is placed.
DeleteMessageBatchRequestEntry.N array Yes The DeleteMessageBatchRequestEntry array that contains the ReceiptHandleparameters of the messages to be deleted.


Successful response fields

Field Type Description
BatchResultErrorEntry.N array The BatchResultErrorEntry array with request result error descriptions.
DeleteMessageBatchResultEntry.N array The DeleteMessageBatchResultEntry array with the IDs of the messages that have been deleted.

DeleteMessageBatch errors

For a list of errors common for all methods, see Common errors.

HTTP code Error ID Description
400 BatchEntryIdsNotDistinct Two or more batch entries in the request have the same ID.
400 EmptyBatchRequest The batch request doesn't contain any entries.
400 InvalidBatchEntryId The ID of a batch entry is invalid.
400 TooManyEntriesInBatchRequest Too many entries in a batch.

Sample request


For more information about forming requests, see General API request format.

Response example