Email attachments are currently in private beta and only available to a limited
number of users. APIs might change before GA.To use the methods on this page, you must upgrade your Resend SDK:
Path Parameters
The Attachment ID.
The Email ID.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.attachments.sending.get({
id: '2a0c9ce0-3112-4728-976e-47ddcd16a318',
emailId: '4ef9a417-02e9-4d39-ad75-9611e0fcc33c',
});
{
"object": "attachment",
"id": "2a0c9ce0-3112-4728-976e-47ddcd16a318",
"filename": "avatar.png",
"size": 4096,
"content_type": "image/png",
"content_disposition": "inline",
"content_id": "img001",
"download_url": "https://outbound-cdn.resend.com/4ef9a417-02e9-4d39-ad75-9611e0fcc33c/attachments/2a0c9ce0-3112-4728-976e-47ddcd16a318?some-params=example&signature=sig-123",
"expires_at": "2025-10-17T14:29:41.521Z"
}
Retrieve a single attachment from a sent email.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.attachments.sending.get({
id: '2a0c9ce0-3112-4728-976e-47ddcd16a318',
emailId: '4ef9a417-02e9-4d39-ad75-9611e0fcc33c',
});
{
"object": "attachment",
"id": "2a0c9ce0-3112-4728-976e-47ddcd16a318",
"filename": "avatar.png",
"size": 4096,
"content_type": "image/png",
"content_disposition": "inline",
"content_id": "img001",
"download_url": "https://outbound-cdn.resend.com/4ef9a417-02e9-4d39-ad75-9611e0fcc33c/attachments/2a0c9ce0-3112-4728-976e-47ddcd16a318?some-params=example&signature=sig-123",
"expires_at": "2025-10-17T14:29:41.521Z"
}
npm install resend@6.3.0-canary.3
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.attachments.sending.get({
id: '2a0c9ce0-3112-4728-976e-47ddcd16a318',
emailId: '4ef9a417-02e9-4d39-ad75-9611e0fcc33c',
});
{
"object": "attachment",
"id": "2a0c9ce0-3112-4728-976e-47ddcd16a318",
"filename": "avatar.png",
"size": 4096,
"content_type": "image/png",
"content_disposition": "inline",
"content_id": "img001",
"download_url": "https://outbound-cdn.resend.com/4ef9a417-02e9-4d39-ad75-9611e0fcc33c/attachments/2a0c9ce0-3112-4728-976e-47ddcd16a318?some-params=example&signature=sig-123",
"expires_at": "2025-10-17T14:29:41.521Z"
}
Was this page helpful?