Skip to content

Email routing status

GET
/domains/{domain}/email-routing/
curl --request GET \
--url https://api.nsin.ir/domains/example.com/email-routing/ \
--header 'Authorization: Bearer <token>'

Everything the routing page shows: whether routing is on and its status, the published records with their last public-check verdict, what enabling would have to remove or merge (while unconfigured), the last 24 hours’ counts, the plan’s caps against current usage, the DKIM record and the platform’s mail hosts. Requires domain.view.

domain
required
string

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

Example
example.com

Routing status.

Media type application/json
object
enabled
boolean
status
string
Allowed values: unconfigured ready misconfigured unlocked suspended
hosts_ready

At least one mail host has checked in recently. Enable is refused while false.

boolean
locked

The managed records are not editable.

boolean
subaddressing
boolean
suspended_reason
string
catch_all
object
enabled
boolean
action
string
Allowed values: forward drop
destination_id
integer
nullable
destination_email
string
nullable
destination_verified
boolean
dns
object
checked_at
string format: date-time
nullable
ok
boolean
records
Array<object>
object
type
string
Allowed values: MX TXT
name

Relative to the domain; @ is the apex.

string
content
string
priority
integer
ttl
integer
state

extra is a foreign MX or a second SPF seen publicly.

string
Allowed values: ok missing extra unchecked
record_id

The managed record’s id, when the row is ours.

integer
problems
Array<string>
conflicts

Only while unconfigured — what enable would have to remove or merge.

object
mx
Array<object>
object
id
integer
name
string
content
string
priority
integer
spf
object
record_id
integer
content
string
merged
string
spf_multiple
boolean
previous_mx_available

Enable removed MX records that disable can restore.

boolean
counts_24h
object
received

Every message except discarded bounces.

integer
forwarded
integer
dropped
integer
rejected
integer
deferred
integer
limits
object
max_rules
integer
nullable
rules_used
integer
max_forwards_per_day
integer
nullable
forwards_today
integer
dkim

Always present. Before Email Routing is enabled the selector and name are already known (they come from platform settings) and txt is empty, because the key is generated at enable time.

object
selector
string
name

The TXT name relative to the domain.

string
txt
string
platform
object
mx_hosts
Array<object>
object
host
string
priority
integer
spf_include
string
forward_domain
string
Example
{
"status": "unconfigured",
"catch_all": {
"action": "forward"
},
"dns": {
"records": [
{
"type": "MX",
"state": "ok"
}
]
}
}

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"
}