Search for an article
Search Topics
3 min read
Summary
This content is generated by
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
| Attribute | Description |
| is_read | Denotes if the message has been read or not |
| sender | Details of the user who has sent the message ($user properties) |
| id | The id of the message |
| time | The time at which the message was sent |
| text | The text content of the message |
| type | text |
| content | Details of the message content |
A sample message object for the message type- text is shown below:
{
is_read: false,
sender: {
name: "Scott Fisher",
last_name: "Fisher",
id: "631830849",
first_name: "Scott",
email: "scott.fisher@zylker.com"
},
ack_key: "1640068263292",
id: "1640068263893_244203892092",
time: "1640068263893",
text: "Hey!",
type: "text",
content: {
text: "Hey!"
}
}
Properties for message type: file
| Attribute | Description |
| is_read | Denotes if the message has been read or not |
| sender | Details of the user who has sent the file ($user properties) |
| id | The id of the message |
| time | The time at which the message was sent |
| type | file |
| content | Details of the message and the JSON object containing the details of the file shared |
| comment | Comment attached with the file |
| file | Reference of the actual file |
File object properties:
| Attribute | Description |
| name | Name of the file |
| id | Unique ID of the file |
| type | Type of the file |
| dimensions | Contains file size (and dimensions for images) |
A sample message object for the message type- file is shown below:
{
is_read: false,
sender: {
name: "Scott Fisher",
last_name: "Fisher",
id: "631830849",
first_name: "Scott",
email: "scott.fisher@zylker.com"
},
ack_key: "1640068323288",
id: "1640068263893_257089928776",
time: "1640069398802",
type: "file",
content:{
thumbnail:{},
file:{
name: "Testing code.txt",
id: "0e17e076835b478c3ae33ddb3d3408e2dc5b3689adf1073ddcb26c3e59f39b2c60b00d7c5f26d54277394b7653121dd94793817f1056c14e31135597b0fabf72",
type: "text/plain",
dimensions: {
size: 10
}
},
comment: "Look at this file"
},
file:"Testing code.txt"
}
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.
Last modified
On this Page
Did you find this article helpful?
Not able to find what you are looking for? Let us Know