BatchPutMessage - Amazon IoT Events
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Sends a set of messages to the Amazon IoT Events system. Each message payload is transformed into the input you specify ("inputName") and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.

The following limits apply:

  • Maximum messages per batch: 10

  • Maximum message payload per batch: 1024 Bytes (1 KiB)

Request Syntax

POST /inputs/messages HTTP/1.1 Content-type: application/json { "messages": [ { "inputName": "string", "messageId": "string", "payload": blob, "timestamp": { "timeInMillis": number } } ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.


The list of messages to send. Each message has the following format: '{ "messageId": "string", "inputName": "string", "payload": "string"}'

Type: Array of Message objects

Array Members: Minimum number of 1 item.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "BatchPutMessageErrorEntries": [ { "errorCode": "string", "errorMessage": "string", "messageId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


A list of any errors encountered when sending the messages.

Type: Array of BatchPutMessageErrorEntry objects


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


An internal failure occurred.

HTTP Status Code: 500


The request was invalid.

HTTP Status Code: 400


The service is currently unavailable.

HTTP Status Code: 503


The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: