/v1/workspaces/{workspace_id}/received/{id}/rawAuthDownload the raw RFC 5322 message (.eml)
Every header, the full body and every attachment inline. Gated by `mail.message.body.read` (admin and up by default), like `/mailboxes/{id}/messages/{mid}/raw`.
Path parameters
workspace_id*string · uuidId of the workspace.
id*string · uuidReceived email id.
Response · 200
Raw RFC 5322 message stream (`Content-Disposition: attachment`, `.eml`).
Example
Request
GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/received/{id}/raw
Authorization: Bearer YOUR_TOKENimport { Mail } from "@productcraft/mail";
// Reads PRODUCTCRAFT_API_KEY from the environment
const mail = new Mail();
const response = await mail.received.raw("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
const text = await response.text();mail.received.raw(id, options?): Response