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/v1/messages
Query Params
The following table lists the parameters this API call supports to get filtered results.
Name | Type | Required | Default | Description |
---|---|---|---|---|
ownerId | string | no | null | The unique ID of the target user. |
contentType | int | no | null | Specifies the type of message. Allowed Values are 0,1,2 ,and 3 for text/media, meta message, sticker/gif and location messages respectively. |
attachmentType | string | no | null | Specifies the type of attachment. This is used to further filter the text/media contentType. Allowed values are text, image, audio, and video. |
sort | string | no | createdAt DESC | Specifies the sorting criteria for the returned results. Allowed values are createdAt ASC and createdAt DESC. |
limit | double | no | 25 | Specifies the number of results to return. |
skip | double | no | 0 | Specifies the number of results you want to skip from the beginning. |
Response
Status Code : 200
[
{
"id": "8a7fdff0-666f-11e9-bdcd-0bf682102101",
"chatId": "3a210d40-666a-11e9-bdcd-0bf68210bf49",
"attachmentType": "text",
"contentType": 1,
"status": "success",
"ownerId": "3037",
"metaMessageType": "meta_group_add_members",
"recipients": [
{
"id": "8a7fb8e1-666f-11e9-bdcd-0bf68210bf49",
"recipientId": "49",
"status": 3,
"createdAt": "2019-04-24T09:01:26.254Z"
}
],
"_metaMessageData": {
"id": "8a7fb8e4-666f-11e9-bdcd-0bf68210bf49",
"subType": "user",
"subId": "3037",
"objType": "users",
"objValues": [
"20456"
]
},
"owner": {
"id": "3037",
"displayName": "Channelize Demo User",
"profileImageUrl": "https://channelize.io/image.jpg"
},
"tags": []
}
]