Request Samples

Creating domain accounts under different Plesk users

Domain accounts can be created by Plesk Administrator, Plesk resellers or Plesk clients.

Here is a sample request packet that can be used by a Plesk client to create a domain account with Web hosting. The account is created with a minimal collection of Web hosting settings.

<packet version="1.6.0.1">
<domain>
    <add>
      <gen_setup>
        <name>sample.com</name>
        <ip_address>192.0.2.48</ip_address>
      </gen_setup>
      <hosting>
        <vrt_hst>
          <property>
            <name>ftp_login</name>
            <value>ftp16se4fdf0</value>
          </property>
          <property>
            <name>ftp_password</name>
            <value>qweqwe</value>
          </property>
          <ip_address>192.0.2.48</ip_address>
        </vrt_hst>
      </hosting>
    </add>
  </domain>
</packet>

The packet doing the same but in the protocol version earlier than 1.5.0.0:

<packet version="1.4.2.0">
<domain>
<add>
   <gen_setup>
      <name>sample.com</name>
      <htype>vrt_hst</htype>
      <ip_address>192.0.2.48</ip_address>
   </gen_setup>
   <hosting>
      <vrt_hst>
          <ftp_login>ftp16se4fdf0</ftp_login>
          <ftp_password>qweqwe</ftp_password>
          <ip_address>192.0.2.48</ip_address>
       </vrt_hst>
    </hosting>
</add>
</domain>
</packet>

The following packet sent by Plesk Administrator specifies the Plesk user who owns this domain:

<packet version="1.6.0.0">
<domain>
<add>
   <gen_setup>
      <name>newdomain.com</name>
      <owner-id>1234</owner-id>
      <htype>vrt_hst</htype>
      <ip_address>192.0.2.123</ip_address>
      <status>0</status>
   </gen_setup>
   <hosting>
      <vrt_hst>
          <ftp_login>c4u7dwbc2y8</ftp_login>
          <ftp_password>qweqwe</ftp_password>
          <ip_address>192.0.2.54</ip_address>
       </vrt_hst>
    </hosting>
</add>
</domain>
</packet>

 

Creating multiple domain accounts

To create two domain accounts with a single packet, include two different add nodes:

<packet version="1.4.2.0">
<domain>
<add>
   <gen_setup>
      <name>example.com</name>
      <htype>vrt_hst</htype>
      <ip_address>192.0.2.123</ip_address>
      <status>0</status>
   </gen_setup>
   <hosting>
      <vrt_hst>
          <ftp_login>c4u7dwbc2y8</ftp_login>
          <ftp_password>qweqwe</ftp_password>
          <ip_address>192.0.2.54</ip_address>
       </vrt_hst>
    </hosting>
</add>
<add>
   <gen_setup>
      <name>sample.com</name>
      <ip_address>192.0.2.124</ip_address>
      <status>0</status>
   </gen_setup>
   <hosting>
      <vrt_hst>
          <ftp_login>c4u7dwbc2y8</ftp_login>
          <ftp_password>qweqwe</ftp_password>
          <ip_address>192.0.2.54</ip_address>
       </vrt_hst>
    </hosting>
</add>
</domain>
</packet>

 

Using a particular domain template

The following sample packet creates a domain account based on the domain template.

<packet version="1.4.2.0">
<domain>
<add>
   <gen_setup>
      <name>example.com</name>
      <htype>vrt_hst</htype>
      <ip_address>192.0.2.123</ip_address>
      <status>0</status>
   </gen_setup>

   <hosting>
      <vrt_hst>
          <ftp_login>c4u7dwbc2y8</ftp_login>
          <ftp_password>qweqwe</ftp_password>
          <ip_address>192.0.2.54</ip_address>
       </vrt_hst>
    </hosting>
   <template-name>base_template</template-name>
</add>
</domain>
</packet>

Note: To see the sample packets that set optional domain settings (hosting settings, limits, preferences, and others), refer to the related section in the Domain Settings section.