Turn off custom name servers
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
When the registrar does not use the names, they are removed at once.
When it does, state becomes turning_off: put old_ns back at
your registrar, and the names are removed once it shows those again,
so the domain never stops answering. Idempotent. Requires
records.edit.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Responses
200Turned off, or turning off; the 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
- statestringOne 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 inwrong_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
{
"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.
{
"error": "invalid API key"
}403The key is read-only, your role on the domain lacks the required permission, or the domain's plan does not include the feature.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only 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.
{
"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.
{
"error": "rate limit exceeded"
}502The records could not be removed. Try again.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}Example request
curl -X POST "https://api.nsin.ir/domains/example.com/custom-ns/disable" \
-H "Authorization: Bearer $NSIN_API_KEY"