API: OpenSRS

OpenSRS API Guide: Domains and SSL

Welcome to the OpenSRS API guide. Here you will find comprehensive documentation regarding our domain and SSL services. We hope this guide will help you start working with OpenSRS as quickly as possible. If you have any questions or concerns, please do not hesitate to contact help@opensrs.com

Get Started

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 name
Obligation
Definition/Value

domain

Required

The relevant domain.

sub_password

Required

Password for the sub-user.

sub_permission

Required

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

sub_username

Required

Username 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>

add (subuser)

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