Description

This function creates a cPanel account.

 The function also sets up the new account's domain information.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/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




https://hostname.example.com:2087/cpsess##########/xml-api/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




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



{
   "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

ParameterTypeDescriptionPossible valuesExample
usernamestring

Required

The new account's username.

A valid cPanel username. cPanel usernames must adhere to the following guidelines:

  • The first eight characters of usernames must be unique.
  • Usernames cannot begin with a number, or the string test.

The number of characters that usernames may contain depends on the cPanel & WHM version that the server runs:

VersionCharacters
11.38 and earlierEight characters or less.
11.40 through 11.42
  • Eight characters or less with database prefixing.
  • 16 characters or less without database prefixing.
11.44 and later16 characters or less.


  • You can use the Cpanel::Validate::Username Perl module to validate usernames before you call this function. For more information, read the /usr/local/cpanel/Cpanel/Validate/Username.pod file.
  • The system automatically converts this value to all lowercase letters.
  • In cPanel & WHM version 11.56 and newer, MySQL's unique character limit requirement does not exist on servers that use MariaDB.


username
domainstring

Required

The account's main domain.

A valid domain name.example.com
planstring

The account's hosting plan.

This parameter defaults to the default plan.

A hosting plan (package) name on the server.

If you supply a plan value, do not use the optional quota-related parameters. Instead, allow the account's plan to determine these values.


package_name
pkgnamestring

A new plan name, to save unique account settings as a new plan.

  • If you do not use this parameter but specify 1 for the savepkg value, the system will generate a plan name.
  • If you do not use this parameter and specify 0 or do not use the savepkg parameter, the function does not save a new plan.
A valid plan (package) name.my_new_package
savepkgBoolean

Whether to save the new account's settings as a new plan.

This parameter defaults to 0.

  • 1 — Save.
  • 0 — Do not save.
1
featureliststring

The account's feature list.

If you do not use this parameter, the function assigns the default feature list to the account.

A valid feature list name on the server.feature_list
quotainteger

The account's disk space quota.

This parameter defaults to 0 (unlimited).

  • A positive integer between one and 999,999 that represents the maximum disk space that the account may use, in Megabytes (MB).
  • 0 — The account's disk space is unlimited.
500
passwordstring

Required

The account's password.

A secure password.12345luggage
ipstring

Whether the account possesses a dedicated IP address.

This parameter defaults to n.

  • y — The account possesses a dedicated IP address.
  • n — The account does not possess a dedicated IP address.
n
cgiBoolean

Whether CGI access is enabled for the account.

This parameter defaults to 1.

  • 1 — Enabled.
  • 0 — Disabled.
1
spamassassin Boolean

Whether Apache SpamAssassin™ is enabled for the account.

This parameter defaults to 1.


We introduced this parameter in cPanel & WHM version 70.


  • 1 — Enabled.
  • 0 — Disabled.
1
frontpageBoolean

Whether Microsoft® FrontPage Extensions are enabled for the account.

cPanel & WHM will ignore all FrontPage settings and parameters if either of the following statements is true:

  • The server runs cPanel & WHM version 11.44 and FrontPage Extensions are not installed.
  • The server runs cPanel & WHM version 11.46 or later.


  • 1 — Enabled.
  • 0 — Disabled.
0
hasshellBoolean

Whether shell (SSH) access is enabled for the account.

This parameter defaults to 1.

  • 1 — Enabled.
  • 0 — Disabled.
1
contactemailstringThe account's contact email address.A valid email address. user%40
secondomain.com
cpmodstring

The account's cPanel theme.

This parameter defaults to the server's default cPanel theme.

  • paper_lantern
  • A valid theme on the server.
paper_lantern
maxftpstring

The account's maximum number of FTP accounts.

This parameter defaults to unlimited.

  • A positive integer between one and 999,999.
  • 0, unlimited, or null — The account possesses unlimited FTP accounts.
unlimited
maxsqlstring

The account's maximum number of each available type of SQL database.

For example, if you set this value to 5 and the system administrator allows MySQL® and PostgreSQL® databases , users can create up to five MySQL databases and up to five PostgreSQL databases.

This parameter defaults to unlimited.

  • A positive integer between one and 999,999.
  • 0, unlimited, or null — The account possesses unlimited databases.
unlimited
maxpopstring

The account's maximum number of email accounts.

This parameter defaults to unlimited.

  • An integer between zero and 999,999.
  • unlimited or null — The account possesses unlimited email accounts.
unlimited
maxlststring

The account's maximum number of mailing lists.

This parameter defaults to unlimited.

  • A positive integer between one and 999,999.
  • 0, unlimited, or null — The account possesses unlimited mailing lists.
unlimited
maxsubstring

The account's maximum number of subdomains.

This parameter defaults to unlimited.

  • An integer between zero and 999,999.
  • unlimited or null — The account possesses unlimited subdomains.
unlimited
maxparkstring

The account's maximum number of parked domains (aliases).

This parameter defaults to 0.

  • An integer between zero and 999,999.
  • unlimited or null — The account possesses unlimited parked domains.
unlimited
maxaddonstring

The account's maximum number of addon domains.

This parameter defaults to 0.

  • An integer between zero and 999,999.
  • unlimited or null — The account possesses unlimited addon domains.
unlimited
bwlimitstring

The account's maximum bandwidth use.

This parameter defaults to unlimited.

  • A positive integer between one and 999,999 that represents the maximum bandwidth use, in Megabytes (MB).
  • 0, unlimited, or null — The account possesses unlimited bandwidth.
unlimited
customipstring

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
languagestring

The account's default locale.

This value defaults to the server's default locale.

A two-letter ISO-3166 code. en
useregnsBoolean

Whether to use registered nameservers for the domain.

This value defaults to 0.

If you set this parameter to 1, you must also include the hasuseregns parameter with a value of 1


  • 1 — Use registered nameservers.
  • 0 — Use the server's default nameservers.

 

0
hasuseregnsBoolean

A legacy parameter.

Only include this parameter if you set a useregns value of 1


11
resellerBoolean

Whether to grant the account reseller privileges.

This parameter defaults to 0.

  • 1 — Grant reseller privileges.
  • 0 — Do not grant reseller privileges.
0
forcednsBoolean

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 .

  • 1 — Overwrite.
  • 0 — Do not overwrite.
0
mxcheckstring

The account's main mail exchanger's type.

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.

  • local
  • secondary
  • remote
  • auto
auto

max_email_per_hour

integer

The maximum number of emails that the account can send in one hour.

This parameter defaults to unlimited.

This parameter is only available in cPanel & WHM version 11.32+. 


  • A positive integer.
  • 0 or unlimited — The account can send an unlimited number of emails.
unlimited

max_defer_fail_percentage

integer

The percentage of failed or deferred email messages that the account can send per hour before outgoing mail is rate-limited.

This parameter is only available in cPanel & WHM version 11.32+. 


  • A positive integer.
  • 0 or unlimited — The account can send an unlimited number of failed or deferred messages.
unlimited
uidinteger

The account's user ID.

  • This parameter is only available in cPanel & WHM version 11.32+. 
  • To use this parameter, the function's caller must authenticate as the root user.


A positive integer that is not already associated with disk usage, and that does not already exist on the server.123456789
gidinteger

The account's group ID.

  • This parameter is only available in cPanel & WHM version 11.32+. 
  • To use this parameter, the function's caller must authenticate as the root user.


A positive integer that is not already associated with disk usage, and that does not already exist on the server.123456789  
homedirstring

The account's home directory.

If you do not specify a value, the system uses the /home/user directory, where user is the account's username.

  • This parameter is only available in cPanel & WHM version 11.34+. 
  • To use this parameter, the function's caller must authenticate as the root user.


The absolute path to a location on the server./home/user

Returns

ReturnTypeDescriptionPossible valuesExample
optionshashA hash of account options.This hash includes the nameserver, nameserver*, nameservera*, nameserverentry*, and ip returns. 

nameserver

string

The account's primary nameserver.

The function returns this value in the options hash.

A valid nameserver.ns1.example-host.com

nameserver*

string

The account's additional nameservers, where * represents a number that indicates their priority order.

The function returns these values in the options hash.

A valid nameserver.ns2.example-host.com

nameservera*

string

The account's nameservers' IP addresses, where * represents a number that indicates their priority order.

The function returns these values in the options hash.

A valid IP address.10.0.0.1

nameserverentry*

string

The nameserver's DNS name, where * represents a number that indicates their priority order.

The function returns these values in the options hash.

A valid DNS entry name.dnsentry1

ip

string

The account's primary nameserver's IP address.

The function returns this value in the options hash.

A valid IPv4 address.10.0.0.1

package

string

The account's plan (package) name.

The function returns this value in the options hash.

A valid package name.package_name
rawoutstringRaw output from the account creation operation.One or more messages that may contain HTML code.


<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

 


statusBooleanWhether the function succeeded.
  • 1 — Success.
  • 0 — Failure.
1
statusmsgstringA message of success or a reason for failure.
  • Account Creation Ok
  • An error message.
Account Creation Ok