Get a received email's original message

Get a received email's original message

GET/api/v1/email/received/{id}/raw

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

Get a short-lived, signed URL for the received message's full original MIME (.eml), headers, every part and attachment included. A body over 256 KB isn't inlined on Retrieve a received email, so this is how to read it. Download promptly: the URL expires in about 5 minutes. Stored messages are kept 30 days. A copy of an email you sent (sent_by_us) is a 403. Requires the emails:read capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Response · 200 fields4 fields
FieldTypeDescription
objectrequiredenumreceived_email_raw—
urlrequiredstringA signed, expiring URL to download the original message (.eml, RFC 5322).
expires_atrequiredstringISO 8601 expiry of the signed URL (~5 minutes out).
size_bytesrequiredintegerThe message's size in bytes.
200401403404422503

Search docs and guides

Search the docs and product guides.