Get Received Email Attachment
Retrieve a single attachment from a received (inbound) email, including a time-limited download URL.
GET
/emails/receiving/{email_id}/attachments/{id}Requires a full_access API key.
Path Parameters
email_idstringrequiredThe received email ID (UUID).
idstringrequiredThe attachment ID (UUID).
Response Fields
objectstringAlways "attachment".
idstringThe attachment ID.
filenamestringThe attachment filename.
sizenumberFile size in bytes.
content_typestringMIME type of the attachment.
content_dispositionstringThe content disposition header value (e.g. "attachment" or "inline").
content_idstring | nullContent ID for inline images.
download_urlstringA time-limited pre-signed URL for downloading the attachment.
expires_atstringISO 8601 timestamp when the download_url expires.
curl -X GET 'https://api.postflare.app/emails/receiving/9f8e7d6c-5b4a-3210-fedc-ba9876543210/attachments/b2c3d4e5-f6a7-8901-bcde-f12345678901' \
-H 'Authorization: Bearer re_xxxxxxxxx'const response = await fetch(
'https://api.postflare.app/emails/receiving/9f8e7d6c-5b4a-3210-fedc-ba9876543210/attachments/b2c3d4e5-f6a7-8901-bcde-f12345678901',
{
headers: {
'Authorization': 'Bearer re_xxxxxxxxx',
},
}
);
const data = await response.json();Response
{
"object": "attachment",
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"filename": "document.pdf",
"size": 51200,
"content_type": "application/pdf",
"content_disposition": "attachment",
"content_id": null,
"download_url": "https://storage.example.com/attachments/document.pdf?signature=...",
"expires_at": "2026-01-01T01:00:00.000Z"
}