Skip to main content

In response to demand from our reseller hosting customers, we’ve added DNS functionality to the API. This allows you to find out exactly what DNS records we’ll serve for a domain name, and allows you to make arbitrary changes to them. We hope that this will make it easy for you to automatically set up custom DNS (e.g. set up SRV records for third-party services, or SPF records for email), and this will allow you to create your own DNS management interface if you want to.

Not currently using our API?

All our reseller hosting customers have free access to our API, and you can find out more information here (including your log-in details): https://customer.heartinternet.uk/manage/api

How to use this new functionality

Using this functionality is really easy. Once you’ve loaded the ext-dns object, you can issue an extended domain info request:

 

<?xml version=”1.0″?>

 

 

 

 

 

example.org

 

 

 

xmlns:ext-dns=”https://www.heartinternet.uk/whapi/ext-dns-1.0″/>

 

 

bc2cf3a9d78940cd811831a4f2effd93

 

 

The response will then return, in addition to the usual information, every DNS record we have stored for the domain:

 

<?xml version=’1.0′?>

 

 

 

 

Command completed successfully

 

 

 

 

xmlns:ext-dns=”https://www.heartinternet.uk/whapi/ext-dns-1.0″>

 

127.0.0.1

 

127.0.0.4

 

127.0.0.6

 

::1

node=”groupware”>

groupware.some-offsite-provider.example.org.

 

mail

 

mail

 

ns1.mainnameserver.com.

 

ns2.mainnameserver.com.

weight=”5″>

mail:25

weight=”5″>

groupware:143

 

Some text here

 

 

 

 

bc2cf3a9d78940cd811831a4f2effd93

 

test-109471ac1fc3ece827a290f7b0f8ebb1

 

 

 

If you want to add or delete records, you just send something very similar to the above (in

and

blocks) as part of a domain update command:

<?xml version=”1.0″?>

 

 

 

 

 

example.org

 

 

 

xmlns:ext-dns=”https://www.heartinternet.uk/whapi/ext-dns-1.0″>

 

weight=”5″>

mail.somewhere-else.example.org.:25

weight=”70″>

backupmx1.somewhere-else.example.org.:25

weight=”30″>

backupmx2.somewhere-else.example.org.:25

 

 

weight=”5″>

mail:25

 

 

 

 

8074d3abb4bbe1c86af43ea1316a090d

 

 

Updates will be performed exactly as if you’d been updating the DNS records from the domain control panel.

 

4 Comments

  • Darren Ryan says:

    is this available on the hostpay system aswel?

  • Matthew says:

    Darren,

    HostPay already gives your customers passwordless access to the domain control panel for their domain names (which will include DNS management functionality if you have it enabled).

    Cheers

    Matt

  • Drupal says:

    Sorry if this is the wrong place to post this…but… Is anyone using Drupal or developing a drupal module to access the API?

    Or…would anyone like to collaberate and develop one?

    Regards

    Steve

  • ifor says:

    Would be nice to be able to add standard mail boxes via the api. ifor

Leave a Reply