Introduction :
API logging in cPanel records interactions with the system’s API, tracking requests, responses, and errors. It’s a crucial resource for developers and administrators, enabling them to monitor and troubleshoot API usage effectively, ensuring smooth integration and system functionality. Understanding API logging in cPanel is essential for optimizing development workflows and maintaining the integrity of server operations.
Prerequisite:
- Root Access or sudo Privileges
- Knowledge of the User’s Username
- Access to the WHM
Procedure:
Step1:Login into WHM.

Step2: Navigate to Home -> Server Configuration -> Tweak Settings ->
Step3:Click the Logging tab, choose “on” under Enable cPanel API Log, and then click Save.

After enabling the log within 24 to 48 hours the logging will be stored under the /usr/local/cpanel/logs/api_log file.
Conclusion:
Enabling the cPanel API Log helps administrators monitor API requests, responses, and errors more effectively. This log is useful for troubleshooting API-related issues, identifying failed requests, and verifying API activity on the server. Once enabled from WHM, the API log will be generated under /usr/local/cpanel/logs/api_log within 24 to 48 hours. Regularly reviewing this log helps maintain better server security, stability, and proper API functionality.