Email routing status
const url = 'https://api.nsin.ir/domains/example.com/email-routing/';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/ \ --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.
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 ”Routing 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"}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"}