UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
The Subaccount user's associated domain that the cPanel account owns.
The Subaccount's password.
Note:
Email, FTP, and Web Disk services use this password.
The username for the Subaccount. The username can only contain alphanumeric characters, dots (.), hyphens (-), and underscores (_).
Note:
This value does not include the domain name.
An alternate email address for the Subaccount's user.
Note:
You must use this parameter if you set the send_invite value to 1.
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.
A phone number for the Subaccount user that conforms to ITU-T's E.164 standards.
Warning:
We reserved this parameter for future use. Do not use this parameter.
The Subaccount user's first and/or last name.
Whether to send a reset password email to the Subaccount's alternate email address.
1- Send.0- Do not send.
Whether to grant the Subaccount email access.
1- Can access.0- Cannot access.
The maximum amount of disk space, in megabytes (MB), allocated to Subaccount's email account.
0orunlimited- The subaccount has unlimited disk space.
This value defaults to the defined system value.
Note:
This value cannot be larger than the system's maximum email quota.
Whether to send client configuration instructions to the account.
1- Send the instructions.0- Do not send the instructions.
Whether to grant the Subaccount FTP access.
1- Can access.0- Cannot access.
The Subaccount's FTP home directory, relative to the cPanel account's home directory.
Note:
- This parameter is required if you enabled the
services.ftp.homedirparameter. - The directory must exist.
Whether to grant the Subaccount Web Disk access.
1_ Can access.0- Cannot access.
Whether to enable the Web Disk Digest Authentication.
1- Enabled.0- Disabled.
Note:
- 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
cpsrvdandcpdavddaemons. - We recommend that you do not use Digest Authentication.
The Subaccount's Web Disk home directory, relative to the cPanel account's home directory.
Note:
This parameter is required if you enable the services.webdisk.enabled parameter.
The Subaccount's file permissions for its Web Disk home directory.
ro- Read-only permissions.rw- Read and write permissions.
Note:
The services.webdisk.homedir parameter determines the Subaccount's Web Disk home directory.
Whether to set the directory's permissions to public or private.
1- Private (0700).0- Public (0755).
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/create_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/create_user
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/create_user?domain=example.com&password=123456luggage&username=example&alternate_email=user%40example.com&avatar_url=https%3A%2F%2Fimg.example.com%2Favatars%2Fexample.jpg&phone_number=%2B15551234567&real_name=John+Doe&send_invite=0&services.email.enabled=1&services.email.quota=500&services.email.send_welcome_email=1&services.ftp.enabled=1&services.ftp.homedir=%2FSubaccount&services.webdisk.enabled=1&services.webdisk.enabledigest=0&services.webdisk.homedir=%2FSubaccount&services.webdisk.perms=rw&services.webdisk.private=1&type=sub'{ "apiversion": 3, "func": "create_user", "module": "UserManager", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function deletes a Subaccount. This function returns only metadata if no other service accounts exist with the same username and domain.
- If one service account uses the same username and domain, the function returns the service account's information.
- If two or more service accounts use the same username and domain, the function returns a hypothetical Subaccount.
Note:
- A hypothetical Subaccount consists of two or more service accounts that use the same username and domain.
- This function returns only metadata if the specified username and domain do not match any service accounts or hypothetical Subaccounts.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/delete_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/delete_user
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/delete_user?domain=example.com&username=example'{ "apiversion": 3, "func": "delete_user", "module": "UserManager", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function removes a service account as a link candidate to create a subaccount or link to a subaccount. When you use this function, the system removes the Link option in cPanel's User Manager interface (cPanel >> Home >> Preferences >> User Manager).
Note:
You must use at least one of the following parameters:
services.email.dismissservices.ftp.dismissservices.webdisk.dismiss
The username for the service account.
Note:
This parameter does not include the domain name.
Whether to dismiss the merge of the email service account.
1- Dismiss.0- Do not dismiss.
Whether to dismiss the merge of the FTP service account.
1- Dismiss.0- Do not dismiss.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/dismiss_merge
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/dismiss_merge
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/dismiss_merge?domain=example.com&username=example1&services.email.dismiss=1&services.ftp.dismiss=1&services.webdisk.dismiss=1'{ "apiversion": 3, "func": "dismiss_merge", "module": "UserManager", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }