Check the published records now
const url = 'https://api.nsin.ir/domains/example.com/email-routing/dns/check';const options = {method: 'POST', 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 POST \ --url https://api.nsin.ir/domains/example.com/email-routing/dns/check \ --header 'Authorization: Bearer <token>'Queries the public nameserver for the domain’s MX, SPF and DKIM and
marks each managed record ok, missing or extra (a foreign MX or
a second SPF). A domain whose records do not answer is misconfigured
and its mail hosts stop accepting for it until the records are back.
The same check runs every five minutes on its own. Once a minute per
domain: sooner answers 429 with retry_after_seconds. 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.comResponses
Section titled “ Responses ”Fresh verdict; the status.
object
At least one mail host has checked in recently. Enable is refused while false.
The managed records are not editable.
object
object
object
Relative to the domain; @ is the apex.
extra is a foreign MX or a second SPF seen publicly.
The managed record’s id, when the row is ours.
Only while unconfigured — what enable would have to remove or merge.
object
object
object
Enable removed MX records that disable can restore.
object
Every message except discarded bounces.
object
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
The TXT name relative to the domain.
object
object
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.
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"}Email routing is not enabled on this domain (conflict: not_enabled).
object
Human-readable description of what went wrong.
What conflicts (mx, spf, spf_multiple, external_dns, domain_status, not_enabled, local_part, destination).
For mx / spf_multiple — the rows in the way.
object
For spf — the existing SPF row.
For spf — its current value.
For spf — what it becomes with our include merged in.
For destination — the existing row.
object
When the last verification mail went out.
Seconds until another verification mail may be sent; 0 when allowed now.
Rules and catch-alls pointing at it.
The receiving server’s last refusal, when forwards to it are bouncing.
Example
{ "error": "read-only API key"}The per-key rate limit, or a check less than a minute ago.
object
Human-readable description of what went wrong.
Seconds left on this domain’s five-minute scan window.
Example
{ "error": "read-only API key"}The public lookup failed; nothing changed.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}