---
title: "List threads"
method: GET
path: "/v1/inboxes/{id}/threads"
tags: ["Messages"]
---

# List threads

`GET /v1/inboxes/{id}/threads`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/v1/inboxes/{id}/threads`
- Auth: API key in header `X-API-Key`

Newest first, each with its `labels`. `?labels=a,b` returns threads
that carry every label across their messages. Spam is left out unless
`includeSpam=true`; a thread containing spam then carries `hasSpam: true`.

## Query parameters

- `limit` integer
- `offset` integer
- `labels` string
- `includeSpam` boolean

## Response `200`

OK

- object
  - `threads` Thread[]
    - `threadId` string, uuid
    - `subject` string
    - `messageCount` integer
    - `firstMessageAt` string, date-time
    - `lastMessageAt` string, date-time
    - `labels` string[]: Every label carried by any message in the thread.
    - `hasSpam` boolean: Present (true) only when the thread contains spam, which happens with `includeSpam=true`.

---

[API](https://skmtc.dev/anjal/apis/anjal-api.md) · [All operations](https://skmtc.dev/anjal/apis/anjal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anjal/apis/anjal-api/revisions/a4044778e294?raw)
