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/
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 } }
The service to unlink.
emailftpwebdisk
The subaccount's username.
Note:
This value does not include the domain name.
Whether to dismiss the service account as a merge candidate.
1- Dismiss as merge candidate.0- Display as merge candidate.
Note:
If any email, FTP, or Web Disk accounts use the same username, cPanel's User Manager interface (cPanel >> Home >> Preferences >> User Manager) allows you to merge those accounts into a subaccount.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/UserManager/unlink_service_account
- A server running cPanel.
https://cpanel-server.tld:2083/execute/UserManager/unlink_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/unlink_service_account?domain=example.com&service=ftp&username=example&dismiss=0'{ "apiversion": 3, "func": "unlink_service_account", "module": "UserManager", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }