Update routing settings
const url = 'https://api.nsin.ir/domains/example.com/email-routing/settings';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"subaddressing":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.nsin.ir/domains/example.com/email-routing/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "subaddressing": true }'Omitted fields are untouched. subaddressing lets user+tag@ match
the user@ rule (an exact user+tag@ rule still wins) and is what
permits a + in a rule’s local part. 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
Match user+tag@ against the user@ rule.
Example generated
{ "subaddressing": true}Responses
Section titled “ Responses ”Settings saved; 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" } ] }}Malformed body.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
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"}The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.
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 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"}