It doesn't add domain DNS to me via API

Hello, the API does not add the DNS domain to me via v-add-dns-domain, I am logged in with the administrator user and password.

This is what my script looks like

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://' . $hst_hostname . ':' . $hst_port . '/api/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS,  http_build_query(array(
     'user' => 'admin',
    'password' => 'Here is the administrator password',
    'returncode' => 'yes',
    'cmd' => 'v-add-dns-domain',
    'arg1' => $user_host,
    'arg2' => $domens,
	'ip' => $ip,
	'ns1' =>$ns1,
	'ns2' =>$ns2,
	'ns3' =>$ns3,
	'ns4' =>$ns4,
	'ns5' =>$ns5,
	'ns6' =>$ns6,
	'ns7' =>$ns7,
	'ns8' =>$ns8,
	'restart' =>'yes',
	'dnssec' =>'no'
$answer = curl_exec($curl);

How I checked var_dump(); gets something like this

string(1) "1" 

I even provided my DNS names that we use on domains, it adds the public IP address of the server, but still nothing is added, am I doing something wrong?

Try this raw command in CLI. If you get any error - than fix your arguments.

In the SSL console it works without any error.

It should return a 0 instead ay other code check the error log…

I have something like this in the error log

2023-09-21 20:14:04 v-list-dns-records ‘grobnet’ ‘’ [Error 3]

Then the domain already exists hard to know exactly…

Run the same command via command line…

But I remove the domain he adds from hestiacp

How to add v-add-dns-domain in the console and I provided all the data, i.e. username, domain and server IP address, it works

What version are you on. 1.8.8 should have support for 13 instead of the old limit of 9

I’m on the new version 1.8.8

Should be:

    'arg3' =>$ip,
	'arg4' =>$ns1,
	'arg5' =>$ns2,
	'arg6' =>$ns3,
	'arg7' =>$ns4,
	'arg8' =>$ns5,
	'arg9' =>$ns6,
	'arg10' =>$ns7,
	'arg11' =>$ns8,
	'arg12' =>'yes',
	'arg13' =>'no'
1 Like

Thank you for your answer, I solved the puzzle

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.