The DELETE on Message action unconditionally removes the specified message from the specified queue. Even if the message is locked by another reader due to the visibility timeout setting, it is still deleted from the queue.
The following table lists the special request parameters the action uses (in addition to the common request headers listed in Common REST Headers).
| Name | Description | Required |
|---|---|---|
| The ID of the message to delete. The value must be a message ID value returned from a PUT on MessageQueue request. Type: String | Yes |
The response contains no special elements besides the common elements listed in The Structure of a Response.
The request doesn't fail unless the MessageId is malformed. Even if the specified MessageID doesn't exist, the action returns Success.
The following example REST request deletes a message from the specified queue.
![]() | Important |
|---|---|
When specifying a queue when using the REST API, make sure to omit |
DELETE /A29E9WXPHGOG29/queue1/17VXQHSGX0SG4ZEPPK7R%7C0QE42ST4KW7RK9HSY074%7C0Z4AN912X0H2EP8BV6XJ HTTP/1.1 Host: queue.amazonaws.com Authorization: [AWS authentication string] AWS-Version: 2007-05-01 Content-Type: text/plain Date: Mon, 21 May 2007 21:12:00 GMT
See DeleteMessage for sample response information.