API · Emails
Retrieve Attachment
Retrieve a sent email attachment with a download link that expires after one hour (requires full access). Deleting the team or expiring the email revokes the link.
GET
/emails/{id}/attachments/{attachmentId}Full accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
idpath · required | string | Resource identifier for id. |
attachmentIdpath · required | string | Resource identifier for attachmentId. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
bash
curl -X GET "$OPENSEND_BASE_URL/emails/YOUR_id/attachments/YOUR_attachmentId" \
-H "Authorization: Bearer $OPENSEND_API_KEY"Response
200 · application/json. Example IDs stand for IDs returned by your installation.
json
{
"object": "attachment",
"id": "YOUR_ID",
"filename": "example",
"size": 0,
"content_type": "example",
"content_disposition": "example",
"content_id": "YOUR_CONTENT_ID",
"download_url": "https://api.example.com/example",
"expires_at": "2026-09-29T12:00:00Z"
}Behavior and errors
Retrieve metadata and a signed download_url, then download before expires_at. The attachment must belong to this email and team.
Use a full-access credential. Unknown or foreign resources return 404. See authentication, errors, rate limits, and pagination.