nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Email Routing

Download the raw .eml

gethttps://api.nsin.ir/domains/{domain}/email-routing/inbox/{id}/raw

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 a mail.stored webhook).

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.

json
{
  "error": "invalid API key"
}
403The key has no email:read.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
404No such message on this domain.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "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.

json
{
  "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.

json
{
  "error": "read-only API key"
}

Example request

bash
curl -X GET "https://api.nsin.ir/domains/example.com/email-routing/inbox/0/raw" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc