manage domains and DNS with the API

With our API, it is possible to manage the domains and DNS under your own account and those of your clients.
Swagger documentation where all features of the API can be found and tested can be found at https://api.hosting.nl/api/documentation

The domain and DNS capabilities

It is possible with the API to use the below domain and DNS related capabilities.

retrieve a list of all domains

with GET /domains you get back a list of domains.

curl -X GET "https://api.hosting.nl/domains?limit=100" -H "accept: */*" -H "API-TOKEN: ***token***"

register a domain name

POST /domains/register registers a domain name. Specify the client you want to register a domain name for with the clientid parameter.

curl -X POST "https://api.hosting.nl/domains/register" -H "accept: */*" -H "API-TOKEN: ***token***" -H "Content-Type: application/json" -H "X-CSRF-TOKEN: " -d "{\"clientid\":\"1234\",\"paymentmethod\":\"banktransfer\",\"domain\":\"example.com\",\"regperiod\":\"1\",\"registrantContactID\":\"6\",\"adminContactID\":\"7\",\"billingContactID\":\"8\",\"techContactID\":\"9\"}"

move a domain name

POST /domains/transfer moves a domain name. Specify the client for which you want to move a domain name with the clientid parameter.

curl -X POST "https://api.hosting.nl/domains/transfer" -H "accept: */*" -H "API-TOKEN: ***token***" -H "Content-Type: application/json" -H "X-CSRF-TOKEN: " -d "{\"clientid\":\"1234\",\"paymentmethod\":\"banktransfer\",\"domain\":\"example.com\",\"eppcode\":\"youreppcode\",\"registrantContactID\":\"6\",\"adminContactID\":\"7\",\"billingContactID\":\"8\",\"techContactID\":\"9\"}"

request information about a domain name

GET /domains/{domain} returns the details of a domain name.

curl -X GET "https://api.hosting.nl/domains/janjansen.nl" -H "accept: */*" -H "API-TOKEN: ***token***" -H "X-CSRF-TOKEN: "

update the details of a domain name

With PUT /domains/{id} modify the WHOIS data of a domain name.

retrieve the transfer token of a domain name

GET /domains/{domain}/getepp requests the move token of a domain name.In the example below, we request the move token of janjansen.nl.

curl -X GET "https://api.hosting.nl/domains/janjansen.nl/getepp" -H "accept: */*" -H "API-TOKEN: ***token***" -H "X-CSRF-TOKEN: "

query the availability of a domain name

Use GET /domains/{domain}/available to check if a domain name is available to be registered. In the example below, we check the availability of the domain name isthisdomainstillavailable.nl

curl -X GET "https://api.hosting.nl/domains/isditdomeinnogvrij.nl/available" -H "accept: */*" -H "API-TOKEN: ***token***" -H "X-CSRF-TOKEN: "

query a DNS zone

GET /domains/{domain}/dns to request the DNS zone of a domain name.In the example below, we request the entire DNS zone of domain name janjansen.nl.

curl -X GET "https://api.hosting.nl/domains/janjansen.nl/dns" -H "accept: */*" -H "API-TOKEN: ***token***" -H "X-CSRF-TOKEN: "

Modify an existing DNS record

PUT /domains/{domain}/dns to modify an existing DNS record. In the example below, we modify the record testing.janjansen.co.uk. testing.janjansen.nl has as DNS record id 634348 and we modify the DNS record to type A with the reference 192.168.2.1 and a TTL of 3600 and priority 0. Both the ID of the DNS record and the name of the DNS record to be modified must be specified.

curl -X PUT "https://api.hosting.nl/domains/janjansen.nl/dns" -H "accept: */*" -H "API-TOKEN: ***token***" -H "Content-Type: application/json" -H "X-CSRF-TOKEN: " -d "[{\"id\":634348,\"name\":\"testing.janjansen.nl\",\"type\":\"A\",\"content\":\"192.168.2.1\",\"ttl\":3600,\"prio\":0}]"

add a new DNS record to a zone

POST/domains/{domain}/dns to add a new DNS record to a zone. In the example below, we add a DNS A record for subdomain.janjansen.nl pointing to 192.168.2.1 with a TTL of 3600 and priority 0.

curl -X POST "https://api.hosting.nl/domains/janjansen.nl/dns" -H "accept: */*" -H "API-TOKEN: ***token***" -H "Content-Type: application/json" -H "X-CSRF-TOKEN: " -d "[{\"name\":\"subdomein.janjansen.nl\",\"type\":\"A\",\"content\":\"192.168.2.1\",\"ttl\":3600,\"prio\":0}]"

Delete a DNS record from a zone

DELETE /domains/{domain}/dns is used to delete a DNS record from a DNS zone. To delete a DNS record, you need the record id (see Retrieve DNS zone). In the example below, we remove DNS records with id 634348 and 672000 from the DNS zone of janjansen.nl.

curl -X DELETE "https://api.hosting.nl/domains/janjansen.nl/dns" -H "accept: */*" -H "API-TOKEN: ***token***" -H "Content-Type: application/json" -H "X-CSRF-TOKEN: " -d "[{\"id\":634348},{\"id\":672000}]"

Need help from one of our hosting gurus?

Do you need an urgent answer to a question or help from our support? Our hosting specialists are more than happy to assist you!

Customer Support Team

Our customer service is open until 18:00 hour

Of neem een kijkje in onze 'stap-voor-stap' support handleidingen.

View support articles