Introduction

What is this document?

This is the API documentation for Radix. This document is intended to help you communicate with the Radix API for domain provisioning and account operations.

What is Radix?

Radix is a domain registrar accredited by the Nigeria Internet Registration Association (NIRA) to provide .NG Country Code Top-Level Domain (ccTLD) extensions. Radix provides you with a RESTful API to enable you carry out actions such as domain registration, domain renewal, domain privacy protection request and account balance request.

Requirements

No installation is required. However, you may need to install some libraries to enable you communicate with Radix. Communication with Radix is as simple as making request to the end points of the resource you wish to access. Depending on your system, you may require additional libraries to be able to make HTTP requests to Radix. For PHP users, check with your hosting provider to see if you have cURL installed and running. Python users may make use of ‘Request’.

What we use

Radix API is built on the REST principle. Rest is a stateless, client-server communication protocol. It is implemented using the HTTP protocol. This means each request for a resource along with its response is completely independent of any possible past or future request between both parties. For more information on what Rest is and it’s usage, kindly refer to this article on wikipedia.

Currently, All requests made to Radix must be made utilising the POST method unless specifically stated otherwise in the documentation for the particular resource.

Response

Responses from Radix are sent in JSON. The response object is made up of two parts: the status and the message. The status contains a boolean that indicates if a request was successful or not. In addition, a status code is also returned along with the response.Kindly refer to the error reference for the list of status codes and their meanings.

Format

  • Request
  • Response (status codes...)

#Sample response
{
	"status": Boolean,
	"data":{}
}

Authentication

All requests made to Radix requires authentication. For authentication, you require a combination of a username and an API key to create a unique hash. Your username is the e-mail address that is attached to your account while the API key can be gotten from your Radix account. Ensure that you have activated your API key before making any request with it. Follow the steps below in creating a hash for your request. Alternatively, you can refer to the pseudo-code for help on implementation in your prefered programming language.

  • Ensure you have your username (email address) and API key available
  • Generate the current timestamp (unix)
  • Create an HMAC - MD5 hash of the current timestamp and the API key.
  • For instructions on how to generate an hmac hash, kindly refer to this article.
  • Concatenate the hash generated from the step above with the timestamp used in creating the hash using ':' as the delimiter.
  • The final key should be in in format - timestamp:hash

The above hash should be labelled as the password while your email address should be the labeled as the username when making a request to Radix.

Authentication in Pseudo-Code


var username = your registration email address;
var apikey = get from radix dashboard;
var timeStamp = time();
var hash = hmac_hash(  apiKey + timeStamp );
var auth = timeStamp + ‘:’ + hash;

Request

The base url for the API is ‘api.radix.ng’. All requests require an inclusion of the authentication credentials among the list of parameters. Kindly refer to the authentication section for instructions on how to generate your username – u and password – p.

The term 'object' may sometimes be used to refer to either/all of 'domain', 'contact' or 'host' a.k.a. nameserver. Therefore, the interpretation of the term should be based on the context within which it was used.

The following terms were used in this document:

  • Registry: This refers to the body that is responsible for issuing licenses to independent organisations operating as accredited registrars of a top level domain extension.
  • Registrar: This is an independent organisation that has been granted license to create and manage objects in the central repository of a Top-Level Domain (TLD) registry
  • Registrant: This refers to any individual or organisation that pays for the registration and hence has evidence of ownership of a domain name in the .NG namespace.

Base url: https://api.radix.ng/

Contacts

Registration

'/contact/register/'

Registers a contact with the provided information. All provided information would be publicly available on a whois lookup of the domain. However, we offer a privacy protection service which would hide the information provided from the public. You can find out more about that here. Ensure that only correct, verifiable information are provided. We reserve the right to suspend any domain that we can substantially prove to be registered with false contact information for any of the associated contact.

Parameters

firstname:
string - required The first name of the contact
lastname:
string - optional The last name of the contact
address:
string - required The address of the contact
org:
string - required The organisation that the contact belongs to
city:
string - required
state:
string - required
country:
string (Country Code, eg. UK) - required
postcode:
integer - required
email:
string - required This email is going to be used the username during login
phone:
string - required

Response: A contact handle would be returned upon successful contact creation. This handle would be used in referring to this contact during contact update and domain name registration.


curl "https://api.radix.ng/contact/register/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "firstname": "", "lastname": "", "address": "", "org": "", "city": "", "state": "", "country": "", "postcode": "", "email": "", "phone": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/contact/register/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"firstname" => "",
			"lastname" => "",
			"address" => "",
			"org" => "",
			"city" => "",
			"state" => "",
			"country" => "",
			"postcode" => "",
			"email" => "",
			"phone" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


# Object Response
{
	"status":true,
	"data":{
		"id": "1450883683DBgpq"
	}
}

Update

'/contact/update/'

Updates an existing contact information. The same information as provided during contact creation would be required here. However, in addition to the already existing parameters, the contact handle is also required.

Parameters

handle:
string - required Contact handle returned for this contact when the contact was created.

curl "https://api.radix.ng/contact/update/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "handle": "" }' \ 
-X POST

#Object Response
{
	"status":true,
	"data":{
		"contact_id":"1450883683DBgpq"
	}
}

Retreival

'/contact/'

Updates an existing contact information. The same information as provided during contact creation would be required here. However, in addition to the already existing parameters, the contact handle is also required.

Parameters

handle:
string - required Contact handle returned for this contact when the contact was created.

curl "https://api.radix.ng/contact/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "handle": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/contact/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"handle" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{
		"contact":{
			"status":"ok",
			"handle":"1450883683DBgpq",
			"name":"John Doe",
			"firstname":"John",
			"lastname":"Doe",
			"org":"Company Inc.",
			"address":"23, Any Stree NE",
			"city":"Any Town",
			"country":"US",
			"email":"johndoe@company.com",
			"phone":"4567894321",
			"crDate":"2015-12-23"
		}
	}
}

Nameserver

Create

'/host/register/'

Registers a new nameserver

Parameters

host:
url - required the address of the nameserver that fiks to be registered
ipv4:
(array) IP - optional The actual IP of the nameserver (IP version 4)
ipv6:
(array) IP - optional The actual IP of the nameserver (IP version 6)

Response: Upon successful creation, a handle would be returned. This handle would be used whenever this nameserver needs to be referred to.


curl "https://api.radix.ng/host/register/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "host": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/host/register/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"host" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{
		"Host":{
			"host":"ns3.domain.ng",
			"ipv4":["12.16.254.1"],
			"ipv6":["2001:db8:0:1234:0:567:8:1"]
		}
	}
}

Update

'/host/update/'

Registers a new nameserver

Parameters

Same as in host creation.


curl "https://api.radix.ng/host/update/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "handle": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/host/update/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"handle" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{
		"Host":"Nameserver was successfully updated"
	}
}

Domain

Register

'/domain/register/'

Parameters

domain:
URI - required Full domain name (including extension) to be registered. A domain name must not exceed 250 characters
duration:
integer - required Duration of domain name registration. The maximum is 5 years.
ns:
(array) url - required The name server that would be used in resolving the domain to an IP. A maximum of 2 nameservers may be provided for this purpose. It is required that the nameserver provided is already registered through Radix. Click here for instructions on how to register a nameserver. For name nameservers with a .NG extension
contact:
(array) string - required Contact IDs representing each administrator of the domain. The contact ID is required to refer to contacts that have already been registered. Refer to instructions on how to register a contact.

curl "https://api.radix.ng/domain/register/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "", "duration": "", "ns": {"","",""}, "contact": {"","",""} }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/register/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => "",
			"duration" => "",
			"ns" => array(),
			"contact" => array()
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{
		"domain":"domain.ng",
		"duration":"1"
	}
}

Domain Information

'/domain/info/'

Fetches information on a domain

Parameters

domain:
Refer to the note on domain above.

Refer to the response note on the creation of a domain name above.


curl "https://api.radix.ng/domain/info/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/epp/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{
		"domain":{
			"roid":"64445-CoCCA",
			"name":"anotherdomain.ng",
			"status":[
				"ok"
				],
			"epp":"HASH",
			"contacts":{
				"billing":"1452011480Czoat",
				"admin":"1452011480Czoat",
				"tech":"1452011480Czoat",
				"registrant":"1452011481efLwW"
			},
			"ns":[
				"ns1.domain.ng",
				"ns2.domain.ng"
				],
			"created":"2016-02-16 15:32:25",
			"expiry":"2016-02-16 15:32:25",
			"updated":"2016-02-16 15:32:25"
		}
	}
}

Renew

'/domain/renew/'

Registers a domain

Parameters

domain:
URI - required Full domain name to be renewed. Only domains registered on radix can be renewed on Radix. For domains registered with other registrars
duration:
int - required Duration in years for which the expiry date of the domain is to be extended. Kindly note that at any single point

Refer to the response note on the creation of a domain name above.


curl "https://api.radix.ng/domain/renew/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": ", "duration": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/renew/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => "",
			"duration" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{
		"domain":"domain.ng",
		"duration":"1"
	}
}

Update Domain Nameserver

'/domain/update/nameserver/'

It updates the nameserver/host that is used in resolving a domain name. For details on how this works, kindly refer to the this article. The restriction on the nameserver parameter at the point of creation still holds.

Parameters

domain:
Refer to the note on domain above.
ns:
(array) url - required The name servers that should be used to replace the existing nameservers. Note: The restrictions on nameservers at domain creation also applies here.

curl "https://api.radix.ng/domain/update/nameserver/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "", "ns": {"","",""} }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/renew/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => "",
			"ns" => array()
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":"Name server successfully updated"
}

EPP code

'/domain/epp/'

The EPP is a secret code that gives a registrant rights over a domain. It is only with this code that actions such as transfer of domain between registrars can be made possible. It must be kept secret.

Parameters

domain:
Refer to the note on domain above.

Refer to the response note on the creation of a domain name above.


curl "https://api.radix.ng/domain/epp/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/epp/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":"Radix-145770083"
}

Transfer

'/domain/transfer/'

Transfers a domain

Parameters

Domain:
Refer to the note on domain above
key:
string - required Also referred to as the EPP code. This is a special key that authorises the release of the domain by the withholding registrar. This key is made available to the domain owner (registrant) by the party through which the domain was registered ().
duration:
integer - optional Duration in years (usually one year) for which the domain is to be renewed upon registration. Although optional

Refer to the response note on the creation of a domain name above.


curl "https://api.radix.ng/domain/transfer/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "key": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/transfer/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"key" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{
		"domain":"domain.ng"
	}
}

Lock Domain

'/domain/lock/'

It places a restriction on the registrant’s right to transfer a domain. This is necessary in order to prevent a registrant from accidentally moving a domain or in situation where some information might be required by the withholding registrar.

Parameters

domain:
Refer to the note on domain above.

A new status - clientTransferProhibited would be added to the list of stati for the domain.


curl "https://api.radix.ng/domain/lock/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/lock/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{
		"domainName":"johndoe.ng"
	}
}

Unlock Domain

'/domain/unlock/'

It removes the restriction initally placed on the domain by the 'lock' action.

Parameters

domain:
Refer to the note on domain above.

The status - clientTransferProhibited would be removed from the list of stati for the domain.


curl "https://api.radix.ng/domain/unlock/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/domain/lock/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{
		"domainName":"johndoe.ng"
	}
}

DNS and Zone Records

Create DNS

'/dns/create/'

Creates a domain's DNS file on the DNS server.

Parameters

domain:
URI - required The domain name to add to DNS Server.
ip:
SOA Address - required An IP is required for the DNS SOA

curl "https://api.radix.ng/dns/create/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "", "ip": "" ' \ 
-X POST



try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/dns/create/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => "",
			"ip" => "",
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}


{
	"status":true,
	"data":{}
}

Delete DNS

'/dns/delete/'

Deletes a domain's DNS file from the DNS server.

Parameters

domain:
URI - required Full domain name (including extension) to be removed.

curl "https://api.radix.ng/dns/delete/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/dns/delete/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{}
}

Create Zone Record

'dns/zone/add/'

Adds a new zone record to a domains DNS file

Parameters

domain:
URI - required The domain name to add to Zone Record to, must be registered in your account and also a DNS Record must have been created before adding zone records.
name:
URI - required A valid domain name or hostname. If you are entering a domain name, you need to include a trailing period. Eg domain.com.ng.
ttl:
Intiger value - required You need to set TTL of 3600 (1hr) - 86400 (24hrs), please do not set anything lower or higher to avoid hiccups.
type:
Record Type - required The type of Zone Record you wish to add. Each record has required paramerters described below. The supported Records are:
  • A
  • CNAME
  • TXT
  • MX
  • SRV
  • PTR
Additional paramers are required for each type, see below.

A: +Parameters

address:
IP - required The zone record's IPv4 address.

CNAME: +Parameters

cname:
URI - required The canonical name (CNAME) alias. eg.

TXT: +Parameters

txtdata:
string - required The TXT record's data. Surround this string with quotes ("").
unencoded:
boolean - optional Whether the TXT record's data is encoded.
  • 1 = Encoded.
  • 0 = Not Encoded.

MX: +Parameters

preference:
integer - required The record's preference. 0 as the highest priorty.
exchange:
URI - required The mail server's location (CNAME).

SRV: +Parameters

priority:
integer - required The target host's preference. 0 as the highest priorty.
weight:
intiger - required A relative weight. The system uses this value to rank entries with the same priority value.
port:
intiger - required The target host's port.
target:
URI - required A valid hostname. eg. host.domain.com.ng

PTR: +Parameters

ptrdname:
string - required A pointer to a canonical name (CNAME).

curl "https://api.radix.ng/dns/zone/add/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST



try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/dns/zone/add/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{}
}

List Zone Records

'dns/zone/list/'

Fetch all the zone records from the DNS Server for your domain.

Parameters

domain:
URI - required The domain name to fetch all zone records for. This domain must be registered in your account and the dns-record must have been created for it.

curl "https://api.radix.ng/dns/zone/list/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/dns/zone/list/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{}
}

Update Zone Record

'dns/zone/update/'

Updates a Zone Record on the DNS server

Parameters

domain:
URI - required The domain name to add to Zone Record to, must be registered in your account and the zone-record must have been created updating. To effectively use this, Run the `dns/zone/list` to lacate the line corresponding to the data you want to edit.
line:
intiger - required The zone record's file line number. This is a pointer to know what to change in the DNS Server instead of adding a new record. domain.com.ng.
name:
URI - required A valid domain name or hostname. If you are entering a domain name, you need to include a trailing period. Eg domain.com.ng.
ttl:
Intiger value - required You need to set TTL of 3600 (1hr) - 86400 (24hrs), please do not set anything lower or higher to avoid hiccups.
type:
Record Type - required The type of Zone Record you wish to add. Each record has required paramerters described below. The supported Records are:
  • A
  • CNAME
  • TXT
  • MX
  • SRV
  • PTR
Additional paramers are required for each type, see add above.

curl "https://api.radix.ng/dns/zone/update/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/dns/zone/update/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{}
}

Delete Zone Record

'dns/zone/delete/'

Deletes a domain's zone record from the DNS server

Parameters

line:
int The DNS zone record file's line number. You can obtain this from the `/dns/zone/list` request on the API.
zone:
hostname The zone record you wish to remove, in full including the trailing period "."
serialnum:
int

curl "https://api.radix.ng/dns/zone/delete/" \
-H "Content-Type: application/json" \
-d '{"user": "REGISTERED_EMAIL", "pass": "HASH", "domain": "" }' \ 
-X POST

try{
	$connection = curl_init();
	curl_setopt_array($connection, array(
		CURLOPT_RETURNTRANSFER => 1,
		CURLOPT_URL => 'https://api.radix.ng/dns/zone/delete/',
		CURLOPT_POST => 1,
		CURLOPT_POSTFIELDS => array(
			"user" => "",
			"pass" => "",
			"domain" => ""
	    )
	));

	$response = curl_exec($connection);
	if($response === false) 
		die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
	curl_close($connection);

	$useableData = json_decode($response);
}
catch(Exception $e){
	die('Error: "' . $e->getMessage());
}

#Response
{
	"status":true,
	"data":{}
}