# List threads

> Returns email threads (grouped by threadKey + accountId) with aggregate counts, for building a mailbox-style view. Only email mailboxes in your workspace are…

Source: https://warmerly.com/docs/inbox/list-threads

```text
GET /inbox/threads
```

Returns email threads (grouped by `threadKey` + `accountId`) with aggregate counts, for building a mailbox-style view. Only email mailboxes in your workspace are included. This is account/folder-oriented, as opposed to `/inbox/contacts`, which is contact-oriented and spans channels.

| Query param | Required | Description |
| --- | --- | --- |
| `accountId` | No | Filter to a single email account. An account that is not in your workspace returns `404 not_found`. |
| `folder` | No | IMAP folder to filter by. Defaults to `INBOX`. Ignored unless `view` is `inbox`. |
| `view` | No | One of `inbox` (default), `archived`, `starred`, `sent`. Any other value applies no view filter. |
| `q` | No | Full-text search across subject, sender, and body (Postgres FTS with an ILIKE fallback). |
| `limit` | No | Max threads to return, `1` to `100`. Defaults to `50`. |

```bash
curl "https://app.warmerly.com/api/v1/inbox/threads?accountId=8f14e45f-ceea-4c6a-8c8d-6b1a5b5c9c1a&view=inbox&limit=20" \
  -H "X-Api-Key: wmv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

```json
{
  "threads": [
    {
      "threadKey": "<CADx...@mail.gmail.com>",
      "accountId": "8f14e45f-ceea-4c6a-8c8d-6b1a5b5c9c1a",
      "lastReceivedAt": "2026-07-01T16:42:03.000Z",
      "messageCount": 4,
      "unreadCount": 1,
      "starred": false,
      "lastFromAddr": "jamie@northwindtraders.com",
      "lastFromName": "Jamie Rivera",
      "lastSubject": "Re: Quick question about your workflow",
      "lastSnippet": "Great, does Tuesday at 3pm work for a quick call?"
    }
  ]
}
```

## More from Inbox

- [Reply to a contact](https://warmerly.com/docs/inbox/reply-to-a-contact): Sends a reply to a contact on a specific channel and appends it to the timeline. Each channel has its own…
- [Get a thread](https://warmerly.com/docs/inbox/get-a-thread): Returns the raw messages in a single email thread, chronological order (the most recent 200). {key} is the…
- [Filter options](https://warmerly.com/docs/inbox/filter-options): Returns the projects and email accounts in your workspace that the inbox can be filtered by, for populating…
