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 a message to the specified queue. With Amazon SQS, you now have the ability to send large payload messages that are up to 256KB (262,144 bytes) in size. To send large payloads, you must use an AWS SDK that supports SigV4 signing. To verify whether SigV4 is supported for an AWS SDK, check the SDK release notes.


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

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

Request Parameters

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


The number of seconds (0 to 900 - 15 minutes) to delay a specific message. Messages with a positive DelaySeconds value become available for processing after the delay time is finished. If you don't specify a value, the default value for the queue applies.

Type: Integer

Required: No


The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding important note.

Type: String

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 SendMessageResult.


An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to

Type: String


An element containing the message ID of the message sent to the queue. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide.

Type: String


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


The message contains characters outside the allowed set.

HTTP Status Code: 400


The following example SendMessage request sends a message containing "This is a test message" 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 "This is a test message".

Sample Request



Sample Response