You can call cPanel API and UAPI functions through the WHM API.
We introduced this feature in cPanel & WHM version 11.48.
This method is useful, for example, when you develop plugins for WHM users, particularly resellers, but need to access cPanel functions. You can make these calls from within either the WHM or cPanel interfaces.
For more information about WHM API calls, read our documentation.
WHM API calls consist of the following basic parts:
The web server's HTTP address.
Generally, this value is
The port number to access.
|Security Token||The current session's security token.|
The output type to return.
|Function||The WHM API function to call. For cPanel API1, cPanel API2, and UAPI, use the |
The cPanel username for the account through which to call the function.
Make certain that you specify the username in lowercase characters only . cPanel & WHM automatically converts usernames to lowercase when you create a cPanel account. For this reason, if you supply a username that includes some or all capital letters, the call will fail.
|cPanel API or UAPI Module|
The UAPI module name.
Module names are case-sensitive.
|cPanel API or UAPI Function|
The UAPI function name.
Function names are case-sensitive.
|cPanel API Version|
The cPanel API version to use.
If you do not supply this parameter, the system defaults to cPanel API 2.
|Variable Names and Values|
The function's input parameters and their values.