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/UserManager/lookup_service_account
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/lookup_service_account
- 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/lookup_service_account?full_username=username%40example.com&type=email'{ "apiversion": 3, "func": "lookup_service_account", "module": "UserManager", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/lookup_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/lookup_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/lookup_user?guid=EXAMPLE1%3AEXAMPLE.COM%3A564CD663%253AFE50072F2620B50988EA4E5F46022546FBE6BDDE3C36C2F2534F4967C661EC37'{ "apiversion": 3, "func": "lookup_user", "module": "UserManager", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function links service accounts to subaccounts and creates a subaccount if one does not exist.
Note:
You can only link email, FTP, or Web Disk accounts.
Important
You must use at least one of the following parameters:
- services.email.merge
- services.ftp.merge
- services.webdisk.merge
To link multiple service accounts, the service accounts must share the same username and domain.
The username for the service account that meets the account name limitations.
- Length - 64 characters
- Characters —
a-z,A-Z,0-9, dot (.), hyphen (-), underscore (_).
Note:
This value does not include the domain name.
Whether to link the email account to the subaccount.
1- Merge.0- Do not merge.
Whether to link the FTP account to the subaccount.
1- Merge.0- Do not merge.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/merge_service_account
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/merge_service_account
- 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/merge_service_account?domain=example.com&username=example&services.email.merge=1&services.ftp.merge=1&services.webdisk.merge=1'{ "apiversion": 3, "func": "merge_service_account", "module": "UserManager", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }