Skip to content

Update the catch-all

PUT
/domains/{domain}/email-routing/catch-all
curl --request PUT \
--url https://api.nsin.ir/domains/example.com/email-routing/catch-all \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "action": "forward", "destination_id": 1 }'

destination_id is required when action is forward and must be a VERIFIED destination on the domain owner’s account. 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
enabled
boolean
action
string
Allowed values: forward drop
destination_id

Required when action is forward; a verified destination on the owner’s account.

integer

The catch-all as saved.

Media type application/json
object
enabled
boolean
action
string
Allowed values: forward drop
destination_id
integer
nullable
destination_email
string
nullable
destination_verified
boolean
Example
{
"action": "forward"
}

Invalid action, a missing or unverified destination, or a destination on the domain itself (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"
}

The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.

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 key exceeded its request budget (300 requests per minute by default).

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 limited
{
"error": "rate limit exceeded"
}