API Commands
[All Commands]

Command: Add_DNS_Record



Add DNS record to zone.

Input Parameters ($data):

string ssid Token from Login
string domain Registered domain
array record
string name Hostname (part of hostname, without registered domain)
string type Type of DNS record
string content Value of this record (IP address, hostname, text value etc.)
int prio Priority of this record (MX records only)
int ttl TTL value

Output Responses:

string status ok | error
array data Details about your request
 
string domain Registered domain for which records are returned

Sample:


<?php
$client 
= new SoapClient(
        
null
        array(
            
"location" => "https://PRODUCTION/cmd.php",
            
"uri" => "http://PRODUCTION/soap"
            
)
        );

$params = array ( 
    
"data" => array (
        
"login" => "demo",
        
"password" => "password",
    )
);

$response $client->__call("Login",$params);
$token $response["data"]["ssid"];

$params = array (
  
'data' => 
  array (
    
'ssid' => $token,
    
'domain' => 'example.com',
    
'record' => 
    array (
      
'name' => 'mail',
      
'type' => 'MX',
      
'content' => 'smtp.another.com',
      
'prio' => 3,
      
'ttl' => 900,
    ),
  ),
);

$response $client->__call("Add_DNS_Record",$params);
INPUT: Array ( [data] => Array ( [ssid] => 51aca4e95c12821b56a9045babc943e7 [domain] => example.com [record] => Array ( [name] => mail [type] => MX [content] => smtp.another.com [prio] => 3 [ttl] => 900 ) ) ) OUTPUT: Array ( [status] => ok [data] => Array ( [domain] => example.com [record_id] => 173 ) )

API Manual - version from 2023-05-12 12:15:50