Mail API reference

Mail API · Received

get/v1/workspaces/{workspace_id}/received/{id}/attachments/{position}Auth

Download one attachment of a received email

By its `position` from the detail's attachment manifest. Unscanned, untrusted bytes from a third party. Gated by `mail.message.body.read`.

Path parameters

workspace_id*string · uuid

Id of the workspace.

id*string · uuid

Received email id.

position*number

Attachment position (0-based).

Response · 200

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

Example

Request

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