cPanel & WHM Version 108 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Contact Manager -> Communication Types API

oldchili shared this idea 6 years ago
Open Discussion

As a server administrator I would like to be able to set the contacts used in /var/cpanel/clevels.conf using an API call, to avoid having to manually adjust the settings in the file.

Replies (1)


For now, you can get by with a scripted approach using Perl's WWW::Mechanize library (or selenium, etc.).

I wrote a small script and pasted it up on GitHub based on WWW::Mechanize:

Do be aware that the POST endpoint for scripts2/saveeditcontact will actually *set all values to zero* if you don't pass in every single key found in /var/cpanel/clevels.conf (in the example script I warn about it, but they can be passed in like --CONTACTAIM 1, ...). The script also has a --host flag if you don't wanna operate on

Leave a Comment
Attach a file