v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
UserManager
Subaccount Management

Update Subaccount settings

This function edits a Subaccount.

get/UserManager/edit_user

Query parameters

domainstring domain required
Example:example.com

The Subaccount user's associated domain.

A domain that the cPanel account owns.

usernamestring required
Example:example

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.

alternate_emailstring email nullable
Example:user@example.com

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.

avatar_urlstring url nullable
Example:https://img.example.com/avatars/example.jpg

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.

passwordstring
Example:12345luggage

The Subaccount's new password.

Note:

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

phone_numberstring nullable
Example:+15551234567

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.

real_namestring nullable
Example:John Doe

The Subaccount user's name.

  • A first name.
  • A last name.
  • A first name and last name.
  • An empty string.
services.email.enabled0 | 1
Example:1

Whether to grant the Subaccount email access.

  • 1 - Can access.
  • 0 - Cannot access.
services.email.quotainteger
Example:500

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.
services.ftp.enabled0 | 1
Example:1

Whether to grant the Subaccount FTP access.

  • 1 - Can access.
  • 0 - Cannot access.
services.ftp.homedirstring path
Example:/Subaccount

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.

services.webdisk.enabled0 | 1
Example:1

Whether to grant the Subaccount Web Disk access.

  • 1 - Can access.
  • 0 - Cannot access.
services.webdisk.enabledigest0 | 1

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.

services.webdisk.homedirstring path
Example:/Subaccount

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.

services.webdisk.perms'ro' | 'rw'
Example: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.
services.webdisk.private0 | 1
Example:1

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

  • 1 - Private (0700).
  • 0 - Public (0755).
type'sub'
Example:sub

The type of account.

  • sub - A Subaccount.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "edit_user",
  "module": "UserManager",
  "result": {
    "data": {
      "alternate_email": "user@example.com",
      "avatar_url": "https://img.example.com/avatars/example.jpg",
      "can_set_password": 1,
      "dismissed": 1,
      "domain": "example.com",
      "full_username": "user@example.com",
      "guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
      "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": {
          "homedir": "/subaccount",
          "quota": 100
        },
        "webdisk": {
          "homedir": "/bob",
          "perms": "rw"
        }
      },
      "special": 1,
      "type": "sub",
      "username": "example",
      "merge_candidates": [
        {
          "alternate_email": "user@example.com",
          "avatar_url": "https://img.example.com/avatars/example.jpg",
          "can_set_password": 1,
          "dismissed": 1,
          "domain": "example.com",
          "full_username": "user@example.com",
          "guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
          "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": {
              "homedir": "/subaccount",
              "quota": 100
            },
            "webdisk": {
              "homedir": "/bob",
              "perms": "rw"
            }
          },
          "special": 1,
          "type": "sub",
          "username": "example"
        }
      ],
      "dismissed_merge_candidates": [
        {
          "merge_candidates": [
            {
              "alternate_email": "user@example.com",
              "avatar_url": "https://img.example.com/avatars/example.jpg",
              "can_set_password": 1,
              "dismissed": 1,
              "domain": "example.com",
              "full_username": "user@example.com",
              "guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
              "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": {
                  "homedir": "/subaccount",
                  "quota": 100
                },
                "webdisk": {
                  "homedir": "/bob",
                  "perms": "rw"
                }
              },
              "special": 1,
              "type": "sub",
              "username": "example"
            }
          ]
        }
      ]
    },
    "status": 1
  }
}