Self Help Documentation
< All Topics

domain/editdnszone

Description

Edits or deletes an existing DNS zone record for an existing domain in a given SPanel user account.

Parameters

FieldTypeRequiredDescription
tokenstringYesAuthorizing API token – check API Basics for more information.
accountuserstringYesThe SPanel user account that is being managed or viewed.
actionstringYesThe category and function being executed.
domainstringYesThe domain for which the DNS zone is being edited.
recordarrayYesThe old DNS record. Every array key must be present in order to identify the record successfuly.
changesnull|arrayNoIf omitted (null) will delete the DNS record. Else, the changes parameter must contain an array with values to be changed using the same format as the record parameter.

Warning
Pay attention to the correct name and value formats – some DNS record types require dots at the end of the string.

Example

You can find more information about the Endpoint URL in our API Basics article.

In the example above, the only changed parameter is “value”. The API call will result in no changes for the existing DNS zone record except for the “value” parameter. It will be changed from “ns1.spanel.io” to “ns2.spanel.io”.

Output

If the ‘changes’ parameter is omitted, the output is the following:

Table of Contents