---
title: "Threads"
description: "`threads.list`, `listAll`, `iterate` and `get`, for the mail this person can see."
url: "https://nextmail.sh/docs/mailbox/threads"
area: "Client"
category: "Mailbox"
---

# Threads

`threads.list`, `listAll`, `iterate` and `get`, for the mail this person can see.

## Reading

**read-threads.ts**

```
const page = await client.threads.list({ folder: 'inbox', limit: 25 })

const next = page.nextCursor
  ? await client.threads.list({ folder: 'inbox', cursor: page.nextCursor })
  : null

const thread = await client.threads.get('thread_…')
console.log(thread.messageCount, thread.hasUnread)

for await (const entry of client.threads.iterate({ sort: 'oldest' })) {
  console.log(entry.id)
}
```
