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_idstringrequired

The received email ID (UUID).

idstringrequired

The attachment ID (UUID).

Response Fields

objectstring

Always "attachment".

idstring

The attachment ID.

filenamestring

The attachment filename.

sizenumber

File size in bytes.

content_typestring

MIME type of the attachment.

content_dispositionstring

The content disposition header value (e.g. "attachment" or "inline").

content_idstring | null

Content ID for inline images.

download_urlstring

A time-limited pre-signed URL for downloading the attachment.

expires_atstring

ISO 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

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"
}