hookable event of addon domain creation?


Staff member
Apr 11, 2011
Hello @binooetomo,

You can find the corresponding API function for a hook by enabling "Debug mode is on. The system displays information about every stage for every hookable event, even if no hooks exist for that stage." under the "Development" tab in "WHM >> Tweak Settings". Then, perform the specific action you want to hook into via cPanel or WHM, and watch the output in /usr/local/cpanel/logs/error_log.

For example, the following cPanel API 2 function is the hook event to utilize when creating a hook for the addition of a new domain using cPanel >> Addon Domains:


This API function is documented at:

cPanel API 2 Functions - AddonDomain::addaddondomain - Developer Documentation - cPanel Documentation

You can find general documentation on using hooks with cPanel functions at:

Guide to Standardized Hooks - Cpanel Functions - Software Development Kit - cPanel Documentation

You may also find the following tutorial helpful:

Tutorial - How to Setup Standardized Hooks with BASH in cPanel & WHM

Thank you.