API · Receiving
Retrieve Attachment
Retrieve a received email attachment with a download link that expires after one hour (requires full access). List parameters are ignored.
GET
/emails/receiving/{id}/attachments/{attachmentId}Full accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
idpath · required | string | Opaque resource id. |
attachmentIdpath · required | string | Opaque resource id. |
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/receiving/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
Download using the returned URL before expires_at. This endpoint returns metadata, not the attachment bytes.
Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.