- Created by Documentation, last modified on Apr 09, 2018
Description
This function creates a cPanel account. The function also sets up the new account's domain information.
Note:
On servers that run CentOS 7, you may see a named
warning about the absence of SPF resource records on DNS.
- This warning is not relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records.
- Red Hat 7.1 and CentOS 7.1 both contain
bind-9.9.4-23.el7
, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/createacct?username=user&domain=example.com&plan=package_name&featurelist=default"a=0&password=12345luggage&ip=n&cgi=1&hasshell=1&contactemail=user%40seconddomain.com&cpmod=paper_lantern&maxftp=5&maxsql=5&maxpop=10&maxlst=5&maxsub=1&maxpark=1&maxaddon=1&bwlimit=500&language=en&useregns=1&hasuseregns=1&reseller=0&forcedns=1&mxcheck=local&max_email_per_hour=500&max_defer_fail_percentage=80
https://hostname.example.com:2087/cpsess##########/xml-api/createacct?username=user&domain=example.com&plan=package_name&featurelist=default"a=0&password=12345luggage&ip=n&cgi=1&hasshell=1&contactemail=user%40seconddomain.com&cpmod=paper_lantern&maxftp=5&maxsql=5&maxpop=10&maxlst=5&maxsub=1&maxpark=1&maxaddon=1&bwlimit=500&language=en&useregns=1&hasuseregns=1&reseller=0&forcedns=1&mxcheck=local&max_email_per_hour=500&max_defer_fail_percentage=80
whmapi0 createacct username=user domain=example.com plan=package_name featurelist=default quota=0 password=12345luggage ip=n cgi=1 hasshell=1 contactemail=user%40seconddomain.com cpmod=paper_lantern maxftp=5 maxsql=5 maxpop=10 maxlst=5 maxsub=1 maxpark=1 maxaddon=1 bwlimit=500 language=en useregns=1 hasuseregns=1 reseller=0 forcedns=1 mxcheck=local max_email_per_hour=500 max_defer_fail_percentage=80
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 0 documentation or run the
whmapi0 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi0
command:/usr/local/cpanel/bin/whmapi0
{ "result": [ { "options": { "nameserverentry3": null, "nameservera": null, "nameserver4": "", "ip": "192.168.0.1", "nameservera4": null, "nameserver": "ns1.example-host.com", "package": "package_name", "nameserver2": "ns2.example-host.com", "nameservera2": null, "nameserverentry4": null, "nameservera3": null, "nameserverentry2": null, "nameserverentry": null, "nameserver3": "" }, "statusmsg": "Account Creation Ok", "rawout": "<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Checking input data......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating system setup......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Rebuilding IP Pool...System has 0 free ips.\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating IP......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating Username......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating Contact Email......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Checking for database conflicts......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>WWWAcct 12.6.0 (c) 2014 cPanel, Inc....\n\nForced Dns is enabled.\n+===================================+\n| New Account Info |\n+===================================+\n| Domain: example.com\n| Ip: 192.168.0.1 (n)\n| HasCgi: y\n| UserName: user\n| PassWord: 12345luggage\n| CpanelMod: paper_lantern\n| HomeRoot: /home\n| Quota: 0 Meg\n| NameServer1: ns1.example-host.com\n| NameServer2: ns2.example-host.com\n| NameServer3: \n| NameServer4: \n| Contact Email: user@seconddomain.com\n| Package: package_name\n| Feature List: default\n| Language: en\n+===================================+\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding User...Adding Shell Access (y)\nSuccess...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding Entries to userdata......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating the userdata cache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Mail & Local Domains...locDOComains...valiases ...vdomainaliases...vfilters......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Configuring DNS...Bind reconfiguring on sarah using rndc\nZone example.com has been successfully added\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating Authentication Databases......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding Entries to httpd.conf......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Restarting apache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting passwords...Password for "user" has been changed.\nUpdating FTP passwords for user\nFTP password files updated.\nFTP vhost passwords synced\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating the dedicated IP address usage cache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Verifying MX Records and Setting up Databases...Reconfiguring Mail Routing:\n<ul><li>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for example.com's mail.:<br /> This configuration has been manually selected.<br /><br /></li></ul>...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Proxy Subdomains......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\nBind reloading on sarah using rndc zone: [example.com]\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Sending Account Information......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\nSystem has 0 free ips.\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\nwwwacct creation finished\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Domain Pointers......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting Reseller Privs......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Account Creation Complete!!!...Account Creation Ok...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n", "status": 1 } ] }
<createacct> <result> <options> <ip>192.168.0.1</ip> <nameserver>ns1.example-host.com</nameserver> <nameserver2>ns2.example-host.com</nameserver2> <nameserver3/> <nameserver4/> <nameservera/> <nameservera2/> <nameservera3/> <nameservera4/> <nameserverentry/> <nameserverentry2/> <nameserverentry3/> <nameserverentry4/> <package>package_name</package> </options> <rawout> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Checking input data......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating system setup......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Rebuilding IP Pool...System has 0 free ips. ...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating IP......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating Username......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating Contact Email......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Checking for database conflicts......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>WWWAcct 12.6.0 (c) 2014 cPanel, Inc.... Forced Dns is enabled. +===================================+ | New Account Info | +===================================+ | Domain: example.com | Ip: 192.168.0.1 (n) | HasCgi: y | UserName: user | PassWord: 12345luggage | CpanelMod: paper_lantern | HomeRoot: /home | Quota: 0 Meg | NameServer1: ns1.example-host.com | NameServer2: ns2.example-host.com | NameServer3: | NameServer4: | Contact Email: user@seconddomain.com | Package: package_name | Feature List: default | Language: en +===================================+ ...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding User...Adding Shell Access (y) Success...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding Entries to userdata......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating the userdata cache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Mail & Local Domains...locDOComains...valiases ...vdomainaliases...vfilters......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Configuring DNS...Bind reconfiguring on sarah using rndc Zone example.com has been successfully added ...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating Authentication Databases......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding Entries to httpd.conf......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Restarting apache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting passwords...Password for "user" has been changed. Updating FTP passwords for user FTP password files updated. FTP vhost passwords synced ...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating the dedicated IP address usage cache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Verifying MX Records and Setting up Databases...Reconfiguring Mail Routing: <ul><li>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for example.com's mail.:<br /> This configuration has been manually selected.<br /><br /></li></ul>...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Proxy Subdomains......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> Bind reloading on sarah using rndc zone: [example.com] <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Sending Account Information......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> System has 0 free ips. <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> wwwacct creation finished <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Domain Pointers......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting Reseller Privs......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Account Creation Complete!!!...Account Creation Ok...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table> </rawout> <status>1</status> <statusmsg>Account Creation Ok</statusmsg> </result> </createacct>
Parameters
Parameter | Type | Description | Possible values | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
username | string | Required The new account's username. | A valid cPanel username. cPanel usernames must adhere to the following guidelines:
The number of characters that usernames may contain depends on the cPanel & WHM version that the server runs:
Notes:
| username | ||||||||
domain | string | Required The account's main domain. | A valid domain name. | example.com | ||||||||
plan | string | The account's hosting plan. This parameter defaults to the | A hosting plan (package) name on the server. Important: If you supply a | package_name | ||||||||
pkgname | string | A new plan name, to save unique account settings as a new plan.
| A valid plan (package) name. | my_new_package | ||||||||
savepkg | Boolean | Whether to save the new account's settings as a new plan. This parameter defaults to |
| 1 | ||||||||
featurelist | string | The account's feature list. If you do not use this parameter, the function assigns the | A valid feature list name on the server. | feature_list | ||||||||
quota | integer | The account's disk space quota. This parameter defaults to |
| 500 | ||||||||
password | string | Required The account's password. | A secure password. | 12345luggage | ||||||||
ip | string | Whether the account possesses a dedicated IP address. This parameter defaults to |
| n | ||||||||
cgi | Boolean | Whether CGI access is enabled for the account. This parameter defaults to |
| 1 | ||||||||
spamassassin
| Boolean | Whether Apache SpamAssassin™ is enabled for the account. This parameter defaults to Note: We introduced this parameter in cPanel & WHM version 70. |
| 1 | ||||||||
frontpage | Boolean | Whether Microsoft® FrontPage Extensions are enabled for the account. Note: cPanel & WHM will ignore all FrontPage settings and parameters if either of the following statements is true:
|
| 0 | ||||||||
hasshell | Boolean | Whether shell (SSH) access is enabled for the account. This parameter defaults to |
| 1 | ||||||||
contactemail | string | The account's contact email address. | A valid email address. |
secondomain.com | ||||||||
cpmod | string | The account's cPanel theme. This parameter defaults to the server's default cPanel theme. |
| paper_lantern | ||||||||
maxftp | string | The account's maximum number of FTP accounts. This parameter defaults to |
| unlimited | ||||||||
maxsql | string | The account's maximum number of each available type of SQL database. For example, if you set this value to This parameter defaults to |
| unlimited | ||||||||
maxpop | string | The account's maximum number of email accounts. This parameter defaults to |
| unlimited | ||||||||
maxlst | string | The account's maximum number of mailing lists. This parameter defaults to |
| unlimited | ||||||||
maxsub | string | The account's maximum number of subdomains. This parameter defaults to |
| unlimited | ||||||||
maxpark | string | The account's maximum number of parked domains (aliases). This parameter defaults to |
| unlimited | ||||||||
maxaddon | string | The account's maximum number of addon domains. This parameter defaults to |
| unlimited | ||||||||
bwlimit | string | The account's maximum bandwidth use. This parameter defaults to |
| unlimited | ||||||||
customip | string | The account's IP address. If you do not specify a value, the system automatically determines the account's IP address. | A valid IP address. | 10.0.0.1 | ||||||||
language | string | The account's default locale. This value defaults to the server's default locale. | A two-letter ISO-3166 code. |
| ||||||||
useregns | Boolean | Whether to use registered nameservers for the domain. This value defaults to Important: If you set this parameter to |
| 0 | ||||||||
hasuseregns | Boolean | A legacy parameter. Important: Only include this parameter if you set a | 1 | 1 | ||||||||
reseller | Boolean | Whether to grant the account reseller privileges. This parameter defaults to |
| 0 | ||||||||
forcedns | Boolean | Whether to overwrite an existing DNS zone with the new account's information, if a matching DNS zone already exists. This parameter defaults to |
| 0 | ||||||||
mxcheck | string | The account's main mail exchanger's type. Note: The function does not configure the primary MX entry to point to the appropriate exchanger. You must perform this function separately. This parameter defaults to |
| auto | ||||||||
| integer | The maximum number of emails that the account can send in one hour. This parameter defaults to Note: This parameter is only available in cPanel & WHM version 11.32+. |
| unlimited | ||||||||
| integer | The percentage of failed or deferred email messages that the account can send per hour before outgoing mail is rate-limited. Note: This parameter is only available in cPanel & WHM version 11.32+. |
| unlimited | ||||||||
uid | integer | The account's user ID. Notes:
| A positive integer that is not already associated with disk usage, and that does not already exist on the server. | 123456789 | ||||||||
gid | integer | The account's group ID. Notes:
| A positive integer that is not already associated with disk usage, and that does not already exist on the server. | 123456789 | ||||||||
homedir | string | The account's home directory. If you do not specify a value, the system uses the Notes:
| The absolute path to a location on the server. | /home/user |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
options | hash | A hash of account options. | This hash includes the nameserver , nameserver* , nameservera* , nameserverentry* , and ip returns. | |
| string | The account's primary nameserver. The function returns this value in the | A valid nameserver. | ns1.example-host.com |
| string | The account's additional nameservers, where The function returns these values in the | A valid nameserver. | ns2.example-host.com |
| string | The account's nameservers' IP addresses, where The function returns these values in the | A valid IP address. | 10.0.0.1 |
| string | The nameserver's DNS name, where The function returns these values in the | A valid DNS entry name. | dnsentry1 |
| string | The account's primary nameserver's IP address. The function returns this value in the | A valid IPv4 address. | 10.0.0.1 |
| string | The account's plan (package) name. The function returns this value in the | A valid package name. | package_name |
rawout | string | Raw output from the account creation operation. | One or more messages that may contain HTML code. | Click to view... <table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Checking input data......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating system setup......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Rebuilding IP Pool...System has 0 free ips.\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating IP......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating Username......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Validating Contact Email......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Checking for database conflicts......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>WWWAcct 12.6.0 (c) 2014 cPanel, Inc....\n\nForced Dns is enabled.\n+===================================+\n| New Account Info |\n+===================================+\n| Domain: example.com\n| Ip: 192.168.0.1 (n)\n| HasCgi: y\n| UserName: user\n| PassWord: 12345luggage\n| CpanelMod: paper_lantern\n| HomeRoot: /home\n| Quota: 0 Meg\n| NameServer1: ns1.example-host.com\n| NameServer2: ns2.example-host.com\n| NameServer3: \n| NameServer4: \n| Contact Email: user@seconddomain.com\n| Package: package_name\n| Feature List: default\n| Language: en\n+===================================+\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding User...Adding Shell Access (y)\nSuccess...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding Entries to userdata......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating the userdata cache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Mail & Local Domains...locDOComains...valiases ...vdomainaliases...vfilters......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Configuring DNS...Bind reconfiguring on sarah using rndc\nZone example.com has been successfully added\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating Authentication Databases......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Adding Entries to httpd.conf......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Restarting apache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting passwords...Password for “user” has been changed.\nUpdating FTP passwords for user\nFTP password files updated.\nFTP vhost passwords synced\n...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Updating the dedicated IP address usage cache......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Verifying MX Records and Setting up Databases...Reconfiguring Mail Routing:\n<ul><li>LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for example.com's mail.:<br /> This configuration has been manually selected.<br /><br /></li></ul>...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Proxy Subdomains......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\nBind reloading on sarah using rndc zone: [example.com]\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Sending Account Information......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\nSystem has 0 free ips.\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\nwwwacct creation finished\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting up Domain Pointers......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Setting Reseller Privs......Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n<table style="border-bottom: 1px #ccc dotted;"><tr><td width="100%"><pre>Account Creation Complete!!!...Account Creation Ok...Done</pre></td><td width="30"><img align=absmiddle src="/cPanel_magic_revision_1370377684/cjt/images/icons/success.png"></td></tr></table>\n
|
status | Boolean | Whether the function succeeded. |
| 1 |
statusmsg | string | A message of success or a reason for failure. |
| Account Creation Ok |
Function information
API Version:
WHM API 1 Equivalent:
Important:
We strongly recommend that you use WHM API 1. WHM API 0 is deprecated.
Available in:
WHM 11.32+
Methods:
GET, POST
Required Parameters:
username
, domain
, password
Return Formats:
About WHM API 0
Warning:
WHM API 0 is deprecated. We strongly recommend that you use the equivalent WHM API 1 function instead.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 0 Sections - Accounts — Account functions allow you to manage cPanel accounts, WHM accounts, and their settings.
-
Page:WHM API 0 Functions - accountsummary — This function retrieves a user's account summary.
-
Page:WHM API 0 Functions - domainuserdata — This function retrieves domain data.
-
Page:WHM API 0 Functions - editquota — This function modifies a user's disk quota.
-
Page:WHM API 0 Functions - limitbw — This function modifies a cPanel account's bandwidth quota.