Skip to main content
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

id
string
required
The message id.

Request

curl https://api.drin.run/v1/emails/msg_01HZX9K3T2QF7P0M4N8B6C5D/body \
  -H "Authorization: Bearer $DRIN_API_KEY"

Response

200 OK — the rendered { html, text }. Either field may be null if that part wasn’t sent.
200 OK
{
  "html": "<p>It works!</p>",
  "text": "It works!"
}

Fields

html
string | null
The rendered HTML body, or null if the message was text-only.
text
string | null
The rendered plain-text body, or null if the message was HTML-only.
Attachments are separate. This endpoint returns only the rendered text. List a message’s files with GET /v1/emails/{id}/attachments and download each from its url.