This function creates a Subaccount.
domain required | string <domain> The Subaccount user's associated domain that the cPanel account owns. Example: domain=example.com |
password required | string <password> The Subaccount's password. Note: Email, FTP, and Web Disk services use this password. Example: password=123456luggage |
username required | string <username> <= 64 characters The username for the Subaccount. The username can only contain alphanumeric characters, dots ( Note: This value does not include the domain name. Example: username=example |
alternate_email | string <email> Default: null An alternate email address for the Subaccount's user. Note: You must use this parameter if you set the Example: alternate_email=user@example.com |
avatar_url | string <url> Default: null The URL path to the user's Subaccount profile photo. Note: You must use the HTTPS protocol to prevent mixed content warnings when users view the image from another HTTPS URL. Warning: We reserved this parameter for future use. Do not use this parameter. Example: avatar_url=https://img.example.com/avatars/example.jpg |
phone_number | |
real_name | string Default: null The Subaccount user's first and/or last name. Example: real_name=John Doe |
send_invite | integer Default: 0 Whether to send a reset password email to the Subaccount's alternate email address.
Example: send_invite=0 |
services.email.enabled | integer Default: 0 Whether to grant the Subaccount email access.
Example: services.email.enabled=1 |
services.email.quota | string The maximum amount of disk space, in megabytes (MB), allocated to Subaccount's email account.
This value defaults to the defined system value. Note: This value cannot be larger than the system's maximum email quota. Example: services.email.quota=500 |
services.email.send_welcome_email | integer Default: 0 Whether to send client configuration instructions to the account.
Example: services.email.send_welcome_email=1 |
services.ftp.enabled | integer Default: 0 Whether to grant the Subaccount FTP access.
Example: services.ftp.enabled=1 |
services.ftp.homedir | string <path> The Subaccount's FTP home directory, relative to the cPanel account's home directory. Note:
Example: services.ftp.homedir=/Subaccount |
services.webdisk.enabled | integer Default: 0 Whether to grant the Subaccount Web Disk access.
Example: services.webdisk.enabled=1 |
services.webdisk.enabledigest | integer Default: 0 Whether to enable the Web Disk Digest Authentication.
Note:
Example: services.webdisk.enabledigest=0 |
services.webdisk.homedir | string <path> The Subaccount's Web Disk home directory, relative to the cPanel account's home directory. Note: This parameter is required if you enable the Example: services.webdisk.homedir=/Subaccount |
services.webdisk.perms | string Default: "rw" The Subaccount's file permissions for its Web Disk home directory.
Note: The Example: services.webdisk.perms=rw |
services.webdisk.private | integer Default: 0 Whether to set the directory's permissions to public or private.
Example: services.webdisk.private=1 |
type | string Default: "sub" The type of account.
Example: type=sub |
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --user=username UserManager create_user domain='example.com' password='123456luggage' username='example'
{- "apiversion": 3,
- "func": "create_user",
- "module": "UserManager",
- "result": {
- "data": {
- "alternate_email": "user@example.com",
- "can_delete": 0,
- "can_set_password": 1,
- "can_set_quota": 0,
- "dismissed": 1,
- "domain": "example.com",
- "full_username": "user@example.com",
- "guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
- "has_siblings": 0,
- "issues": [
- {
- "area": "quota",
- "limit": 1500,
- "message": "Your account is over quota.",
- "service": "email",
- "type": "info",
- "used": 2000
}
], - "parent_type": "hypothetical",
- "phone_number": "+15551234567",
- "real_name": "John Doe",
- "services": {
- "email": {
- "enabled": 1,
- "quota": 1500
}, - "ftp": {
- "enabled": 0,
- "homedir": "/subaccount",
- "quota": "0.00"
}, - "webdisk": {
- "enabled": 0,
- "homedir": "/bob",
- "perms": "rw",
- "private": 0
}
}, - "special": 1,
- "sub_account_exists": 0,
- "synced_password": 0,
- "type": "sub",
- "username": "example",
- "dismissed_merge_candidates": [
- {
- "alternate_email": "user@example.com",
- "can_delete": 0,
- "can_set_password": 1,
- "can_set_quota": 0,
- "dismissed": 1,
- "domain": "example.com",
- "full_username": "user@example.com",
- "guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
- "has_siblings": 0,
- "issues": [
- {
- "area": "quota",
- "limit": 1500,
- "message": "Your account is over quota.",
- "service": "email",
- "type": "info",
- "used": 2000
}
], - "parent_type": "hypothetical",
- "phone_number": "+15551234567",
- "real_name": "John Doe",
- "services": {
- "email": {
- "enabled": 1,
- "quota": 1500
}, - "ftp": {
- "enabled": 0,
- "homedir": "/subaccount",
- "quota": "0.00"
}, - "webdisk": {
- "enabled": 0,
- "homedir": "/bob",
- "perms": "rw",
- "private": 0
}
}, - "special": 1,
- "sub_account_exists": 0,
- "synced_password": 0,
- "type": "sub",
- "username": "example"
}
], - "has_expired_invite": 0,
- "has_invite": 0,
- "invite_expiration": 1591718154,
- "merge_candidates": [
- {
- "alternate_email": "user@example.com",
- "can_delete": 0,
- "can_set_password": 1,
- "can_set_quota": 0,
- "dismissed": 1,
- "domain": "example.com",
- "full_username": "user@example.com",
- "guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
- "has_siblings": 0,
- "issues": [
- {
- "area": "quota",
- "limit": 1500,
- "message": "Your account is over quota.",
- "service": "email",
- "type": "info",
- "used": 2000
}
], - "parent_type": "hypothetical",
- "phone_number": "+15551234567",
- "real_name": "John Doe",
- "services": {
- "email": {
- "enabled": 1,
- "quota": 1500
}, - "ftp": {
- "enabled": 0,
- "homedir": "/subaccount",
- "quota": "0.00"
}, - "webdisk": {
- "enabled": 0,
- "homedir": "/bob",
- "perms": "rw",
- "private": 0
}
}, - "special": 1,
- "sub_account_exists": 0,
- "synced_password": 0,
- "type": "sub",
- "username": "example"
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}