Skip to content

Message counts over time

GET
/domains/{domain}/email-routing/summary
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.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com
range
string
default: 24h
Allowed values: 30m 24h 7d 30d custom

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.

from
string format: date-time

Start of a custom range, RFC 3339.

to
string format: date-time

End of a custom range, RFC 3339.

Totals and series.

Media type application/json
object
range
string
from
string format: date-time
to
string format: date-time
bucket
string
Allowed values: minute hour day
totals
object
received

Every message except discarded bounces.

integer
forwarded
integer
dropped
integer
rejected
integer
deferred
integer
series
Array
object
t
string format: date-time
received

Every message except discarded bounces.

integer
forwarded
integer
dropped
integer
rejected
integer
deferred
integer
Example
{
"bucket": "minute"
}

Bad range or custom bounds.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"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.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}

The activity log store is temporarily unreachable. Retry; no data is lost.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example unavailable
{
"error": "activity log temporarily unavailable"
}