Skip to content

Emails (raw MIME)

Use this endpoint when an agent or integration needs the full original MIME (headers and body exactly as received), for example archival, forwarding, or header analysis not present in parsed fields.

For the same bytes inside MCP hosts, use the get_email_raw tool (base64 JSON) instead of this streaming REST response.

https://momail.io/v1/api/emails/{messageId}/raw

Authentication: Authorization: Bearer <api-key>. See Authentication.

GET /v1/api/emails/{messageId}/raw
ParameterLocationDescription
messageIdpathEmail message_id in MoMail (same id used by MCP get_email / get_email_raw as email_id)

HTTP 200

HeaderValue
Content-Typemessage/rfc822
Content-Dispositionattachment; filename="{messageId}.eml"
X-MoMail-R2-KeyInternal storage key (for support/debug)

Body: raw .eml bytes (not JSON).

HTTP 404 — email not found or not owned by the authenticated user:

{
"error": {
"code": "NOT_FOUND",
"message": "Email not found"
}
}

HTTP 401 — missing or invalid API key / token (see Error codes).

Terminal window
curl -L "https://momail.io/v1/api/emails/msg_abc123/raw" \
-H "Authorization: Bearer your_api_key" \
-o msg_abc123.eml