/v1/workspaces/{workspace_id}/mailboxes/{id}/messages/{mid}/rawAuthStream the raw RFC5322 .eml for a message. Gated by `mail.message.body.read` (admin+ by default; not granted to plain members) — the outbound lane's /messages/:id/body action.
Path parameters
workspace_id*string · uuidId of the workspace.
id*string · uuidId of the mailboxe.
mid*string · uuidId of the message in the mailbox.
Response · 200
Raw RFC5322 message stream (`Content-Disposition: attachment`, `.eml`).
Example
Request
GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/mailboxes/{id}/messages/{mid}/raw
Authorization: Bearer YOUR_TOKENimport { Mail } from "@productcraft/mail";
// Reads PRODUCTCRAFT_API_KEY from the environment
const mail = new Mail();
const response = await mail.mailboxes.messages.raw("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
const text = await response.text();mail.mailboxes.messages.raw(mailboxId, messageId, options?): Response