Get Email Attachment

Retrieve a single attachment from a sent email, including a time-limited download URL.

GET/emails/{email_id}/attachments/{id}

Requires a full_access API key.

Path Parameters

email_idstringrequired

The sent 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 (referenced with <img src="cid:...">).

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/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794/attachments/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  -H 'Authorization: Bearer re_xxxxxxxxx'
const response = await fetch(
  'https://api.postflare.app/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794/attachments/a1b2c3d4-e5f6-7890-abcd-ef1234567890',
  {
    headers: {
      'Authorization': 'Bearer re_xxxxxxxxx',
    },
  }
);

const data = await response.json();

Response

Response
{
  "object": "attachment",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "filename": "invoice.pdf",
  "size": 102400,
  "content_type": "application/pdf",
  "content_disposition": "attachment",
  "content_id": null,
  "download_url": "https://storage.example.com/attachments/invoice.pdf?signature=...",
  "expires_at": "2026-01-01T01:00:00.000Z"
}