API Commands
[All Commands]

Command: Modify_DNS_Record



command Modify_DNS_Record

Add DNS record to zone.

Input Parameters ($data):

string ssid Token from Login
string domain Registered domain
array record
int id ID of existing record
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

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 (
      
'id' => 172,
      
'type' => 'MX',
      
'content' => 'smtp.another.com',
      
'prio' => 4,
      
'ttl' => 1800,
    ),
  ),
);

$response $client->__call("Modify_DNS_Record",$params);
INPUT: Array ( [data] => Array ( [ssid] => 51aca4e95c12821b56a9045babc943e7 [domain] => example.com [record] => Array ( [id] => 172 [type] => MX [content] => smtp.another.com [prio] => 4 [ttl] => 1800 ) ) ) OUTPUT: Array ( [status] => ok )

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