---
title: "Get a thread with its messages"
method: GET
path: "/v1/threads/{id}"
tags: ["mail"]
---

# Get a thread with its messages

`GET /v1/threads/{id}`

## Request

- Base URL: `https://botmail.pro`
- URL: `https://botmail.pro/v1/threads/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bm_session`

Scope: read. Pending claim keys allowed. Held messages (account over
storage quota) have `status: "held"` and an empty `text` until released.

## Path parameters

- `id` string, required

## Query parameters

- `mark_read` '1'

## Response `200`

The thread and its messages, oldest first.

- object
  - `thread` Thread, required
    - `id` string, required
    - `mailbox_id` string, required
    - `subject` string, required
    - `snippet` string, required
    - `message_count` integer, required
    - `unread_count` integer, required
    - `last_message_at` string, date-time, required
    - `archived` boolean, required
    - `starred` boolean, required
    - `trashed` boolean, required
    - `spam` boolean, required
    - `labels` string[], required
    - `participants` string[], required: Sender addresses (up to 6).
  - `messages` Message[], required
    - `id` string, required
    - `thread_id` string, required
    - `mailbox_id` string, required
    - `uid` integer, required: Monotonic per-mailbox counter.
    - `direction` 'in' | 'out', required
    - `status` string, required: Inbound: `received`, or `held` (account over storage quota; body hidden until released). Outbound: `queued`, `held`, `blocked`, `sent`, `delivered`, `bounced`, `complained`, `failed`.
    - `status_reason` string: Outbound only, on GET /v1/messages/{id}: why the message is held, blocked, bounced, complained or failed (e.g. the classifier verdict).
    - `message_id_header` string, required: Message-ID without angle brackets.
    - `in_reply_to` string
    - `references` string[]
    - `from` string, required
    - `from_name` string
    - `to` string[], required
    - `cc` string[]
    - `bcc` string[]
    - `reply_to` string
    - `subject` string, required
    - `snippet` string, required
    - `text` string: Plain-text body (up to 64 KB; full body via `/raw`). Empty for held messages.
    - `size_bytes` integer, required
    - `has_attachments` boolean, required
    - `attachments` AttachmentMeta[]
      - `id` string, required
      - `part_index` integer, required
      - `filename` string, required
      - `content_type` string, required
      - `content_id` string
      - `inline` boolean, required
      - `size_bytes` integer, required
    - `auto_submitted` boolean, required: Sent by an automated system.
    - `verdicts` Verdicts, required: Inbound authentication and scanning results (PASS, FAIL, GRAY, …).
      - `spam` string
      - `virus` string
      - `spf` string
      - `dkim` string
      - `dmarc` string
    - `seen` boolean, required
    - `starred` boolean, required
    - `labels` string[], required
    - `sent_at` string, date-time
    - `created_at` string, date-time, required

## Other responses

- `401`: Missing or invalid credentials (`unauthorized`, `invalid_token`).
- `403`: The credential can't do this (`forbidden`, `csrf`, `account_inactive`, …). Missing scopes are listed in `details.required_scope`; pending keys get a hint to wait for the claim.
- `404`: Not found or not accessible with this credential.

---

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