Get an attachment download URL

Get an attachment download URL

GET/api/v1/email/received/{id}/attachments/{attachmentId}

GET /email/received/{id}/attachments/{attachmentId}
curl -X GET 'https://www.unitpost.com/api/v1/email/received/email_123/attachments/att_789' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
Response · 200
{
  "object": "received_attachment_url",
  "url": "https://example.com",
  "expires_at": "2026-01-01T00:00:00.000Z"
}

Get a short-lived, signed URL for downloading one inbound attachment's bytes. Fetch the URL and download promptly — it expires quickly (the expiry is included in the response). Find attachment ids on the message via Retrieve a received email. Requires the emails:read capability.

Parameters2 fields
FieldTypeDescription
idrequiredstring · path—
attachmentIdrequiredstring · path—
Response · 200 fields3 fields
FieldTypeDescription
objectrequiredenumreceived_attachment_url—
urlrequiredstringA signed, expiring URL to download the attachment bytes.
expires_atrequiredstringISO 8601 expiry of the signed URL (~5 minutes out).
200401403404503

Search docs and guides

Search the docs and product guides.