nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Custom Name Servers

Get custom name servers

gethttps://api.nsin.ir/domains/{domain}/custom-ns/

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

The domain's own name servers, the IP the registrar must hold for each, and whether the registrar uses them yet (status). Requires domain.view.

Path parameters

  • domainstringrequiredpath

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

Responses

200The custom name server state.

Content type: application/json

  • availableboolean

    The platform offers custom name servers.

  • plan_allowsboolean

    The domain's plan includes them (Enterprise).

  • can_enableboolean

    The domain is active on NSIN's name servers.

  • suffixstring

    What follows each name

  • labelsarray of string

    The current names' first labels

  • statestring
    One of: "" "on" "turning_off"
  • statusstring

    waiting: the registrar still shows NSIN's names. working: it shows yours with the right IPs. wrong_ip: it has another IP for the hosts in wrong_ip. no_ip: it has the names but no IPs. other: something else. checking: no answer yet.

    One of: "waiting" "working" "wrong_ip" "no_ip" "other" "checking"
  • namesarray of object
    Item fields
    • hoststring
    • ipstring
  • wrong_iparray | null
  • old_nsarray of string

    The names to put back at the registrar when turning off.

  • min_namesinteger
  • max_namesinteger
json
{
  "available": true,
  "plan_allows": true,
  "can_enable": true,
  "suffix": "string",
  "labels": [
    "string"
  ],
  "state": "",
  "status": "waiting",
  "names": [
    {
      "host": "ns1.example.com",
      "ip": "198.51.100.10"
    }
  ],
  "wrong_ip": [
    "string"
  ],
  "old_ns": [
    "string"
  ],
  "min_names": 0,
  "max_names": 0
}
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/custom-ns/" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc