Edit DNS Record

Description

Edit DNS record

Query

dns/edit

List Variable

Name Data Type Required/Optional Description
domain Varchar(255) Required Domain name
dnsid Integer(11) Required ID DNS
record Varchar(255) Required DNS record

Additional Parameters (type)

Type Name Data Type Required/Optional Description
A destination IPv4 Required on Type A example: 34.54.45.23
A class IN Required on Type A default IN
A ttl Integer Required on Type A example: 86400
AAAA destination IPv6 Required on Type AAAA example: fe80::76e5:43ff:fe12:26df
AAAA class IN Required on Type AAAA default IN
AAAA ttl Integer Required on Type AAAA example: 86400
CNAME destination varchar Required on Type CNAME domain destination
CNAME class IN Required on Type CNAME default IN
CNAME ttl Integer Required on Type CNAME example: 86400
MX destination Varchar Required on Type MX domain destination
MX preference Integer Required on Type MX preference based on mail server
MX class IN Required on Type MX default IN
MX ttl Integer Required on Type MX example: 86400
NS destination varchar Required on Type NS nameserver
NS class IN Required on Type NS default IN
NS ttl Integer Required on Type NS example: 86400
SRV destination varchar Required on Type SRV
SRV priority varchar Required on Type SRV
SRV weight Integer Required on Type SRV
SRV port Integer Required on Type SRV
SRV class Integer Required on Type SRV default IN
SRV ttl Integer Required on Type SRV example: 86400
TXT destination text Required on Type TXT text record
TXT class IN Required on Type TXT default IN
TXT ttl Integer Required on Type TXT example: 86400

Example:

$post["username"] = 'apiusername';
$post["password"] = hash('sha256','apipassword');
$post["domain"] = 'domain.co.id'
$post["dnsid"] = '34'
$url = 'http://[reseller url]/api/dns/edit';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
curl_close($ch);

Example Response

Succeed:

<?xml version="1.0" encoding="UTF-8"?>
<epp>
  <result>
    <resultCode>1000</resultCode>
    <resultMsg>Command Complete Succesfully</resultMsg>
  </result>
  <resultData/>
</epp>

Failed:

<?xml version="1.0" encoding="UTF-8"?>
<epp>
  <result>
    <resultCode>1001</resultCode>
    <resultMsg>Command Failed</resultMsg>
  </result>
</epp>