# Create Subaccount This function creates a Subaccount. Endpoint: GET /UserManager/create_user Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domain` (string, required) The Subaccount user's associated domain that the cPanel account owns. Example: "example.com" - `password` (string, required) The Subaccount's password. Email, FTP, and Web Disk services use this password. Example: "123456luggage" - `username` (string, required) The username for the Subaccount. The username can only contain alphanumeric characters, dots (), hyphens (), and underscores (). This value does include the domain name. Example: "example" - `alternate_email` (string) An alternate email address for the Subaccount's user. You use this parameter if you set the value to . Example: "user@example.com" - `avatar_url` (string) The URL path to the user's Subaccount profile photo. You use the HTTPS protocol to prevent mixed content warnings when users view the image from another HTTPS URL. We reserved this parameter for future use. Do use this parameter. Example: "https://img.example.com/avatars/example.jpg" - `phone_number` (string) A phone number for the Subaccount user that conforms to ITU-T's E.164 standards. We reserved this parameter for future use. Do use this parameter. Example: "+15551234567" - `real_name` (string) The Subaccount user's first and/or last name. Example: "John Doe" - `send_invite` (integer) Whether to send a reset password email to the Subaccount's alternate email address. * - Send. * - Do not send. Enum: 0, 1 - `services.email.enabled` (integer) Whether to grant the Subaccount email access. * - Can access. * - access. Enum: 0, 1 - `services.email.quota` (string) The maximum amount of disk space, in megabytes (MB), allocated to Subaccount's email account. * or - The subaccount has unlimited disk space. This value defaults to the defined system value. This value be larger than the system's maximum email quota. Example: "500" - `services.email.send_welcome_email` (integer) Whether to send client configuration instructions to the account. * - Send the instructions. * - Do send the instructions. Enum: 0, 1 - `services.ftp.enabled` (integer) Whether to grant the Subaccount FTP access. * - Can access. * - access. Enum: 0, 1 - `services.ftp.homedir` (string) The Subaccount's FTP home directory, relative to the cPanel account's home directory. * This parameter is if you enabled the parameter. * The directory exist. Example: "/Subaccount" - `services.webdisk.enabled` (integer) Whether to grant the Subaccount Web Disk access. * _ Can access. * - access. Enum: 0, 1 - `services.webdisk.enabledigest` (integer) Whether to enable the Web Disk Digest Authentication. * - Enabled. * - Disabled. * enable Digest Authentication for clients that require additional compatibility support on certain versions of Windows® operating systems. This compatibility support is required on servers that use a self-signed certificate for the and daemons. * We recommend that you do use Digest Authentication. Enum: 0, 1 - `services.webdisk.homedir` (string) The Subaccount's Web Disk home directory, relative to the cPanel account's home directory. This parameter is if you enable the parameter. Example: "/Subaccount" - `services.webdisk.perms` (string) The Subaccount's file permissions for its Web Disk home directory. * - Read-only permissions. * - Read and write permissions. The parameter determines the Subaccount's Web Disk home directory. Example: "rw" - `services.webdisk.private` (integer) Whether to set the directory's permissions to public or private. * - Private (). * - Public (). Enum: 0, 1 - `type` (string) The type of account. * - A Subaccount. Enum: "sub" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "create_user" - `module` (string) The name of the module called. Example: "UserManager" - `result` (object) - `result.data` (object) - `result.data.alternate_email` (string) An alternate email address for the subaccount's user. Example: "user@example.com" - `result.data.avatar_url` (string) The HTTPS URL to the user's subaccount profile photo image file. Example: "https://img.example.com/avatars/example.jpg" - `result.data.can_delete` (integer) Whether the cPanel account user can delete the subaccount. * - Can delete. * - delete. Enum: 0, 1 - `result.data.can_set_password` (integer) Whether the cPanel account user can change the subaccount's password. * - Can change. * - change. The function returns a value for subaccounts that inherit their password from the cPanel account. Enum: 0, 1 - `result.data.can_set_quota` (integer) Whether the cPanel account user can change the subaccount's disk usage quota. * - Can change. * - change. Enum: 0, 1 - `result.data.dismissed` (integer) Whether the cPanel account user dismissed the merge prompt for the service account. * - Dismissed. * - Did dismiss. service accounts return this value. Enum: 0, 1 - `result.data.domain` (string) The subaccount user's associated domain. Example: "example.com" - `result.data.full_username` (string) The subaccount's username and domain name. Example: "user@example.com" - `result.data.guid` (string) The subaccount unique identifier. Example: "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4" - `result.data.has_siblings` (integer) Whether the service account shares a value with another service account. * - Shares. * - Does share. Enum: 0, 1 - `result.data.issues` (array) Information about any issues or problems with the subaccount. - `result.data.issues.area` (string) The affected section of cPanel & WHM. Example: "quota" - `result.data.issues.limit` (integer) The set quota megabyte (MB) limit for the affected subaccount. Example: 1500 - `result.data.issues.message` (string) The description of the issue. Example: "Your account is over quota." - `result.data.issues.service` (string) The affected service. * * * Enum: "email", "ftp", "webdisk" - `result.data.issues.type` (string) The type of issue. * * * Enum: "error", "warning", "info" - `result.data.issues.used` (integer) The number of megabytes (MB) that the account currently uses. Example: 2000 - `result.data.parent_type` (string,null) The type of account that could own the service account. * - A subaccount. * - A hypothetical subaccount that does yet exist, but the user could create as part of a merge. * - a merge candidate. Example: "hypothetical" - `result.data.phone_number` (string) The subaccount user's phone number. A valid phone number that conforms to [ITU-T](https://en.wikipedia.org/wiki/ITU-T)'s [E.164](https://en.wikipedia.org/wiki/E.164)-recommended standard for the representation of telephone numbers. Example: "+15551234567" - `result.data.real_name` (string) The name of the subaccount's user, if provided. Example: "John Doe" - `result.data.services` (object) Information about the subaccount's access to email, FTP, and Web Disk. - `result.data.services.email` (object) Information about the subaccount's email status. - `result.data.services.email.enabled` (integer) Whether the subaccount can access Webmail, POP, and IMAP services. * - Can access. * - access. Enum: 0, 1 - `result.data.services.email.quota` (integer) The maximum amount of disk space, in megabytes (MB), allocated to subaccount's email account. Example: 1500 - `result.data.services.ftp` (object) Information about the subaccount's FTP status. - `result.data.services.ftp.enabled` (integer) Whether the subaccount can access FTP. * - Can access. * - access. Enum: 0, 1 - `result.data.services.ftp.homedir` (string) The subaccount's FTP home directory, relative to the cPanel account's home directory. Example: "/subaccount" - `result.data.services.ftp.quota` (string) The subaccount's maximum FTP disk space quota, in megabytes (MB). * A string containing a non-negative float. * - Unlimited. Example: "0.00" - `result.data.services.webdisk` (object) Information about the subaccount's Web Disk status. - `result.data.services.webdisk.enabled` (integer) Whether the subaccount can access Web Disk. * - Can access. * - access. Enum: 0, 1 - `result.data.services.webdisk.homedir` (string) The subaccount's Web Disk home directory, relative to the cPanel account's home directory. Example: "/bob" - `result.data.services.webdisk.perms` (string) Whether the subaccount has read-only or read and write permissions. * - Read-only permissions. * - Read and write permissions. Example: "rw" - `result.data.services.webdisk.private` (integer) Whether the subaccount's Web Disk directory permissions are public or private. * - Private (). * - Public (). Enum: 0, 1 - `result.data.special` (integer) Whether the account is a system-created special account that the user remove. * - A special account. * - a special account. Enum: 0, 1 - `result.data.sub_account_exists` (integer,null) Whether a subaccount exists with the same username. * - Exists. * - Does not exist. The function returns a null value if the account is a service account. Enum: 0, 1 - `result.data.synced_password` (integer,null) Whether the user has synchronized the passwords for each of the subaccount's service accounts. * - Synchronized. * - synchronized. The function returns a null value if the account is a subaccount. Enum: 0, 1 - `result.data.type` (string) The type of account. * - A subaccount. * - A hypothetical subaccount that does not exist, but that the user could create as part of a merge. * - A service account. * - The cPanel account. Enum: "sub", "hypothetical", "service", "cpanel" - `result.data.username` (string) The subaccount's username. Example: "example" - `result.data.dismissed_merge_candidates` (array) An array of objects containing service candidates that the system dismissed from merges. - `result.data.has_expired_invite` (integer) Whether an expired account login invitation exists. * - Expired account invitation exists. * - Expired account invitation does exist. Enum: 0, 1 - `result.data.has_invite` (integer) Whether an account login invitation exists. * - Account invitation exists. * - Account invitation does exist. Enum: 0, 1 - `result.data.invite_expiration` (integer) When the invitation expires. A date in Unix time format. Example: 1591718154 - `result.data.merge_candidates` (array) An array of objects that represents the service accounts that the system could merge for this subaccount. - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * - Success. * - Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.