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

# Get thread messages

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

## Request

- Base URL: `https://api.openmail.sh`
- URL: `https://api.openmail.sh/v1/threads/{id}/messages`
- Auth: HTTP bearer

Retrieve a thread and all of its messages in order, with read status and full message content.

## Path parameters

- `id` string, required

## Response `200`

Thread with messages

- object: Thread with messages
  - `threadId` string
  - `inboxId` string: Inbox this thread belongs to
  - `subject` string
  - `isRead` boolean: Whether the thread has been marked as read
  - `data` Message[]
    - `id` string
    - `threadId` string
    - `direction` 'inbound' | 'outbound'
    - `fromAddr` string
    - `toAddr` string: Your OpenMail inbox address for inbound messages. For outbound sends, the primary recipient.
    - `headerTo` string, nullable: Inbound only. The address the sender wrote to (comma-separated if multiple). When deliveryRole is cc, reply to this address — not fromAddr.
    - `deliveryRole` 'to' | 'cc' | 'null', nullable: Inbound only. to if your inbox was the main recipient; cc if you were copied on the email.
    - `cc` string[]: Email addresses copied on the message.
    - `addressNames` object, nullable: Inbound only. Display names the sender's mail client put on From, To and Cc, keyed by lower-cased address, e.g. `{"alice@example.com": "Alice Smith"}`. Address fields stay bare so you can match on them. Null when the headers carried no names.
    - `bcc` string[]: Blind-copy recipients on outbound mail sent from this inbox. Empty on inbound. Not included in the copy delivered to To or Cc.
    - `subject` string
    - `bodyText` string
    - `bodyHtml` string
    - `attachments` object[]
      - `filename` string
      - `contentType` string
      - `sizeBytes` integer
      - `url` string: Signed URL for download
    - `rawUrl` string, nullable: URL of the original RFC 822 message (GET /v1/messages/{id}/raw). null when the bytes weren't kept.
    - `status` 'pending' | 'sent' | 'received' | 'failed'
    - `createdAt` string, date-time

## Other responses

- `401`: Missing, invalid, or expired API key
- `404`: Thread not found

---

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