Message counts over time
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Received / forwarded / dropped / rejected / deferred, as totals and as
a bucketed series. received is every message except discarded
bounces. Requires domain.view.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Query parameters
- rangestringquery
Time window, ending now.
30mbuckets by minute,24hby hour,7dand30dby day.customtakes RFC 3339fromandto(at most 31 days apart) and picks the bucket from the span.One of:"30m""24h""7d""30d""custom"Default:"24h" - fromstring (date-time)query
Start of a
customrange, RFC 3339. - tostring (date-time)query
End of a
customrange, RFC 3339.
Responses
200Totals and series.
Content type: application/json
- rangestring
- fromstring (date-time)
- tostring (date-time)
- bucketstringOne of:
"minute""hour""day" - totalsEmailCounts
Fields
- receivedinteger
Every message except discarded bounces.
- forwardedinteger
Messages delivered to a destination.
- droppedinteger
Messages accepted and discarded by a
droprule or catch-all. - rejectedinteger
Messages refused.
- deferredinteger
Messages temporarily refused (the sender retries), for example over the daily forward cap.
- sentinteger
Recipients that mail sent from this domain (the send endpoint) was delivered to. Present on the status counters only.
- sentinteger
Recipients that mail sent from this domain was delivered to
- seriesarray of object
Item fields
- tstring (date-time)
- receivedinteger
Every message except discarded bounces.
- forwardedinteger
Messages delivered to a destination.
- droppedinteger
Messages accepted and discarded by a
droprule or catch-all. - rejectedinteger
Messages refused.
- deferredinteger
Messages temporarily refused (the sender retries), for example over the daily forward cap.
- sentinteger
Recipients that mail sent from this domain (the send endpoint) was delivered to. Present on the status counters only.
{
"range": "string",
"from": "2026-01-01T00:00:00Z",
"to": "2026-01-01T00:00:00Z",
"bucket": "minute",
"totals": {
"received": 0,
"forwarded": 0,
"dropped": 0,
"rejected": 0,
"deferred": 0,
"sent": 0
},
"sent": 0,
"series": [
{
"t": "2026-01-01T00:00:00Z",
"received": 0,
"forwarded": 0,
"dropped": 0,
"rejected": 0,
"deferred": 0,
"sent": 0
}
]
}400Bad range or custom bounds.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}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"
}404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}503The activity log store is temporarily unreachable. Retry; no data is lost.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "activity log temporarily unavailable"
}Example request
curl -X GET "https://api.nsin.ir/domains/example.com/email-routing/summary" \
-H "Authorization: Bearer $NSIN_API_KEY"