API · Receiving
Retrieve Received Email
Retrieve a received email with authentication results and a raw MIME download link that expires after one hour (requires full access). If parsing fails, metadata and raw MIME remain available, but decoded content and attachments are empty.
/emails/receiving/{id}Full accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
idpath · required | string | Opaque resource id. |
html_formatquery · optional | "cid" | "data_uri" | HTML image format, defaulting to data_uri and falling back to cid if any inline image exceeds 6 MiB or projected HTML exceeds 8 MiB. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
curl -X GET "$OPENSEND_BASE_URL/emails/receiving/YOUR_id" \
-H "Authorization: Bearer $OPENSEND_API_KEY"Response
200 · application/json. Example IDs stand for IDs returned by your installation.
{
"object": "email",
"id": "YOUR_ID",
"to": [
"example"
],
"from": "example",
"created_at": "2026-09-29T12:00:00Z",
"subject": "example",
"bcc": [
"example"
],
"cc": [
"example"
],
"reply_to": [
"example"
],
"message_id": "YOUR_MESSAGE_ID",
"attachments": [
{
"id": "YOUR_ID",
"filename": "example",
"size": 0,
"content_type": "example",
"content_disposition": "example",
"content_id": "YOUR_CONTENT_ID"
}
],
"html": "example",
"html_format": "cid",
"text": "example",
"headers": {},
"received_for": [
"example"
],
"authentication": {},
"raw": {
"download_url": "https://api.example.com/example",
"expires_at": "2026-09-29T12:00:00Z"
}
}Behavior and errors
Raw download links expire after one hour. Deleted/expired messages revoke them immediately. Inline images above 6 MiB or expanded HTML above 8 MiB cause CID fallback; inspect html_format in the response.
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.