Change nameserver delegation (vanity sets or back to regfish)
PUT /domains/{domain}/nameserversOperation ID: PutNameserversByDomain
Delegates the domain to one of the account’s vanity nameserver sets
(vanity_set_id), or moves it to the regfish standard nameservers
(vanity_set_id: null). Free-form nameservers are intentionally NOT
supported on this endpoint; a delegation to external nameservers must
be set up in the regfish dash.
vanity_set_id: null works from every starting point:
- From a vanity set: always possible, the hosted zone stays as it is.
- From external nameservers: possible when the TLD charges no fee for a
nameserver change. If regfish holds no DNS zone for the domain yet, it
is created with the regfish NS records only; create your records right
away (
POST /dns/rr), they are served as soon as the registry has switched the delegation. A TLD that charges for the change answers 409 with a link to the regfish dash, where the fee is shown and confirmed; the API never bills it. An active or changing DNSSEC setup also answers 409: disable DNSSEC first. - Already on the regfish nameservers: idempotent; a missing zone is created, nothing is sent to the registry.
Guarded by the Domain-Guardian (ns_change rule class), domain status
checks (pending transfer, cancellation) and two daily change limits:
5 changes per domain and 50 changes per account, both counted across all
of your API keys and OAuth clients. Issuing another credential does not
raise either limit.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
domain | fqdn_relaxed | yes |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
vanity_set_id | integer | yes | Id of one of the account’s vanity nameserver sets, or null to move the domain to the regfish standard nameservers (also from external nameservers, see the endpoint description). Free-form nameservers are not supported on this endpoint. |
Responses
Section titled “Responses”| Status | Type | Description |
|---|---|---|
200 | nameserversResponse | Delegation after the change |
401 | Error | Unauthorized |
403 | Error | Blocked by the Domain-Guardian |
404 | Error | Domain or vanity set not found |
409 | Error | Domain state or plan does not allow the change |
429 | Error | Daily change limit reached |
500 | Error | Unexpected error |
Response body
Section titled “Response body”| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | yes | Success indicator |
code | integer | no | Response/Error Code |
response | nameserversResponse | no |
Example
Section titled “Example”curl -X PUT "https://api.regfish.com/domains/<domain>/nameservers" \ -H "x-api-key: $REGFISH_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "vanity_set_id": 0 }'Build a request
Section titled “Build a request”Fill in values: the call below updates as you type. Nothing is sent: the API does not currently allow browser requests from this domain (CORS). The API key is not stored.