I used this api call to get DNS records and nameservers using domain name https://api.godaddy.com/v1/domains/testsd34.com/records/NS
GetRecords here is the api call
For default godaddy nameservers its giving everything perfectly but whenever i am using custom nameservers for domain that time this api call not giving nameservers in response its giving empty array, anyone knows how to get custom nameservers using this api call?
Finally, I found a way to get and edit nameservers for domain. (For custom nameservers, records are not set by GoDaddy, therefore you have to query nameserver provider.)
Following is the API call for getting nameservers:
Response will contain JSON object which has key "nameservers" with pair of nameservers that you have. Example:
To edit the nameservers via API call, you can use following API call: