Message counts over time
const url = 'https://api.nsin.ir/domains/example.com/email-routing/summary?range=30m';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.nsin.ir/domains/example.com/email-routing/summary?range=30m' \ --header 'Authorization: Bearer <token>'Received / forwarded / dropped / rejected / deferred, as totals and as
a bucketed series. received is every message except discarded
bounces. Requires domain.view.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comQuery Parameters
Section titled “Query Parameters ”Time window, ending now. 30m buckets by minute, 24h by hour, 7d
and 30d by day. custom takes RFC 3339 from and to (at most 31
days apart) and picks the bucket from the span.
Start of a custom range, RFC 3339.
End of a custom range, RFC 3339.
Responses
Section titled “ Responses ”Totals and series.
object
object
Every message except discarded bounces.
object
Every message except discarded bounces.
Example
{ "bucket": "minute"}Bad range or custom bounds.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}The activity log store is temporarily unreachable. Retry; no data is lost.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "activity log temporarily unavailable"}