Post Message
IMPORTANT
You only can send alias
and avatar
properties if your user has the bot
role. We implement this rule to avoid users to impersonate other users.
URL | Requires Auth | HTTP Method |
---|---|---|
|
|
|
Payload
Argument | Example | Required | Description |
---|---|---|---|
|
| Required | The room id of where the message is to be sent. The channel name with the prefix in front of it. # refers to channel, however @ refers to username |
|
| Optional | The text of the message to send, is optional because of attachments. |
|
| Optional | This will cause the message's name to appear as the given alias, but your username will still display. |
|
| Optional | If provided, this will make the avatar on this message be an emoji. Emoji Cheetsheet |
|
| Optional | If provided, this will make the avatar use the provided image url. |
|
| Optional | See the below section, Attachments Detail, for details. |
|
| Optional | The message id of the original message to reply to/create a thread on. |
|
| Optional | Defaults to |
Attachments Detail
The attachments is an array of objects with any of the following properties. One attachment can have many sections, including:
General
Author Information
Title Information
Image
Audio
Video
Table/Fields
Property | Example | Section | Description |
---|---|---|---|
|
| General | The color you want the order on the left side to be, any value background-css supports. |
|
| General | The text to display for this attachment, it is different than the message's text. |
|
| General | Displays the time next to the |
|
| General | An image that displays to the left of the |
|
| General | Only applicable if the |
|
| General | Causes the image, audio, and video sections to be hiding when collapsed is true. |
|
| Author | Name of the author. |
|
| Author | Providing this makes the author name clickable and points to this link. |
|
| Author | Displays a tiny icon to the left of the Author's name. |
|
| Title | Title to display for this attachment, displays under the author. |
|
| Title | Providing this makes the title clickable, pointing to this link. |
|
| Title | When this is true, a download icon appears and clicking this saves the link to file. |
|
| Image | The image to display, will be "big" and easy to see. |
|
| Audio | Audio file to play, only supports what html audio does. |
|
| Video | Video file to play, only supports what html video does. |
|
| Fields | An array of Attachment Field Objects. |
Attachment Field Objects
The field property of the attachments allows for "tables" or "columns" to be displayed on messages.
Property | Example | Required | Description |
---|---|---|---|
| true | Optional Default: | Whether this field should be a short field. |
|
| Required | The title of this field. |
|
| Required | The value of this field, displayed underneath the title value. |
Message Object Example
Example Call
Example Result
Change Log
Version | Description |
---|---|
2.4.1 | Document existing method to post reply/threaded messages |
2.4.0 | Added validation on user's identity |
0.49.0 | The |
0.48.0 | Information about the sent message is now returned. |
0.17.0 | Messages aren't always processed as from BOT and urls are parsed by default. |
0.14.0 | Internally using |
0.13.0 | Added |
Last updated