Calling the following function in WebHost Manager:
https://example.net:2087/json-api/createacct?username=user123&plan=level3
&ip=n&cpmod=x3&password=h@rd2gu3ss!p@ss&contact%20email=username
@example.com&domain=example.com&useregns=0&reseller=0
will produce output similar to:
{
"result":[
{
"status":1,
"statusmsg":"Account Creation Ok",
"rawout":"<table style=\"border- bottom: 1px #ccc dotted;\"><tr><td width=\"100%\">
<pre>Checking input data...System has 2 free ips.\n...Done</pre></td><td width=\"30\">
<img align=absmiddle src=\"/cPanel_magic_revision_1181098607/icons/good.gif\"></td>
</tr></table>\n<table style=\"border-bottom: 1px #ccc dotted;\"><tr><td width=\"100%\">
<pre>WWWAcct 12.1.0 (c) 1997-2008 cPanel, Inc....\n\nDns Zone check is enabled.
\n+===================================+\n| New Account Info
|\n+===================================+\n| Domain: example.com\n| Ip: 127.0.0.1
(n)\n| HasCgi: y\n| UserName: user123\n| PassWord: h@rd2gu3ss!p@ss\n| CpanelMod:
x3\n| HomeRoot: /home\n| Quota: 0 Meg\n| NameServer1: ns1.example.net\n|
NameServer2: ns2.example.net\n| NameServer3: ns1.example.com\n| NameServer4:
ns2.example.com\n| Contact Email: \n| Package: level3==\n| Feature List: default\n|
Language: english\n+===================================+\n...Done</pre>
</td><td width=\"30\"><img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\">
</td></tr></table>\n<table style=\"border-bottom: 1px #ccc dotted;\"><tr><td
width=\"100%\"><pre>Running pre creation script
(/scripts/prewwwacct)......Done</pre></td><td width=\"30\"><img
align=absmiddlesrc=\"/cPanel_magic_revision_ 1181098607/icons/good.gif\">
</td></tr></table>\n<table
style=\"border-bottom: 1px #ccc dotted;\"><tr> <td
width=\"100%\"><pre>Adding User...Removing Shell Access (n)\n...Done</pre>
</td><td width=\"30\"><img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\">
</td></tr></table>\n<table style=\"border-bottom: 1px #ccc dotted;\">
<tr><td width=\"100%\"><pre>Copying skel files from /root/cpanel3-skel/ to
/home/user123/......Done</pre></td><td width=\"30\"> <img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\"></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_1181098607/icons/good.gif\"></td></tr></table>\n<table
style=\"border-bottom: 1px #ccc dotted;\"><tr><td width=\"100%\"><pre>Setting up Mail
& Local Domains...localdomains...valiases ...vdomainaliases...vfilters......Done</pre></td>
<td width=\"30\"><img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\"></td></tr></table>\n<table
style=\"border-bottom: 1px #ccc dotted;\"><tr><td width=\"100%\"><pre>Configuring
DNS...Bind reconfiguring on publicdocs using rndc\n...Done</pre></td><td width=\"30\">
<img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\"></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_1181098607/icons/good.gif\"></td></tr></table>\nChanging
password for user123\nPassword for user123 has been changed\n<table style=\"border-
bottom: 1px #ccc dotted;\"><tr><td width=\"100%\"><pre>Updating Authentication
Databases...Updating ftp passwords for user123\nFtp password files updated.\nFtp vhost
passwords synced\n...Done</pre></td><td width=\"30\"><img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\">
</td></tr></table>\n<table
style=\"border-bottom: 1px #ccc dotted;\"><tr><td width=\"100%\"><pre>Verifying MX
Records and Setting up Databases......Done</pre></td><td width=\"30\"><img
align=absmiddle src=\"/cPanel_magic_revision_1181098607/icons/good.gif\">
</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_1181098607/icons/good.gif\"></td></tr></table>\nBind
reloading on publicdocs 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_1181098607/icons/good.gif\"></td>
</tr></table>\nSystem has 2 free ips.\n<table style=\"border-bottom: 1px #ccc dotted;\">
<tr><td width=\"100%\"><pre>Running post creation scripts (/scripts/legacypostwwwacct,
/scripts/postwwwacct, /scripts/postwwwacctuser)......Done</pre></td><td width=\"30\">
<img align=absmiddle
src=\"/cPanel_magic_revision_1181098607/icons/good.gif\"></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_1181098607/icons/good.gif\"></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_1181098607/icons/good.gif\"></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_1181098607/icons/good.gif\"></td></tr></table>\n",
"options":{
"nameserver4":"ns2.example.com",
"nameserver":"ns1.example.net",
"nameserverentry2":null,
"nameserverentry3":null,
"nameserverentry4":null,
"nameserverentry":null,
"ip":"127.0.0.1",
"nameservera2":null,
"nameservera3":null,
"package":"level3==",
"nameservera4":null,
"nameserver2":"ns2.cpanelrocks.net",
"nameservera":null,
"nameserver3":"ns1.example.com"
}
}
]
}
Note: Submit the entire request as a single string. For display purposes, the examples above may be wrapped.