add (subuser)

Creates a subuser for a user's account. Only one subuser can exist per account.

Request parameters for add (subuser)

Standard parameters

  • action = add
  • object = subuser
  • registrant_ip = valid IP address of the registrant (optional)
  • username = name of the user account

Attributes

Parameters within the attributes associative array are described below.

Parameter nameObligationDefinition/Value
domainRequiredThe relevant domain.
sub_passwordRequiredPassword for the sub-user.
sub_permissionRequiredThe sub_permission value is a bit-mask that indicates which portions of the domain information are changeable by the sub-user. The bits are as follows:

1—Owner
2—Admin
4—Billing
8—Tech
16—Nameservers
32—Rsp_whois_info
sub_usernameRequiredUsername for the sub-user.

Response parameters for add (subuser)

Standard parameters

  • action = reply
  • object = subuser
  • is_success = a Boolean is returned, indicating success or failure of the
    request
  • response_code = response code indicating outcome of the request
  • response_text = message describing the outcome of the request

Examples for add (subuser)

Request

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">add</item>
                <item key="object">subuser</item>
                <item key="domain”>acmeinc.biz</item>
                <item key="username">aaaa</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="sub_password">luda</item>
                        <item key="sub_permission">2</item>
                        <item key="sub_username">subludak</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Response

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">SUBUSER</item>
                <item key="response_text">Command Successful</item>
                <item key="is_success">1</item>
                <item key="response_code">200</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>