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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Team/add_roles
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Team/add_roles
- 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/Team/add_roles?role=database&user=teamuser'{ "apiversion": 3, "func": "add_roles", "module": "Team", "result": { "data": {}, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Send an email to the team user that allows them to set their own password.
1- Enabled.
Note:
- You must pass either the
passwordoractivation_emailparameter.
The epoch time on which the team user account expires, or the offset from the current time, in days. Integers are treated as Unix Epoch Time unless followed by 'days'.
The reason for expiration.
Notes about the new team user. This field should not contain private information. Maximum of 100 characters.
The password to set for the new team user.
Note:
- You must pass either the
passwordoractivation_emailparameter.
A comma-separated list of roles assigned to the new team user. Current roles include admin, database, email, web.
Whether to create an email subaccount for the team user. A subaccount is always created for a team user, but it does not have any associated service subaccounts by default.
1- Create an email subaccount.0- Do Not create an email subaccount.
The maximum amount of disk space, in megabytes (MB), allocated to the team user'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 create an FTP subaccount for the team user. A subaccount is always created for a team user, but it does not have any associated service subaccounts by default.
1- Create an FTP subaccount.0- Do Not create an FTP subaccount.
The team user'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 create a Web Disk subaccount for the team user. A subaccount is always created for a team user, but it does not have any associated service subaccounts by default.
1- Create a Web Disk subaccount.0- Do Not create a Web Disk subaccount.
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 team user'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 team user'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 team user's Web Disk home directory.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Team/add_team_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Team/add_team_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/Team/add_team_user?email1=teamuser%40example.com&user=teamuser&activation_email=1&email2=teamuser-backup%40example.com&expire_date=0&expire_reason=teamUser+gave+a+two+week+notice.¬es=This+is+a+note+about+teamuser&password=securepassword&roles=email%2Cdatabase&services.email.enabled=1&services.email.quota=500&services.ftp.enabled=1&services.ftp.homedir=%2FTeamusername&services.webdisk.enabled=1&services.webdisk.enabledigest=0&services.webdisk.homedir=%2FTeamusername&services.webdisk.perms=rw&services.webdisk.private=1'{ "apiversion": 3, "func": "add_team_user", "module": "Team", "result": { "data": 1674575562, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Team/cancel_expire
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Team/cancel_expire
- 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/Team/cancel_expire?user=teamUser'{ "apiversion": 3, "func": "expire_team_user", "module": "Team", "result": { "data": {}, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }