Loading...

Knowledge Base

Modify NS Records Using the API

When you want to update a Name Server (NS) DNS record. This article explains how to modify NS records for a domain using the API, including host values, name server changes, and TTL configuration.

Modifying NS Record

 

Description

Modifies a Name Server (NS) record.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
domain-nameStringRequiredDomain name for which you want to modify the NS record
hostStringOptional

The host part of the domain-name for which you need to modify the NS record

Example:

You may send this as ns1, if u wish to modify the NS record as ns1.domainname.com.

current-valueStringRequiredCurrent NS value
new-valueStringRequiredNew NS value
ttlIntegerOptionalNumber of seconds the record needs to be cached by the DNS Resolvers. Default value is 14400.

HTTP Method

POST

Example Test URL Request

https://test.httpapi.com/api/dns/manage/update-ns-record.json?auth-userid=0&api-key=key&domain-name=domain.asia&current-value=ns1.domain.com&new-value=ns2.domain.com

Response

Returns a status key with value as Success if the record is modified successfully.

In case of any errors, a status key with value as ERROR alongwith an error message will be returned.