A common use case for Receiving emails is to process attachments. You can access received email attachments in two ways:Documentation Index
Fetch the complete documentation index at: https://resend.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
- View and download from the dashboard to inspect a single email.
- Use the Attachments API to process attachments programmatically.
View and download attachments
You can view and download attachments directly from the dashboard when inspecting a received email.- Go to Emails and select the Receiving tab.
- Open the received email that includes the attachment.
- Click the attachment to download it locally.
Process attachments programmatically
Webhooks do not include the actual content of attachments, only their
metadata. You must call the Attachments
API to retrieve the
content. This design choice supports large attachments in serverless
environments that have limited request body sizes.
download_url that you can use to download the actual content. To retrieve a single attachment, use Retrieve Attachment.
Note that the download_url is valid for 1 hour. After that, you will need to call the
Attachments API
again to get a new download_url. You can also check the expires_at field on
each attachment to see exactly when it will expire.
Here’s how you can implement this: