# Get All Threads, Order By Updated Date

**URL:** <https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383>\
**Category:** Question and Answers\
**Tags:** email-api\
**Created:** [August 26, 2024, 3:42pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383 "2024-08-26T15:42:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThibaudWink](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@ThibaudWink](https://forums.nylas.com/u/ThibaudWink)\
**Post date:** [August 26, 2024, 3:42pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/1 "2024-08-26T15:42:42Z")

</div>

Hello,

I don’t find any mention of sorting / ordering in the documentation.

Without having to save everything in database and add the logic myself, is there a way to fetch all the threads by updated date?

Currently, If a thread have been created a long time ago but has a new message, it still does not pop on the first page of the request. I suppose the threads are sorted by Creation Date by default.

Thanks all!

---

<div class="post-metadata">

**Author:** ![Blag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/blag/32/9_2.png) [@Blag](https://forums.nylas.com/u/Blag)\
**Post date:** [August 26, 2024, 4:13pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/2 "2024-08-26T16:13:01Z")

</div>

Hello @ThibaudWink Which provider are you using?

---

<div class="post-metadata">

**Author:** ![ThibaudWink](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@ThibaudWink](https://forums.nylas.com/u/ThibaudWink)\
**Post date:** [August 26, 2024, 4:26pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/3 "2024-08-26T16:26:13Z")

</div>

Hello, well almost all of them, Google, Microsoft, IMAP… Shouldn’t this feature be independant of providers?

---

<div class="post-metadata">

**Author:** ![Blag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/blag/32/9_2.png) [@Blag](https://forums.nylas.com/u/Blag)\
**Post date:** [August 26, 2024, 4:28pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/4 "2024-08-26T16:28:59Z")

</div>

Well…not quite…different providers handle things differently and sometimes the implementation takes more time…the end goal is to make independent for the user…

Can you please provide me with a request ID? or a grant ID? so that the platform team can take a look at this?

---

<div class="post-metadata">

**Author:** ![ThibaudWink](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@ThibaudWink](https://forums.nylas.com/u/ThibaudWink)\
**Post date:** [August 26, 2024, 4:34pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/5 "2024-08-26T16:34:46Z")

</div>

`"request_id": "54bbe6e9-7f1b-4338-b1a9-8202d558fe3e"`

But being a developer myself I don’t understand how it’s gonna help the dev team @nylas? Either it’s a feature that has not been dev yet, or a bug that I suppose appears on every request?

Anyway, thank you for your quick answers.

Can you explain the situation to me?

---

<div class="post-metadata">

**Author:** ![Blag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/blag/32/9_2.png) [@Blag](https://forums.nylas.com/u/Blag)\
**Post date:** [August 26, 2024, 9:30pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/6 "2024-08-26T21:30:39Z")

</div>

By using the request\_id the platform team can traceback the error and see whether is a bug or something else…our accounts have everything enabled, so it’s better to test with the account that is generating problems…

---

<div class="post-metadata">

**Author:** ![Rick\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@Rick\_Nguyen](https://forums.nylas.com/u/Rick_Nguyen)\
**Post date:** [October 21, 2025, 5:49pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/7 "2025-10-21T17:49:53Z")

</div>

Any updates on this?

I’ve encountered the same issue, and I believe this feature should have been addressed by now — it’s been over a year since it was first raised.

---

<div class="post-metadata">

**Author:** ![akay](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@akay](https://forums.nylas.com/u/akay)\
**Post date:** [October 30, 2025, 7:21pm UTC](https://forums.nylas.com/t/get-all-threads-order-by-updated-date/383/8 "2025-10-30T19:21:45Z")

</div>

Hello,

The Nylas Threads API doesn’t currently support explicit sorting parameters for ordering threads by update date.

However, you can filter threads based on message activity using these query parameters:

- **`latest_message_before`** - Returns threads with the latest message received before a specified timestamp

- **`latest_message_after`** - Returns threads with the latest message received after a specified timestamp

This allows you to filter for threads with recent activity. For example:

```auto
GET /v3/grants/<NYLAS_GRANT_ID>/threads?latest_message_after=<UNIX_TIMESTAMP>

```

Each thread object includes **`latest_message_received_date`** and **`latest_message_sent_date`** fields, which track the most recent message activity in the thread.

To display threads sorted by most recent activity (similar to how email clients work), you’ll need to sort the returned thread objects client-side using the **`latest_message_received_date`** field.

- [Documentation Link](https://developer.nylas.com/docs/v3/email/threads/?_gl=1*xah9y4*_ga*MzkzMzUxMjguMTc1MjE3NzM0MA..*_ga_5LVXVXFW0C*czE3NjE4NDQ2NTEkbzE3MiRnMSR0MTc2MTg1MTk2NyRqNTUkbDAkaDA.)

I hope this helps, please let us know if you have any questions
