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

# Get the rendered body

> GET /v1/emails/{id}/body — retrieve the exact { html, text } archived at send time.

Retrieve the exact HTML and plain-text bodies archived at send time — fully rendered, with any template merge variables already substituted. Either part may be null.

**`GET /v1/emails/{id}/body`**

The body is stored separately from the message summary, so retrieving it is its own call. For an `outbound` message you get the message exactly as it was sent; for an `inbound` message you get the parsed body as received.

## Path parameters

<ParamField body="id" type="string" required>
  The message id.
</ParamField>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.drin.run/v1/emails/msg_01HZX9K3T2QF7P0M4N8B6C5D/body \
    -H "Authorization: Bearer $DRIN_API_KEY"
  ```

  ```typescript Node.js theme={null}
  import { DrinClient } from "@drin00/sdk";

  const drin = new DrinClient({ apiKey: process.env.DRIN_API_KEY });

  const { html, text } = await drin.emails.getBody(
    "msg_01HZX9K3T2QF7P0M4N8B6C5D",
  );
  ```
</CodeGroup>

## Response

`200 OK` — the rendered `{ html, text }`. Either field may be `null` if that part wasn't sent.

```json 200 OK theme={null}
{
  "html": "<p>It works!</p>",
  "text": "It works!"
}
```

### Fields

<ResponseField name="html" type="string | null">
  The rendered HTML body, or `null` if the message was text-only.
</ResponseField>

<ResponseField name="text" type="string | null">
  The rendered plain-text body, or `null` if the message was HTML-only.
</ResponseField>

<Note>
  **Attachments are separate.** This endpoint returns only the rendered text. List a message's files with [`GET /v1/emails/{id}/attachments`](/api-reference/emails/attachments) and download each from its `url`.
</Note>
