This function creates a hosting account and sets up it's associated domain information.
- username (string)
-
User name of the account. Ex: user
- domain (string)
-
Domain name. Ex: domain.tld
- plan (string)
-
Package to use for account creation. Ex: reseller_gold
- pkgname (string)
-
Name of a new package to be created based on the settings used. Ex: reseller_silver
- savepkg (boolean)
-
Save the settings used as a new package. (1 = yes, 0 = no)
- featurelist (string)
-
Name of the feature list to be used when creating a new package. Ex: no_ftp_100mb_gold
- quota (integer)
-
Disk space quota in MB. (0-999999, 0 is unlimited)
- password (string)
-
Password to access cPanel. Ex: p@ss!w0rd$123
- ip (string)
-
Whether or not the domain has a dedicated IP address. (y = Yes, n = No)
- cgi (string)
-
Whether or not the domain has cgi access. (y = Yes, n = No)
- frontpage (string)
-
Whether or not the domain has FrontPage extensions installed. (y = Yes, n = No)
- hasshell (string)
-
Whether or not the domain has shell / ssh access. (y = Yes, n = No)
- contactemail (string)
-
Contact email address for the account. Ex: user@otherdomain.tld
- cpmod (string)
-
cPanel theme name. Ex: x3
- maxftp (string)
-
Maximum number of FTP accounts the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- maxsql (string)
-
Maximum number of SQL databases the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- maxpop (string)
-
Maximum number of email accounts the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- maxlst (string)
-
Maximum number of mailing lists the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- maxsub (string)
-
Maximum number of subdomains the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- maxpark (string)
-
Maximum number of parked domains the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- maxaddon (string)
-
Maximum number of addon domains the user can create. (0-999999 | unlimited, null | 0 is unlimited)
- bwlimit (string)
-
Bandiwdth limit in MB. (0-999999, 0 is unlimited)
- customip (string)
-
Specific IP address for the site.
- language (string)
-
Language to use in the account's cPanel interface. (ex. spanish-utf8)
- useregns (boolean)
-
Use the registered nameservers for the domain instead of the ones configured on the server. (1 = Yes, 0 = No)
- hasuseregns (boolean)
-
Set to 1 if you are using the above option.
- reseller (boolean)
-
Give reseller privileges to the account. (1 = Yes, 0 = No)
- createacct
-
Account crreation container
- result
-
Operation results container
- options
-
Domain options container
- ip (string)
-
IP address the domain is associated with. Ex: 123.456.789.10
- nameserver | nameserverx
-
Nameserver for the domain. (1 < x < 5)
- nameservera | nameserverax
-
IP address of the nameserver. (1 < x < 5)
- nameserverentry | nameserverentryx
-
DNS name of the namservers (if using registered nameservers). (1 < x < 5)
- rawout (HTML)
-
Raw output of creation operation
- status (boolean)
-
Status of the operation. (1 = Success, 0 = Failure)
- statusmsg (string)
-
Status or Error Message
Calling this URL in WebHost Manager:
/xml-api/createacct?username=myuser&plan=basic&ip=0&cpmod=x3&password=h@rd2gu3ss!p@ss&contactemail=ben@ben.com&domain=domain.tld&useregns=0&reseller=0
will produce something similar to :
<createacct>
<result>
<options>
<ip>198.66.92.67</ip>
<nameserver>ns1.cpaneldev.net</nameserver>
<nameserver2>ns2.cpaneldev.net</nameserver2>
<nameserver3/>
<nameserver4/>
<nameservera/>
<nameservera2/>
<nameservera3/>
<nameservera4/>
<nameserverentry/>
<nameserverentry2/>
<nameserverentry3/>
<nameserverentry4/>
<package>basic</package>
</options>
<rawout>
Checking input data...The ProFTPd configuration file /etc/proftpd.conf appears to be ok!
...Done
WWWAcct 12.0 (c) 1997-2007 cPanel, Inc....
+===================================+
| New Account Info |
+===================================+
| Domain: domain.tld
| Ip: 198.66.92.67 (n)
| HasCgi: n
| UserName: myuser
| PassWord: h@rd2gu3ss!p@ss
| CpanelMod: x3
| HomeRoot: /home
| Quota: 500 Meg
| NameServer1: ns1.cpaneldev.net
| NameServer2: ns2.cpaneldev.net
| NameServer3:
| NameServer4:
| Contact Email: ben@ben.com
| Package: basic
+===================================+
...Done
Adding User...Changing password for myuser
Password for myuser has been changed
...Done
Removing Shell Access (n)...Changing shell for myuser.
Shell changed.
...Done
Copying skel files from /home/szodjo/cpanel3-skel/ to /home/myuser/......Done
Using Quota v3 Support
Adding Entries to httpd.conf......Done
Configuring DNS...Bind reconfiguring on server1 using rndc
...Done
Restarting apache......Done
Updating Authentication Databases...Updating ftp passwords for myuser
Ftp password files updated.
Ftp vhost passwords synced
...Done
Sending Account Information......Done
Running post creation scripts......Done
wwwacct creation finished
Setting up Domain Pointers......Done
Setting Reseller Privs......Done
<br /><b>Account Creation Complete!!!</b><br />
</rawout>
<status>1</status>
<statusmsg>Account Creation Ok</statusmsg>
</result>
Copyright 2007 cPanel Inc.