Emails Total Count For Folders

Alright @Emmad_Altaf got a lengthy response from the platform team :partying_face:

  1. If you only needs to get all messages from one thread, you can use Return all Messages endpoint and pass the thread_id query parameter: Nylas v3 Email, Calendar, and Contacts API docs | Nylas Docs
    1. If you only needs to get the number of messages from one thread, you can use Return a thread endpoint. There is a field called message_ids in the response. The number of messages is the size of message_ids array: Nylas v3 Email, Calendar, and Contacts API docs | Nylas Docs
    1. We do not support expanding message bodies for Return all threads, because the pagination will become very complex. We will have to paginate both the messages in each thread, and the thread list itself.
    1. However, there is a way to get around this problem. You can call Return all Threads first. For each thread returned, then expand the messages by making another Return all messages call.

Hope this helps :sunglasses: