Download the raw .eml
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
The message exactly as received (RFC 5322), as an
application/octet-stream download named message-<id>.eml. Never
marks it read. Needs email:read and domain.view; same open limit
and record as opening it.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id. - idintegerrequiredpath
A stored message's
id(from the inbox list or amail.storedwebhook).
Responses
200The raw message.
Content type: application/octet-stream
401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}403The key has no email:read.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}404No such message on this domain.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}410The mail is no longer on the mail host.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429Too many opens for this domain right now.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}Example request
curl -X GET "https://api.nsin.ir/domains/example.com/email-routing/inbox/0/raw" \
-H "Authorization: Bearer $NSIN_API_KEY"