api.newMessage
api.newMessage(messagetype)
Description
Creates and returns an empty message that can be edited and then published.
Parameters
| Parameter | Type | Explanation |
|---|---|---|
| messagetype | String | The message_type of the message (located in headers/metadata) |
Example
msg = api.newMessage("HelloMessageType")
msg.put("text", "Hello world")
api.publish(msg)