---
title: "List the conversations of a mailbox"
method: GET
path: "/api/emails/{address}/threads"
tags: ["Email"]
---

# List the conversations of a mailbox

`GET /api/emails/{address}/threads`

## Request

- Base URL: `https://domani.run`
- URL: `https://domani.run/api/emails/{address}/threads`
- Auth: HTTP bearer

Messages grouped the way mail clients group them: a reply joins the thread of the message it answers (In-Reply-To, then the References chain), mail without usable headers joins the most recent thread with the same subject and a correspondent in common within thirty days, everything else starts a thread whose id is its first message's id. Threads are ordered by last activity; trash and spam never take part unless named as the folder. `folder=inbox|archive|sent` keeps the threads that have a message there but still counts the whole conversation.

## Path parameters

- `address` string, required

## Query parameters

- `folder` 'all' | 'inbox' | 'archive' | 'sent' | 'spam' | 'trash'
- `since` string, date-time
- `limit` integer
- `cursor` string
- `label` string

## Response `200`

Threads, newest activity first

- object
  - `threads` EmailThread[], required
    - `id` string, required: Thread id, the id of its first message
    - `subject` string, nullable: Subject of the first message
    - `participants` string[], required: Every address that wrote or received in the thread
    - `message_count` integer, required
    - `unread_count` integer, required: Unread inbound messages
    - `starred` boolean, required
    - `has_attachments` boolean, required
    - `first_message_at` string, date-time, required
    - `last_message_at` string, date-time, required
    - `last_message` object, required
      - `id` string, required
      - `direction` 'in' | 'out', required
      - `from` string, required
      - `to` string, required
      - `subject` string, nullable
      - `snippet` string, required
      - `folder` string, required
      - `is_read` boolean, required
      - `created_at` string, date-time, required
  - `next_cursor` string, nullable, required
  - `has_more` boolean, required

## Other responses

- `401`: Missing or invalid API key
- `404`: Mailbox not found
- `429`: Rate limit exceeded - wait and retry

---

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