Secondary DNS API

Our Secondary DNS service can be manually configured through the Customer Control Panel. But users with a large number of domains may prefer to use our API. This allows you to script the addition and removal of domains. To use the API, you must set a password in the control panel interface that will be used to authenticate your requests.

Requests to the API take the form of HTTP POST requests containing a number of HTTP parameters. These are documented below. HTTP requests should be made to /customer/secondarydnsapi

HTTP parameters

username
Required. The username for your Secondary DNS service. This is provided in the Customer Control Panel.
password
Required. The password set in the control panel.
command
Required. An API command. This parameter can be repeated to allow multiple commands in a single request. Commands take the form of a verb which may be followed by a domain name, as appropriate. Details of the commands are given below.

Commands

All the command parameters in the HTTP request are processed in order, and the results of each command are returned in a text/plain HTTP response. The commands and their responses are as follows:

ADD

The ADD command requests that a domain be added to the account. For example:

ADD mythic-beasts.com

If successful, the response will contain ADD followed by the domain name. Otherwise, the response will contain NADD followed by the domain name and a reason. For example:

NADD mythic-beasts.com: We already provide secondary DNS for mythic-beasts.com

DELETE

The DELETE command requests that a domain be removed from the account. For example:

DELETE mythic-beasts.com

The response will contain DELETE followed by the domain name in the event of success, and NDELETE followed by the domain name and a reason in the event of failure.

LIST

The LIST command takes no arguments, and requests a list of all domains on the account. The response will contain a line with DOMAIN followed by a domain name for each domain on the account. For example:

DOMAIN mythic-beasts.com
DOMAIN beasts.org