Message

Message Object

Each message in a conversation will be considered as a message object. The message can be sent as a text, a card, a slide or all the three!

Properties for message type: text 

AttributeDescription
senderDetails of the user who has sent the message ($user properties)
timeThe message sent time
typetext
textThe message content

A sample message object for the message type- text is shown below:


{
  "sender": {
    "country": "us",
    "timezone": "Asia/Calcutta",
    "last_name": "Fisher",
    "language": "en",
    "id": "123456",
    "first_name": "Scott",
    "email": "scott.fisher@zylcal.com"
  },
  "time": "1493707283711",
  "text": "Hi",
  "type": "text"
}

Properties for message type: file​

AttributeDescription
senderDetails of the user who has sent the file ($user properties)
typefile
fileJSON object containing details of the file shared
timeTime of the file shared, in milliseconds
commentComment attached with the file

File object properties:

AttributeDescription
sizebytesSize bytes of the file
sizeSize of the file 
nameName of the file
typeType of the file

​[
  {
    "file": {
      "sizebytes": "211063",
      "size": "206 KB",
      "name": "Object Reference.pages",
      "type": "application/zip"
    },
    "sender": {
      "country": "us",
      "timezone": "Asia/Calcutta",
      "last_name": "Fisher",
      "language": "en",
      "id": "123456",
      "first_name": "Scott",
      "email": "scott.fisher@zylcal.com"
    },
    "time": "1497248479156",
    "type": "file"
  }
]

Properties for the type : Card

The card property in a message object can be used to send customised messages designed as cards. Cliq offers three different types of message cards, they are explained in detail in the Rest API document.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocliq.com