Mail API reference

Mail API · Messages

get/v1/workspaces/{workspace_id}/mailboxes/{id}/messages/{mid}/attachments/{position}Auth

Stream a single attachment by its position. Gated by `mail.message.body.read`: an attachment is message content, and /:mid already names it without handing over the bytes.

Path parameters

workspace_id*string · uuid

Id of the workspace.

id*string · uuid

Id of the mailboxe.

mid*string · uuid

Id of the message in the mailbox.

position*number

Position of the attachment in the message, starting at 0.

Response · 200

Binary attachment stream. `Content-Type` reflects the stored attachment media type; `Content-Disposition: attachment`.

Example

Request

GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/mailboxes/{id}/messages/{mid}/attachments/{position}
Authorization: Bearer YOUR_TOKEN