Message API

When you send a message to Grape via any of our APIs (except Channels.post), you can not only add text but also generate a Card that will be rendered by all clients.

The message itself supports Markdown

some simple examples for markdown are

Types

Grape is ready to accept any message
  • as a simple sting

  • as an object containing a text

messages in object form can also contain a link_attachment object that will be rendered just like our Link Previews

Message object

"message": {
    "text": "The documentation, how you can also **create your own card messages** can be found [>>>here<<<](/doc/chat_api/message.html) :+1:",
    "link_attachments": [{
        "title": "Card Title",
        "title_link": "https://www.chatgrape.com",
        "author_name": "author_name",
        "author_link": "https://www.chatgrape.com",
        "author_icon": "https://ug-cdn.com/static/images/logo-base-blue.svg",
        "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, ...",
        "thumb_url": "https://ug-cdn.com/static/images/logo-base-blue.svg",
        "footer_icon": "https://ug-cdn.com/static/images/logo-base-blue.svg",
        "footer": "Autogenerated BOT message",
        "fields": [
        {
            "title": "A field title",
            "value": "This field value",
            "short": false
        },
        {
            "title": "A short field title",
            "value": "A short field value",
            "short": true
        },
        {
            "title": "A second short field title",
            "value": "A second short field value",
            "short": true
        }]
    }]
}
../_images/message_with_card_example.png

fields

field

type

description

title

string

title of the field

value

string

field text

short

boolean

is the field small enough so two fields
can fit in a single row