Get the rendered body
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}/bodyThe 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.
01 Path parameters
idstringRequired
The message id.
02 Request
curl https://api.drin.run/v1/emails/msg_01HZX9K3T2QF7P0M4N8B6C5D/body \
-H "Authorization: Bearer $DRIN_API_KEY"03 Response
200 OK — the rendered { html, text }. Either field may be null if that part wasn't sent.
{
"html": "<p>It works!</p>",
"text": "It works!"
}Fields
htmlstring | nullOptional
The rendered HTML body, or
null if the message was text-only.textstring | nullOptional
The rendered plain-text body, or
null if the message was HTML-only.Attachments are separateThis endpoint returns only the rendered text. List a message's files with
GET /v1/emails/{id}/attachments and download each from its url.