---
title: "List Threads"
method: GET
path: "/v0/inboxes/{inbox_id}/threads"
tags: ["InboxesThreads"]
---

# List Threads

`GET /v0/inboxes/{inbox_id}/threads`

## Request

- Base URL: `https://api.agentmail.to`
- URL: `https://api.agentmail.to/v0/inboxes/{inbox_id}/threads`
- Auth: HTTP bearer

**CLI:**
```bash
agentmail inboxes:threads list --inbox-id <inbox_id>
```

## Path parameters

- `inbox_id` string, required: The ID of the inbox.

## Query parameters

- `limit` integer: Limit of number of items returned.
- `page_token` string: Page token for pagination.
- `labels` string[]: Labels to filter by.
- `before` string, date-time: Timestamp before which to filter by.
- `after` string, date-time: Timestamp after which to filter by.
- `ascending` boolean: Sort in ascending temporal order.
- `include_spam` boolean: Include spam in results.
- `include_blocked` boolean: Include blocked in results.
- `include_trash` boolean: Include trash in results.

## Response `200`

- ListThreadsResponse
  - `count` integer, required: Number of items returned.
  - `limit` integer: Limit of number of items returned.
  - `next_page_token` string: Page token for pagination.
  - `threads` ThreadItem[], required: Ordered by `timestamp` descending.
    - `inbox_id` string, required: The ID of the inbox.
    - `thread_id` string, required: ID of thread.
    - `labels` string[], required: Labels of thread.
    - `timestamp` string, date-time, required: Timestamp of last sent or received message.
    - `received_timestamp` string, date-time: Timestamp of last received message.
    - `sent_timestamp` string, date-time: Timestamp of last sent message.
    - `senders` string[], required: Senders in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.
    - `recipients` string[], required: Recipients in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.
    - `subject` string: Subject of thread.
    - `preview` string: Text preview of last message in thread.
    - `attachments` Attachment[]: Attachments in thread.
      - `attachment_id` string, required: ID of attachment.
      - `filename` string: Filename of attachment.
      - `size` integer, required: Size of attachment in bytes.
      - `content_type` string: Content type of attachment.
      - `content_disposition` 'inline' | 'attachment': Content disposition of attachment.
      - `content_id` string: Content ID of attachment.
    - `last_message_id` string, required: ID of last message in thread.
    - `message_count` integer, required: Number of messages in thread.
    - `size` integer, required: Size of thread in bytes.
    - `updated_at` string, date-time, required: Time at which thread was last updated.
    - `created_at` string, date-time, required: Time at which thread was created.

## Other responses

- `404`

---

[API](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/revisions/869b7f1c360c?raw)
