List Received Email Attachments
Retrieve a list of attachments from a received (inbound) email, each with a time-limited download URL.
GET
/emails/receiving/{email_id}/attachmentsRequires an API key with the received_emails:read permission.
Path Parameters
email_idstringrequiredThe received email ID (UUID).
Query Parameters
limitnumberMaximum number of results to return. Min 1, max 100. Default 20.
afterstringCursor for forward pagination.
beforestringCursor for backward pagination.
Response Fields
objectstringAlways "list".
has_morebooleanWhether there are more results available.
dataarrayArray of attachment objects. Each item contains object, id, filename, size, content_type, content_disposition, content_id, download_url, and expires_at.
curl -X GET 'https://api.postflare.dev/emails/receiving/9f8e7d6c-5b4a-3210-fedc-ba9876543210/attachments' \
-H 'Authorization: Bearer sk_xxxxxxxxx'const response = await fetch(
'https://api.postflare.dev/emails/receiving/9f8e7d6c-5b4a-3210-fedc-ba9876543210/attachments',
{
headers: {
'Authorization': 'Bearer sk_xxxxxxxxx',
},
}
);
const data = await response.json();Response
{
"object": "list",
"has_more": false,
"data": [
{
"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"
}
]
}