Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Adding NS records and SOA records

Discussion in 'Bind/DNS/Nameserver' started by nickrucci, Oct 14, 2016.

  1. nickrucci

    nickrucci Registered

    Oct 14, 2016
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    I am wanting to add NS records and SOA records but cPanel doesn't give me the option to add those through the interface. I see from the API that I can add a record via https://server:2083/cpsessxxxxxxxxxxx/json-api/addzonerecord?api.version=1. I only want to add the records I want to once and leave it alone. I figured I can do this through Postman. I am wanting to POST to the URL above with the following body:

        "domain": "domain",
        "name": "name",
        "class": "IN",
        "type": "NS",
        "nsdname": "thing"
    I set up a Basic Auth header. I try to POST and I receive a

    {"cpanelresult":{"apiversion":"2","error":"Token denied","data":{"reason":"Token denied","result":"0"},"type":"text"}}
    Do I not have the correct URL to POST to?
    Why is it returning apiversion 2 when I specified 1?
    Do I need to use something other than Basic Auth?
    Can I generate a token another way than using Basic Auth?
    Can I do this without Postman and configure something in the cPanel interface so that I can add NS and SOA records?
    Any help would be great.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Support for NS and SOA record manipulation through cPanel or cPanel UAPI/API 2 functions is not currently offered. I encourage you to open a feature request for the ability to modify the "NS" records, and vote/add feedback to the following feature request:

    Move SOA record management to Advanced Zone Editor

    Do you have root access to the system? If so, the following WHM API 1 function would allow you to make these modifications:

    WHM API 1 Functions - editzonerecord - Software Development Kit - cPanel Documentation

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice