The Blink Developer Community

Welcome to the Blink developer community. You'll find comprehensive guides and documentation to help you start working with Blink as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Documentation

A Message object has several different types.

  1. text
  2. card
  3. markdown

You specify the type in the type field as below:

{
  "id": "m-123",
  "chat_id": "c-123",
  "created_at": "2016-05-09T13:19:01.160Z",
  "sender_id": "i-123",
  "type": "text",
  "text": "my message",
  "content": {
    // Optional data based on the type
  },
  "quick_replies": [
    // Optional array of QuickReply objects
  ]
}

Quick Replies

All messages can contain Quick Replies. These allow users to interact with your app without having to type on the keyboard (great for mobile).

We recommend using this where possible, but only in private direct chats with users and not in group chats, since they are not persistent. See details here.

Text

The most simple type of message! The text provided in the text parameter will be sent to the channel or chat as your entire message.

Card

If you're looking to send various blocks of content, we provide a pre-formatted template that we call a Message Card.

When sending cards, provide a plaintext preview of the message in the text parameter. In the content parameter you may then specify some additional data. You can find out more about Cardkit here.

{
    "pretext": "Some useful content:",
    "posttext": null,
    "cards": [
      // Array of MessageCard objects
    ]
  }

Markdown

For additional styling such as bold, italics, or posting links, you can also send markdown.

The text parameter of the message should contain a plaintext preview of the message, and then in the content object append an additional content parameter string with the markdown formatted variant.

For a brief introduction to Markdown, we recommend playing with it live.

Message