Skip to content

Add a destination to the domain owner's account

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

domain
required
string

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

Example
example.com
Media type application/json
object
email
required

A bare ASCII address, at most 254 characters.

string
Example generated
{
"email": "example"
}

Destination created; the verification mail is on its way.

Media type application/json
object
destination
object
id
integer
email
string
verified
boolean
verified_at
string format: date-time
nullable
created_at
string format: date-time
last_sent_at

When the last verification mail went out.

string format: date-time
nullable
resend_cooldown_seconds

Seconds until another verification mail may be sent; 0 when allowed now.

integer
in_use

Rules and catch-alls pointing at it.

integer
last_failure

The receiving server’s last refusal, when forwards to it are bouncing.

string
last_failure_at
string format: date-time
nullable
resend_cooldown_seconds
integer
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).

Media type application/json
object
error
required

Human-readable description of what went wrong.

string
code

Machine-readable reason (hosts_not_ready, kek_unset, loop, no_mx, unverified).

string
field

The offending body field, when one applies.

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

Editor role, or the account is at its destination cap.

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

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 account already has this destination (conflict: destination, the row under destination).

Media type application/json
object
error
required

Human-readable description of what went wrong.

string
conflict

What conflicts (mx, spf, spf_multiple, external_dns, domain_status, not_enabled, local_part, destination).

string
records

For mx / spf_multiple — the rows in the way.

Array<object>
object
id
integer
name
string
content
string
priority
integer
record_id

For spf — the existing SPF row.

integer
content

For spf — its current value.

string
merged

For spf — what it becomes with our include merged in.

string
destination

For destination — the existing row.

object
id
integer
email
string
verified
boolean
verified_at
string format: date-time
nullable
created_at
string format: date-time
last_sent_at

When the last verification mail went out.

string format: date-time
nullable
resend_cooldown_seconds

Seconds until another verification mail may be sent; 0 when allowed now.

integer
in_use

Rules and catch-alls pointing at it.

integer
last_failure

The receiving server’s last refusal, when forwards to it are bouncing.

string
last_failure_at
string format: date-time
nullable
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.

Media type application/json
object
error
required

Human-readable description of what went wrong.

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