---
title: "Get one email message with its full body and attachments"
method: GET
path: "/api/inboxes/{channelId}/threads/{threadId}/messages/{messageId}"
tags: ["Inboxes"]
---

# Get one email message with its full body and attachments

`GET /api/inboxes/{channelId}/threads/{threadId}/messages/{messageId}`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/inboxes/{channelId}/threads/{threadId}/messages/{messageId}`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/inboxes/:channelId/threads/:threadId/messages/:messageId/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns one email message with its **full** body, fetched live from the
mail provider (the `body` on the list endpoint is only the stored snippet),
plus metadata for each attachment. Download an attachment's bytes with the
attachment endpoint below.

`threadId` and `messageId` are the `threadId` / `messageId` values returned
by `GET /api/inboxes/{channelId}/threads`. The thread must belong to the
inbox and the message to the thread. Only email messages are supported;
other message types return 400.

Inline images in an HTML body reference attachments as `cid:<contentId>`.

## Path parameters

- `channelId` string, required
- `threadId` string, required
- `messageId` string, required

## Response `200`

The message.

- object
  - `data` object
    - `messageId` string
    - `threadId` string
    - `subject` string, nullable
    - `body` string, nullable: Full message body from the provider.
    - `type` string, nullable: e.g. `email`, `sms`, `voice`.
    - `timestamp` string, date-time
    - `direction` 'in' | 'out'
    - `from` object, nullable: Sender, as `{ id, name }` where `id` is an email address or phone number.
    - `to` object[]: Recipients, each as `{ id, name }`.
    - `sentByUser` string, nullable: Aptly user id that sent an outbound, when known.
    - `sentVia` 'aptly' | 'native', nullable: How an outbound message was sent: `aptly` when it was composed in Aptly, `native` when the user sent it from their own mail client and it synced in. Always `null` on inbound messages.
    - `bodyType` 'html' | 'text'
    - `cc` object[]
    - `attachments` InboxMessageAttachment[]
      - `id` string: Provider attachment id; pass it to the attachment download endpoint. Gmail can re-issue this id between reads, so download soon after reading the message.
      - `name` string, nullable
      - `contentType` string, nullable
      - `size` integer, nullable: Size in bytes, as reported by the provider.
      - `isInline` boolean: True for images embedded in the body.
      - `contentId` string, nullable: Matches `cid:` references in an HTML body.

## Other responses

- `400`: Not an email message.
- `403`: No access to this inbox.
- `404`: Inbox, thread or message not found (including a message the provider no longer has).
- `502`: The mail provider request failed.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
