Add a destination to the domain owner's account
const url = 'https://api.nsin.ir/domains/example.com/email-routing/destinations/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"example"}'};
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/destinations/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "example" }'Same as the account-level create, but the destination lands on the
domain OWNER’s account and the verification mail names this domain.
Only the owner and admin-role members may; editors choose from the
list instead. Requires records.edit.
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.comRequest Body required
Section titled “Request Body required ”object
A bare ASCII address, at most 254 characters.
Example generated
{ "email": "example"}Responses
Section titled “ Responses ”Destination created; the verification mail is on its way.
object
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 generated
{ "destination": { "id": 1, "email": "example", "verified": true, "verified_at": "2026-04-15T12:00:00Z", "created_at": "2026-04-15T12:00:00Z", "last_sent_at": "2026-04-15T12:00:00Z", "resend_cooldown_seconds": 1, "in_use": 1, "last_failure": "example", "last_failure_at": "2026-04-15T12:00:00Z" }, "resend_cooldown_seconds": 1}Invalid address, a domain with no mail server (code: no_mx), or a loop (code: loop).
object
Human-readable description of what went wrong.
Machine-readable reason (hosts_not_ready, kek_unset, loop, no_mx, unverified).
The offending body field, when one applies.
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"}Editor role, or the account is at its destination cap.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only 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 account already has this destination (conflict: destination, the row under destination).
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, a verification mail to this destination less
than a minute ago (cooldownSecondsRemaining), or the account’s or
your address’s hourly send cap.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}