A message is sent whenever a user (or a bot) wants to communicate with another user or a group.
Besides text, messages can also send rich content as an Attachment.
|String||Yes||Id of the user who sent the message.|
|String||Yes||Id of the user or group to whom the message was sent.|
|String||No||Client id for the message|
|String||Yes||A unique server id for the message.|
|Number||Yes||Server timestamp of the message. Number of milliseconds since epoch.|
|String||Yes||Message text added by the user.|
|String||No||FlockML content for the message.|
Text to be shown as the message's notification. (Default is text.)
|String||No||Id of the app that sent the message.|
An array of user ids indicating users who have been mentioned in the message.
Only relevant for group messages.
|Object (Elaborated below)||No||This field is used this if the sender would want to display another name and image as the sender.|
|Array of Attachments||No|
Any rich content to be included with the message is sent as part of attachments.
Note: Currently, there is a limitation of one attachment per message.
The attributes of the
sendAs field are as follows:
|String||Yes||Name of the sender.|
|String||Yes||URL of the sender's profile image.|