Adding Third Level Domains On-The-Fly and One-Click Installers for Custom Apps

Is there a way to make one-click installers for custom apps? More specifically, my task the following:

  • Once customer signs (performs his/her registration), he/she gets an email with a validation link, - this step is trivial to implement;
  • By clicking that link, my app should create a third-level domain ( for the customer, populate the corresponding directories with required content, set up a DB, etc. I can’t figure out how to implement creation of another third-level domain…
    For the seek of comparison, Plesk™ allows for interacting with its core via RPC calls. Is something similar possible with the Dreamhost’s CP?
    Thanks in advance.