Update Subaccount settings

This function edits a Subaccount.

Authorizations:
query Parameters
domain
required
string <domain>

The Subaccount user's associated domain.

A domain that the cPanel account owns.

Example: domain=example.com
password
required
string

The Subaccount's password.

Note:

The Subaccount uses this password for email, FTP, and Web Disk services.

Example: password=12345luggage
username
required
string

The Subaccount's username.

  • Length - 64 characters.
  • Characters - a-z, A-Z, 0-9, dot (.), hyphen (-), underscore (_).

Note:

This value does not include the domain name.

Example: username=example
alternate_email
string <email> Nullable
Default: null

An alternate email address for the Subaccount's user.

Note:

The cPanel account user could use this email address to contact the Subaccount user if their primary email address's domain is unavailable.

Example: alternate_email=user@example.com
avatar_url
string <url> Nullable
Default: null

Warning:

We reserved this parameter for future use. Do not use this parameter.

The user's Subaccount profile photo.

Note:

You must use the HTTPS protocol to prevent mixed content warnings when users view the photo from another HTTPS URL.

Example: avatar_url=https://img.example.com/avatars/example.jpg
phone_number
string Nullable
Default: null

The Subaccount user's phone number.

Warning:

We reserved this parameter for future use. Do not use this parameter.

The number conforms to the ITU-T's E.164-recommended standard for the representation of telephone numbers.

Example: phone_number=+15551234567
real_name
string Nullable
Default: null

The Subaccount user's name.

  • A first name.
  • A last name.
  • A first name and last name.
  • An empty string.
Example: real_name=John Doe
services.email.enabled
integer
Default: 0

Whether to grant the Subaccount email access.

  • 1 - Can access.
  • 0 - Cannot access.
Enum: 0 1
Example: services.email.enabled=1
services.email.quota
integer

The maximum amount of disk space, in megabytes (MB), that the subaccount's email account may use.

If you do not declare a value, the system defaults to the defined system value.

Note:

This value cannot be greater than the maximum email quota.

  • 0 or unlimited - The subaccount possesses unlimited disk space.
Example: services.email.quota=500
services.ftp.enabled
integer
Default: 0

Whether to grant the Subaccount FTP access.

  • 1 - Can access.
  • 0 - Cannot access.
Enum: 0 1
Example: services.ftp.enabled=1
services.ftp.homedir
string <path>

The Subaccount's FTP home directory.

Note:

This parameter is required if you enable FTP access.

A relative path from the cPanel account's home directory.

Note:

The specified directory must exist.

Example: services.ftp.homedir=/Subaccount
services.webdisk.enabled
integer
Default: 0

Whether to grant the Subaccount Web Disk access.

  • 1 - Can access.
  • 0 - Cannot access.
Enum: 0 1
Example: services.webdisk.enabled=1
services.webdisk.enabledigest
integer
Default: 0

Whether to enable Web Disk digest authentication.

Notes:

  • Only enable Digest Authentication for clients that require additional compatibility support on certain versions of Windows® operating systems. This compatibility support is only required on servers that use a self-signed certificate for the cpsrvd and cpdavd daemons.
  • We recommend that you do not use Digest Authentication.
  • 1 - Enabled
  • 0 - Disabled.
Enum: 0 1
Example: services.webdisk.enabledigest=0
services.webdisk.homedir
string <path>

The Subaccount's Web Disk home directory.

Note:

This parameter is required if you enable Web Disk access.

A relative path from the cPanel account's home directory.

Example: services.webdisk.homedir=/Subaccount
services.webdisk.perms
string
Default: "rw"

Whether to grant write permissions to the Subaccount.

Note:

The services.webdisk.homedir parameter determines the Subaccount's Web Disk home directory.

  • ro - Read-only permissions.
  • rw - Read and write permissions.
Enum: "ro" "rw"
Example: services.webdisk.perms=rw
services.webdisk.private
integer
Default: 0

Whether to set the Web Disk directory's permissions to public or private.

  • 1 - Private (0700).
  • 0 - Public (0755).
Enum: 0 1
Example: services.webdisk.private=1
type
string
Default: "sub"

The type of account.

  • sub - A Subaccount.
Value: "sub"
Example: type=sub

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --output=jsonpretty \
  --user=username \
  UserManager \
  edit_user \
  domain='example.com' \
  password='12345luggage' \
  username='example'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "edit_user",
  • "module": "UserManager",
  • "result": {
    • "data": {
      • "dismissed_merge_candidates": [
        • {
          • "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_expired_invite": 0,
              • "has_invite": 0,
              • "has_siblings": 0,
              • "invite_expiration": 1591718154,
              • "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": 100
                  },
                • "ftp": {
                  • "enabled": 0,
                  • "homedir": "/subaccount",
                  • "quota": 100
                  },
                • "webdisk": {
                  • "enabled": 0,
                  • "homedir": "/bob",
                  • "perms": "rw",
                  • "private": 0
                  }
                },
              • "special": 1,
              • "sub_account_exists": 0,
              • "synced_password": 0,
              • "type": "sub",
              • "username": "example",
              • "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_expired_invite": 0,
      • "has_invite": 0,
      • "has_siblings": 0,
      • "invite_expiration": 1591718154,
      • "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": 100
          },
        • "ftp": {
          • "enabled": 0,
          • "homedir": "/subaccount",
          • "quota": 100
          },
        • "webdisk": {
          • "enabled": 0,
          • "homedir": "/bob",
          • "perms": "rw",
          • "private": 0
          }
        },
      • "special": 1,
      • "sub_account_exists": 0,
      • "synced_password": 0,
      • "type": "sub",
      • "username": "example",
      • "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_expired_invite": 0,
          • "has_invite": 0,
          • "has_siblings": 0,
          • "invite_expiration": 1591718154,
          • "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": 100
              },
            • "ftp": {
              • "enabled": 0,
              • "homedir": "/subaccount",
              • "quota": 100
              },
            • "webdisk": {
              • "enabled": 0,
              • "homedir": "/bob",
              • "perms": "rw",
              • "private": 0
              }
            },
          • "special": 1,
          • "sub_account_exists": 0,
          • "synced_password": 0,
          • "type": "sub",
          • "username": "example",
          • "merge_candidates": [
            • { }
            ]
          }
        ]
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}