Overview
This page contains the input variables, output variables, and examples in JSON and XML output formats for the createacct
function.
The createacct
function creates a hosting account and sets up its associated domain information.
Parameters
Input | Type | Description | |
---|---|---|---|
username | string |
The username for the account that you wish to create (for example, |
|
domain | string | The domain name to assign to the account (for example, example.com ). |
|
plan | string | The package that you wish to apply to the new account (for example, reseller_gold ). |
|
pkgname | string | The name of a new package to be created based on the settings used (for example, reseller_new ). |
|
savepkg | boolean | This value determines whether to save the settings as a new package. A value of 1 will save the settings as a new package. |
|
featurelist | string | The name of the feature list to be used when you create a new package (for example, no_ftp_100mb_gold ). |
|
quota | integer | The disk space quota, in megabytes. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited. |
|
password | string | The password that you wish to assign to the new account (for example, p@ss!w0rd$123 ). |
|
ip | string | This value determines whether the domain has a dedicated IP address. A value of y will flag the domain for a dedicated IP address. |
|
cgi | boolean | This value determines whether the domain has CGI access. A value of 1 grants the domain CGI access. |
|
frontpage | boolean |
This value determines whether the domain can install FrontPage extensions. A value of |
|
dkim (optional) | boolean |
This value determines whether the domain has DKIM enabled. A value of |
|
spf (optional) | boolean |
This value determines whether the domain has SPF enabled. A value of |
|
hasshell | boolean | This value determines whether the domain has shell (SSH) access. A value of 1 grants shell access to the domain. |
|
contactemail | string | Contact email address for the account (for example, user@example.com ). |
|
cpmod | string |
The name of the cPanel theme that is assigned to the domain (for example: |
|
maxftp | string | The maximum number of FTP accounts that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
maxsql | string | The maximum number of SQL databases that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
maxpop | string | The maximum number of email accounts that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
maxlst | string | The maximum number of mailing lists that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
maxsub | string | The maximum number of subdomains that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
maxpark | string | The maximum number of parked domains that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
maxaddon | string | The maximum number of addon domains that the user can create. Allowed values are: a number from 0 to 999999 where a value of 0 is unlimited, unlimited , and null . |
|
bwlimit | string | The bandwidth limit, in megabytes. This value must be a number from 0 to 999999 , where a value of 0 is unlimited. |
|
customip | string | This value specifies an IP address for the site. | |
language | string | The language that you wish for the new account to use in the cPanel interface (for example, spanish-utf8 ). |
|
useregns | boolean | This value determines whether the domain will use the registered nameservers for the domain instead of the ones configured on the server. A value of 1 will use the registered nameservers for the domain. |
|
hasuseregns | boolean | If you set useregns to 1 , you must set this value to 1 . |
|
reseller | boolean | This value determines whether you wish to grant reseller privileges to the account. A value of 1 will grant reseller privileges to the account. |
|
forcedns | boolean | This value will overwrite an existing DNS Zone with this new account‘s information if one already exists. A value of 1 will overwrite an existing DNS zone with this new account‘s information. |
|
mxcheck | string |
Determines how the server will handle incoming mail for this domain. This variable can be set to one of the following:
|
|
MAX_EMAIL_PER_HOUR | integer |
The maximum number of emails the account can send in an hour. This parameter‘s default value is unlimited. A value of |
|
MAX_DEFER_FAIL_PERCENTAGE | integer |
The percentage of failed or deferred email messages the account can send per hour before outgoing mail is rate-limited. This parameter‘s default value is unlimited. |
|
uid | string |
The user ID for a new account. This must be a numeral, not already associated with disk usage, and does not pre-exist on the machine. You must be logged in as the |
|
gid | string |
The group ID for a new account. This must be a numeral, not already associated with disk usage, and does not pre-exist on the machine. You must be logged in as the |
|
homedir | string |
The home directory (HOMEDIR) to be used for a new account. You must be logged in as the |
|
Output | Type | Description | |
createacct | The container for the results from the createacct function. |
||
result | The container for the results of the function. | ||
options | The container for the domain options. | ||
ip | string | IP address with which the the domain is associated (for example, 123.456.789.10 ). |
|
nameserverX | string | The nameserver for the domain. The property of nameserver may be appended by an integer (x ) between 1 and 5 (for example: nameserver1 ). |
|
nameserveraX | string | IP address of the nameserver. The property of nameservera may be appended by an integer (x ) between 1 and 5 (for example: nameservera1 ). |
|
nameserverentryX | string | DNS name of the nameservers the namerservers are registered. The property of nameserverentry may appear appended by an integer (x ) between 1 and 5 (for example: nameserverentry1 ). |
|
rawout | string | Raw output of the account creation operation in HTML format. |
Examples
JSON | ||||
---|---|---|---|---|
Input URL |
https://hostname:2087/cpsess########/json-api/createacct |
|||
Output |
|
|||
XML | ||||
Input URL |
https://hostname:2087/cpsess########/xml-api/createacct |
|||
Output |
|