---
updatedAt: 2025-11-11T21:44:04.000Z
agentTools:
  projectIndex: https://domains.opensrs.guide/llms.txt
---

# 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.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter name
      </th>

      <th>
        Obligation
      </th>

      <th>
        Definition/Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        domain
      </td>

      <td>
        Required
      </td>

      <td>
        The relevant domain.
      </td>
    </tr>

    <tr>
      <td>
        sub\_password
      </td>

      <td>
        Required
      </td>

      <td>
        Password for the sub-user.
      </td>
    </tr>

    <tr>
      <td>
        sub\_permission
      </td>

      <td>
        Required
      </td>

      <td>
        The **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
      </td>
    </tr>

    <tr>
      <td>
        sub\_username
      </td>

      <td>
        Required
      </td>

      <td>
        Username for the sub-user.
      </td>
    </tr>
  </tbody>
</Table>

## 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
<?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
<?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>
```