Skip to main content
GET
/
v1
/
api
/
email
/
messages
/
{id}
/
attachments
/
{attachment_id}
/
download
Download an email attachment
curl --request GET \
  --url https://api.hq.zone/v1/api/email/messages/{id}/attachments/{attachment_id}/download \
  --header 'Authorization: Bearer <token>'

Binary response

Returns the attachment’s raw bytes with its stored Content-Type (not JSON). The bytes are fetched on demand and not stored by HQ. The interactive playground may not render binary — fetch it programmatically and stream the body to a file.

Authorizations

Authorization
string
header
required

Personal Access Token. Send as Authorization: Bearer hq_pat_....

Path Parameters

id
string<uuid>
required

Email message id

attachment_id
string<uuid>
required

Attachment id

Response

Raw attachment bytes (fetch-on-view from Sentio)