---
title: "Get a message"
method: GET
path: "/v1/messages/{id}"
tags: ["mail"]
---

# Get a message

`GET /v1/messages/{id}`

## Request

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

Scope: read. Pending claim keys allowed. With `format=html` the
response adds sanitized `html` and `blocked_images`.

## Query parameters

- `format` 'html'
- `images` '1'

## Response `200`

The message.

- MessageWithHTML
  - `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
  - `html` string: Sanitized HTML. Only with `format=html`.
  - `blocked_images` integer: Remote images removed from `html`. Only with `format=html`.

## 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)
