You can find our user documentation at

Check out our new API beta site!

Child pages
  • UAPI - Custom UAPI Modules
Skip to end of metadata
Go to start of metadata



You can add custom modules to cPanel & WHM and call them with UAPI.


Make certain that you thoroughly test custom modules before you attempt to add them to production servers.

Steps to create a custom module

To create a custom module and add it to cPanel & WHM's UAPI, perform the following steps:

  1. Create a Perl module.

    • Save your custom module as the /usr/local/cpanel/Cpanel/API/ file, where Module is the custom module's name.


      cPanel & WHM treats all of the modules in the /usr/local/cpanel/Cpanel/API/ directory as UAPI modules. 

      • We recommend that you only save module files (.pm) to this location.
      • The presence of other files may cause problems, even if the files relate to your custom modules.
    • UAPI modules reside in the Cpanel::API namespace.
  2. Add functions to your module.
    • A single module generally contains many functions.
    • You can cause functions to only work with certain feature lists.
  3. Thoroughly test your module on a non-production server.

Additional resources

For more information about how to write Perl modules, we recommend the following resources: