Messages
This section contains what all messages related actions can be performed using Admin APIs.
Get all messages
Retrieves all the messages of a target user. You can pass various query parameters in this API to filter the list of messages.
GET https://api.channelize.io/v2/messages
Query Params
The following table lists the parameters this API call supports to get filtered results.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
ids | string | no | null | Search the messages with message IDs. |
types | string | no | null | Search the messages with types separated by commas. Allowed values are normal, forward, reply, admin . By default all the messages are retrived. |
customTypes | string | no | null | Search the messages with custom types separated by commas. |
attachmentTypes | string | no | null | Search the messages with type field of attachments separated by commas. like text, image, video etc. |
ownerIds | string | no | null | Search the messages with message's owner IDs separated by commas. |
parentId | string | no | null | Search the reply messages of given parent message. |
showInConversation | boolean | no | null | Filter messages based on value of showInConversation param. |
sort | string | no | updatedAt DESC | Specifies the sorting criteria for the returned results. Allowed values are updatedAt ASC and updatedAt DESC. |
limit | int | no | 50 | Specifies the number of results to return. |
skip | int | no | 0 | Specifies the number of results you want to skip from the beginning. |
Response
Status Code : 200
[
{
"id": "5a928b10-4258-11ea-9c07-831a487bf6af",
"conversationId": "1021",
"type": "normal",
"customType": "text",
"createdAt": "2020-01-29T05:29:43.233Z",
"updatedAt": "2020-01-29T05:29:43.233Z",
"body": "hi",
"ownerId": "18646",
"reactionsCount": {
"like": 2
},
"reactions": {
"like": [
"18646",
"318714"
]
},
"attachments": [
{
"type": "image",
"fileUrl": "https://sample-file-url/1576213941566-unnamed.jpg",
"name": "unnamed.jpg",
"mimeType": "image/jpeg",
"extension": "jpg",
"size": 95860,
"thumbnailUrl": "https://sample-file-url/media/1576213941566-unnamed-thumbnail.png",
"id": "5df31dba3a22d30037d62066"
}
],
"owner": {
"id": "18646",
"displayName": "Alen Joe",
"profileImageUrl": "https://sample-file-url/media/b5ceb45b2d6c74e4fc89673a5675c09c.jpg"
},
"mentionedUsers": [
{
"wordCount": 2,
"order": 1,
"userId": "18664",
"user": {
"id": "18664",
"displayName": "Antonis",
"profileImageUrl": "https://sample-file-url/media/1576213941566.png"
}
},
{
"wordCount": 2,
"order": 2,
"userId": "18714",
"user": {
"id": "18714",
"displayName": "Alle",
"profileImageUrl": "https://sample-file-url/media/1576213941566.png"
}
}
],
"replyCount" : 0,
"showInConversation" : true
}
]