Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Retrieve a list of attachments for a sent email

GET/emails/{email_id}/attachmentsRetrieve a list of attachments for a sent email

Parameters

email_idstring · uuidpathrequired

The ID of the email.

limitintegerquery

Maximum number of attachments to return.

afterstring · uuidquery

Pagination cursor to fetch results after this attachment ID. Cannot be used with 'before'.

beforestring · uuidquery

Pagination cursor to fetch results before this attachment ID. Cannot be used with 'after'.

Responses

200OKapplication/json
objectListAttachmentsResponse
dataarray of object

Array containing attachment information.

Show child attributes
Show array items
content_dispositionstring

How the attachment should be displayed.

one of "inline", "attachment"

content_idstring

The content ID for inline attachments.

content_typestring

The MIME type of the attachment.

download_urlstring

Signed URL to download the attachment content.

expires_atstring · date-time

Timestamp when the download URL expires.

filenamestring

The filename of the attachment.

idstring · uuid

The ID of the attachment.

sizeinteger

Size of the attachment in bytes.

has_moreboolean

Indicates if there are more results available.

objectstring

Type of the response object.

Example response
{
  "data": [
    {
      "content_disposition": "attachment",
      "content_id": "img001",
      "content_type": "application/pdf",
      "download_url": "https://cloudfront.example.com/path?Signature=...",
      "expires_at": "2024-10-27T18:30:00.000Z",
      "filename": "document.pdf",
      "id": "660e8400-e29b-41d4-a716-446655440000",
      "size": 2048
    }
  ],
  "has_more": false,
  "object": "list"
}
Documentation menu