List Messages

Fetches the messages list.

Iterating through List Messages API:

Sample API endpoint for fetching messages after a particular timestamp -
/messages?limit=1000&fromTimestamp=1679434430&affix=append

The endpoint mentioned above would return 1K messages starting from the mentioned timestamp in fromTimestamp.
In the API response, there would be a meta object nested with previous, current, and next properties.
You have to fetch the value of sentAt property from next object and pass it to the query parameter (fromTimestamp) for the next iteration.

"next": {
      "affix": "append",
      "sentAt": 1679493319,
      "fromTimestamp": "1679434430",
      "id": "1001273"
}

/messages?limit=1000&fromTimestamp=1679493319&affix=append
The above query parameter would fetch the next page.

Further customizations can be made in the request with the help of query parameters:
-> Fetching all messages of a particular conversation (conversationId=user)
-> Fetching messages based on receiverType (receiverType=<user_or_group>)

-> Fetching messages based on category (category=message)
-> Fetching messages based on types (type=text)
-> Fetching messages based on tags (tag=<tag_to_be_searched>)
-> Fetching only deleted messages (onlyDeleted=1)
-> Fetching all messages except deleted ones (hideDeleted=1)
-> Fetching all messages starting from a particular timestamp (fromTimestamp=<unix_timestamp>)
-> Fetching all message till a particular timestamp (toTimestamp=<unix_timestamp>)

Few properties also support multi-valued filter:
-> /messages?categories=message,custom
-> /messages?types=text,file
-> /messages?tags=tag1,tag2

For more details please visit here

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!