Thanks for reaching here! Could you please share some more details. You probably need to use a combination of API calls for that. Also depending on the use case, some SDKs will have realtime notifications available so the client can subscribe to new messages without having to call the APIs.
Assuming you want to get the list of threads for a particular user, you can use the GetChatThreads operation in any of the SDKs. It will give you the list of threads with the datetime for the last message received on.
Let us know.