1. Home
  2. Docs
  3. Developer Guide
  4. API Manager
  5. Functions
  6. Account
  7. add

add

Functionaccount
To make use of the ‘add‘ Action, the following parameters must be sent:

    • key: Key authorized by Api administrator
    • action: add
    • domain: main domain associated with the account
    • user: username to create
    • pass: Password for the account
    • email: Email Address of the account owner
    • package: Create account with package
    • inode: Limit inodes, 0 for unlimited
    • limit_nproc: Limit number of processes for account, don’t use 0 as it will not allow any processes
    • limit_nofile: Limit number of open files for account
    • server_ips: Ip server

Possible answers:

    • status -> OK
    • status -> Error, msj -> Account already exists.

Example of code in php

$data = array(“key” => “MYKEY”,”action”=>’add’, ”domain”=>’MY_DOMAIN’, ”user”=>’USER’, ”pass”=>’PASSWORD’, ”email”=>’email@account’, ”package”=>’PACKAGE_NAME’, ”inode”=>’0’,”limit_nproc”=>’40’,”limit_nofile”=>’0’,”server_ips”=>’MY_IP_SERVER’);
$url = “https://IPSERVERAPI:2304/v1/account”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “POST”);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
curl_close($ch);
Was this article helpful to you? Yes 5 No 2