nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Email Routing

List email addresses

gethttps://api.nsin.ir/domains/{domain}/email-routing/rules/

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

Every custom address on the domain, by local part. active says whether the address is live right now: enabled, routing on, and (for forward) its destination verified. Requires domain.view.

Path parameters

  • domainstringrequiredpath

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

Responses

200Rule list.

Content type: application/json

  • idinteger
  • local_partstring

    The part before the @, lowercased.

  • addressstring

    The full address, local_part@domain.

  • actionstring

    forward delivers to the destination; drop accepts the mail and discards it.

    One of: "forward" "drop"
  • destination_idinteger | null

    The destination mail is forwarded to. null for drop.

  • destination_emailstring | null

    That destination's address.

  • destination_verifiedboolean

    Whether the destination has confirmed its address; unverified destinations receive nothing.

  • enabledboolean

    Your switch.

  • activeboolean

    Whether the address is live right now — enabled, routing on for the domain, and (for forward) the destination verified.

  • namestring

    Optional label.

  • created_atstring (date-time)
  • updated_atstring (date-time)
json
[
  {
    "id": 0,
    "local_part": "string",
    "address": "string",
    "action": "forward",
    "destination_id": 0,
    "destination_email": "string",
    "destination_verified": true,
    "enabled": true,
    "active": true,
    "name": "string",
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-01-01T00:00:00Z"
  }
]
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/domains/example.com/email-routing/rules/" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc