> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getaptly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get one email message with its full body and attachments

> 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>`.




## OpenAPI

````yaml /openapi.yaml get /api/inboxes/{channelId}/threads/{threadId}/messages/{messageId}
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.1'
  description: |
    The Aptly API lets external systems work with boards, contacts, inboxes,
    tasks, files, and other Aptly resources.

    Most endpoints accept an API key in the `x-token` header. Some endpoints
    also accept a delegate token or partner bearer token, as shown in each
    operation's security requirements, and explicitly public endpoints require
    no credential. API keys are scoped to a company and may be restricted to
    specific boards and read, insert, or update permissions; requests outside
    those restrictions receive a 403 `FORBIDDEN` response.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/inboxes/{channelId}/threads/{threadId}/messages/{messageId}:
    get:
      tags:
        - Inboxes
      summary: Get one email message with its full body and attachments
      description: >
        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>`.
      operationId: getInboxMessage
      parameters:
        - name: channelId
          in: path
          required: true
          schema:
            type: string
          description: External channel meta ID (`meta.id`) of the inbox.
        - name: threadId
          in: path
          required: true
          schema:
            type: string
          description: Thread id from the messages list.
        - name: messageId
          in: path
          required: true
          schema:
            type: string
          description: Message id from the messages list.
      responses:
        '200':
          description: The message.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/InboxMessage'
                      - type: object
                        properties:
                          body:
                            type: string
                            description: Full message body from the provider.
                          bodyType:
                            type: string
                            enum:
                              - html
                              - text
                          cc:
                            type: array
                            items:
                              type: object
                          attachments:
                            type: array
                            items:
                              $ref: '#/components/schemas/InboxMessageAttachment'
        '400':
          description: Not an email message.
        '403':
          description: No access to this inbox.
        '404':
          description: >-
            Inbox, thread or message not found (including a message the provider
            no longer has).
        '502':
          description: The mail provider request failed.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
        - PartnerBearer: []
components:
  schemas:
    InboxMessage:
      type: object
      properties:
        messageId:
          type: string
        threadId:
          type: string
        subject:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
          description: e.g. `email`, `sms`, `voice`.
        timestamp:
          type: string
          format: date-time
        direction:
          type: string
          enum:
            - in
            - out
        from:
          type: object
          nullable: true
          description: >-
            Sender, as `{ id, name }` where `id` is an email address or phone
            number.
        to:
          type: array
          items:
            type: object
          description: Recipients, each as `{ id, name }`.
        sentByUser:
          type: string
          nullable: true
          description: Aptly user id that sent an outbound, when known.
        sentVia:
          type: string
          nullable: true
          enum:
            - aptly
            - native
          description: >-
            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.
    InboxMessageAttachment:
      type: object
      properties:
        id:
          type: string
          description: >-
            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:
          type: string
          nullable: true
        contentType:
          type: string
          nullable: true
        size:
          type: integer
          nullable: true
          description: Size in bytes, as reported by the provider.
        isInline:
          type: boolean
          description: True for images embedded in the body.
        contentId:
          type: string
          nullable: true
          description: Matches `cid:` references in an HTML body.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'
    PartnerBearer:
      type: http
      scheme: bearer
      description: 'Partner token. Format: `Authorization: Bearer <token>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.