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

# Get Message

> Fetch a single message with attachment metadata and hydrated HTML body.

Returns one message in your organization, including its attachment metadata. The HTML body is hydrated from object storage when it is not stored inline, so `htmlBody` is always populated when the message has HTML.

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token formatted as `Bearer gork_live_...`. Requires the `messages:read` scope.
</ParamField>

### Path parameters

<ParamField body="id" type="string" required>
  The message ID (`msg_...`).
</ParamField>

<Note>
  Inbox-bound agent keys may only fetch messages in their own inbox — anything else returns `403 inbox_access_denied`.
</Note>

### Response

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Unique message ID (`msg_...`).
    </ResponseField>

    <ResponseField name="inboxId" type="string">
      The inbox this message belongs to.
    </ResponseField>

    <ResponseField name="threadId" type="string">
      The conversation thread (`thd_...`).
    </ResponseField>

    <ResponseField name="direction" type="string">
      `inbound` for received mail, `outbound` for sent mail.
    </ResponseField>

    <ResponseField name="fromAddress" type="string">
      Sender email address.
    </ResponseField>

    <ResponseField name="toAddresses" type="string[]">
      Recipient addresses.
    </ResponseField>

    <ResponseField name="subject" type="string">
      Subject line.
    </ResponseField>

    <ResponseField name="textBody" type="string">
      Plain-text body, or `null` when absent.
    </ResponseField>

    <ResponseField name="htmlBody" type="string">
      HTML body (hydrated from storage when needed), or `null` when absent.
    </ResponseField>

    <ResponseField name="status" type="string">
      Delivery status (e.g. `received`, `delivered`, `scheduled`, `failed`, `cancelled`).
    </ResponseField>

    <ResponseField name="attachments" type="object[]">
      Attachment metadata rows for this message (`id`, `filename`, `contentType`, `sizeBytes`). Use `GET /v1/attachments/{id}` to download bytes.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 creation timestamp.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.gork.email/v1/messages/msg_90e38dfb4a2c \
    -H "Authorization: Bearer gork_live_YOUR_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  import { Gork } from "@gork/sdk"

  const gork = new Gork({ apiKey: process.env.GORK_API_KEY })

  const message = await gork.messages.get("msg_90e38dfb4a2c")
  ```

  ```python Python theme={null}
  import requests, os

  res = requests.get(
      "https://api.gork.email/v1/messages/msg_90e38dfb4a2c",
      headers={"Authorization": f"Bearer {os.getenv('GORK_API_KEY')}"},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "msg_90e38dfb4a2c",
      "inboxId": "inb_728af980b4e",
      "threadId": "thd_128bca90f4",
      "direction": "inbound",
      "fromAddress": "billing@acme.com",
      "toAddresses": ["support@try.gork.email"],
      "subject": "Invoice 1042",
      "textBody": "Invoice attached.",
      "htmlBody": null,
      "status": "received",
      "attachments": [
        {
          "id": "att_1a2b3c4d5e6f",
          "filename": "invoice-1042.pdf",
          "contentType": "application/pdf",
          "sizeBytes": 48210
        }
      ],
      "createdAt": "2026-09-11T08:00:00.000Z"
    }
  }
  ```
</ResponseExample>

| Code                  | HTTP | Meaning                                                  |
| --------------------- | ---- | -------------------------------------------------------- |
| `inbox_access_denied` | 403  | The key is bound to a different inbox than this message. |
| `message_not_found`   | 404  | No message with this ID exists in your organization.     |
