nibb

Well-Known Member
Mar 22, 2008
319
5
68
Is it possible to park/unpark domains from a list via the API?

I have a list of domains which I need to automatically park in a cPanel account. Instead of adding them manually I want to run a script that will park them automatically and have another one to remove them.

Is this possible?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Is it possible to park/unpark domains from a list via the API?

I have a list of domains which I need to automatically park in a cPanel account. Instead of adding them manually I want to run a script that will park them automatically and have another one to remove them.

Is this possible?
Yes this is possible.

If you are familiar with PHP, we have park() and unpark() functions in the xmapi.php class available at https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php that you can call from your own PHP scripts. The PHP class helps with authenticating into the cPanel&WHM server, and calling API1/API2 functions like this via the XML API. Refer to the example files at https://github.com/CpanelInc/xmlapi-php for insight on how to use this class.