Search in this section

Skip to end of metadata
Go to start of metadata

Instructions for fully automating the registration of a domain.

Table of contents

Preparation

In the example a .com domain is registered.

Activating EPP API

In order to use the EPP API, you must first complete a one-time activation procedure in the AutoDNS user interface.

Creating contact

For the registration of a .com domain a registrant, administrative contact and a technical contact is required. These contacts must be created before registering the domain and can be used for future registrations once created. If the contacts already exist, you can skip this step.

Notice about different TLD Policies

Every registry has different policies regarding the registration of a domain. It would be wise to check beforehand if the contacts are compatible with these registries policies.

Contact Create Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <create>
            <contact:create xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
                <contact:postalInfo type="loc">
                    <contact:name>John Doe</contact:name>
                    <contact:org>Example Inc.</contact:org>
                    <contact:addr>
                        <contact:street>123 Example Street</contact:street>
                        <contact:street>Suite 100</contact:street>
                        <contact:city>Anytown</contact:city>
                        <contact:sp>VA</contact:sp>
                        <contact:pc>20166-6503</contact:pc>
                        <contact:cc>US</contact:cc>
                    </contact:addr>
                </contact:postalInfo>
                <contact:voice x="1234">+1.7035555555</contact:voice>
                <contact:fax>+1.7035555556</contact:fax>
                <contact:email>jon.doe@domain.com</contact:email>
                <contact:disclose flag="0">
                    <contact:voice />
                    <contact:email />
                </contact:disclose>
            </contact:create>
        </create>
        <clTRID>ABC-12345</clTRID>
    </command>
</epp>
Contact Create Response
<epp xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:pro="urn:org:domainrobot:ns:contact:pro-1.0" xmlns:ro="urn:org:domainrobot:ns:contact:ro-1.0" xmlns:xxx="urn:org:domainrobot:ns:contact:xxx-1.0" xmlns:ca="urn:org:domainrobot:ns:contact:ca-1.0" xmlns:cat="urn:org:domainrobot:ns:contact:cat-1.0" xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:jobs="urn:org:domainrobot:ns:contact:jobs-1.0" xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0" xmlns:aero="urn:org:domainrobot:ns:contact:aero-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:hk="urn:org:domainrobot:ns:contact:hk-1.0" xmlns:bank="urn:org:domainrobot:ns:contact:bank-1.0" xmlns:it="urn:org:domainrobot:ns:contact:it-1.0" xmlns:barcelona="urn:org:domainrobot:ns:contact:barcelona-1.0" xmlns:au="urn:org:domainrobot:ns:contact:au-1.0" xmlns:uk="urn:org:domainrobot:ns:contact:uk-1.0" xmlns:swiss="urn:org:domainrobot:ns:contact:swiss-1.0" xmlns:ru="urn:org:domainrobot:ns:contact:ru-1.0">
    <response>
        <result code="1000">
            <msg lang="en">Command completed successfully</msg>
        </result>
        <resData>
            <contact:creData>
                <contact:id>23022508</contact:id>
                <contact:crDate>2017-07-31T12:07:16.000Z</contact:crDate>
            </contact:creData>
        </resData>
        <trID>
            <clTRID>ABC-12345</clTRID>
            <svTRID>DEF-12345</svTRID>
        </trID>
    </response>
</epp>

If the request is successful, the system will return this response Command completed successfully. For the following steps only the ID of the contact is important.

Registration

Starting the domain registration

The domain registration is started with the DomainCreate command. For the registration the following information is needed:

  • Domain name
  • Registration period
  • Nameserver
  • Registrant contact
  • Administrative contact
  • Technical contact


Useful tip

By setting a clTRID the request can be assigned to a poll message. In the example <clTRID>EXAMPLE-123456789</clTRID> is used.

Domain Create Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <create>
            <domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>domain.com</domain:name>
                <domain:period unit="y">1</domain:period>
                <domain:ns>
                    <domain:hostAttr>
                        <domain:hostName>ns1.example.net</domain:hostName>
                    </domain:hostAttr>
                    <domain:hostAttr>
                        <domain:hostName>ns2.example.net</domain:hostName>
                    </domain:hostAttr>
                </domain:ns>
                <domain:registrant>23022508</domain:registrant>
                <domain:contact type="admin">23022508</domain:contact>
                <domain:contact type="tech">23022508</domain:contact>
            </domain:create>
        </create>
        <clTRID>EXAMPLE-123456789</clTRID>
    </command>
</epp>
Domain Create Reponse
<epp xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:ro="urn:org:domainrobot:ns:contact:ro-1.0" xmlns:xxx="urn:org:domainrobot:ns:contact:xxx-1.0" xmlns:ca="urn:org:domainrobot:ns:contact:ca-1.0" xmlns:cat="urn:org:domainrobot:ns:contact:cat-1.0" xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:jobs="urn:org:domainrobot:ns:contact:jobs-1.0" xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0" xmlns:aero="urn:org:domainrobot:ns:contact:aero-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:hk="urn:org:domainrobot:ns:contact:hk-1.0" xmlns:bank="urn:org:domainrobot:ns:contact:bank-1.0" xmlns:it="urn:org:domainrobot:ns:contact:it-1.0" xmlns:barcelona="urn:org:domainrobot:ns:contact:barcelona-1.0" xmlns:au="urn:org:domainrobot:ns:contact:au-1.0" xmlns:uk="urn:org:domainrobot:ns:contact:uk-1.0" xmlns:swiss="urn:org:domainrobot:ns:contact:swiss-1.0" xmlns:ru="urn:org:domainrobot:ns:contact:ru-1.0">
    <response>
        <result code="1001">
            <msg lang="en">Command completed successfully; action pending</msg>
        </result>
        <resData>
            <domain:creData>
                <domain:name>domain.com</domain:name>
            </domain:creData>
        </resData>
        <extension>
            <domainrobot:domain>
                <domainrobot:zonec>1</domainrobot:zonec>
            </domainrobot:domain>
        </extension>
        <trID>
            <clTRID>EXAMPLE-123456789</clTRID>
            <svTRID>20170731-app1-9999</svTRID> </trID>
    </response>
</epp>

Inquiring and confirming poll messages 

By using the domain create command, a job is automatically created which takes care of the registration procedure. As soon as the job is completed, a poll message is generated which can be inquired with the poll command.

Poll Info Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
	<command>
		<poll op="req" />
		<clTRID>ABC-12345</clTRID>
	</command>
</epp>
Poll Info Response
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:ro="urn:org:domainrobot:ns:contact:ro-1.0" xmlns:xxx="urn:org:domainrobot:ns:contact:xxx-1.0" xmlns:ca="urn:org:domainrobot:ns:contact:ca-1.0" xmlns:cat="urn:org:domainrobot:ns:contact:cat-1.0" xmlns:jobs="urn:org:domainrobot:ns:contact:jobs-1.0" xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0" xmlns:aero="urn:org:domainrobot:ns:contact:aero-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:hk="urn:org:domainrobot:ns:contact:hk-1.0" xmlns:bank="urn:org:domainrobot:ns:contact:bank-1.0" xmlns:it="urn:org:domainrobot:ns:contact:it-1.0" xmlns:barcelona="urn:org:domainrobot:ns:contact:barcelona-1.0" xmlns:au="urn:org:domainrobot:ns:contact:au-1.0" xmlns:uk="urn:org:domainrobot:ns:contact:uk-1.0" xmlns:swiss="urn:org:domainrobot:ns:contact:swiss-1.0" xmlns:ru="urn:org:domainrobot:ns:contact:ru-1.0">
  <response>
    <result code="1301">
      <msg lang="en">Command completed successfully; ack to dequeue</msg>
    </result>
    <msgQ count="1" id="880369">
      <qDate>2017-07-14T13:46:33.000Z</qDate>
    </msgQ>
    <resData>
      <domain:panData>
        <domain:name paResult="1">domain.com</domain:name>
        <domain:paTRID>
          <clTRID>EXAMPLE-123456789</clTRID>
          <svTRID>20170731-app1-10001</svTRID>
        </domain:paTRID>
        <domain:paDate>2017-07-31T13:46:33.000Z</domain:paDate>
      </domain:panData>
      <domain:infData>
        <domain:name>ephenodrom23.com</domain:name>
        <domain:registrant>23022508</domain:registrant>
        <domain:contact type="admin">23022508</domain:contact>
        <domain:contact type="tech">23022508</domain:contact>
        <domain:ns>
          <domain:hostAttr>
            <domain:hostName>c.ns14.net</domain:hostName>
          </domain:hostAttr>
          <domain:hostAttr>
            <domain:hostName>d.ns14.net</domain:hostName>
          </domain:hostAttr>
        </domain:ns>
        <domain:crDate>2017-07-14T13:46:23.000Z</domain:crDate>
        <domain:exDate>2019-07-14T13:46:23.000Z</domain:exDate>
        <domain:authInfo>
          <domain:pw>L14HY+jaa45odO0v</domain:pw>
        </domain:authInfo>
      </domain:infData>
    </resData>
    <extension>
      <domainrobot:domain>
        <domainrobot:zonec>23022508</domainrobot:zonec>
        <domainrobot:trustee>0</domainrobot:trustee>
        <domainrobot:privacy>0</domainrobot:privacy>
      </domainrobot:domain>
    </extension>
    <trID>
      <clTRID>a2d8e98e-c703-4368-a986-a1fdfa42b8fe</clTRID>
      <svTRID>20170714-app1-dev-10282</svTRID>
    </trID>
  </response>
</epp>

In order to assign a poll message to a domain registration, use the clTRID (Client Transaction Identifier . In this case the following part is important:

<clTRID>EXAMPLE-123456789</clTRID>

The returned clTRID is the same that was used in the domain create command.

The polling system works using the First-In-First-Out (FIFO) principle. This is why the same poll message is returned until it is confirmed. To confirm a poll message, the ID from the preceeding command is required.

Poll Confirm
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
	<command>
		<poll op="ack" msgID="627787" />
		<clTRID>ABC-12346</clTRID>
	</command>
</epp>
Poll Confirm Response
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg lang="en">Command completed successfully</msg>
        </result>
        <msgQ count="0" id="627787" />
        <trID>
            <clTRID>ABC-12346</clTRID>
        </trID>
    </response>
</epp>

Inquiring Domain Information

If the domain registration was successful, the domain information can be inquired by using the DomainInfo command.

Domain Info Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <info>
            <domain:info xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name hosts="all">domain.de</domain:name>
            </domain:info>
        </info>
        <clTRID>ABC-12345</clTRID>
    </command>
</epp>
Domain Info Response
<epp xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
    <response>
        <result code="1000">
            <msg lang="en">Command completed successfully</msg>
        </result>
        <resData>
            <domain:infData>
                <domain:name>domain.com</domain:name>
                <domain:roid>11109997-domain.com</domain:roid>
                <domain:registrant>23022508</domain:registrant>
                <domain:contact type="admin">23022508</domain:contact>
                <domain:contact type="tech">23022508</domain:contact>
                <domain:ns>
                    <domain:hostAttr>
                        <domain:hostName>ns1.nameserver.com</domain:hostName>
                    </domain:hostAttr>
                    <domain:hostAttr>
                        <domain:hostName>ns2.nameserver.com</domain:hostName>
                    </domain:hostAttr>
                </domain:ns>
                <domain:clID>user1, 4</domain:clID>
                <domain:crID>user1, 4</domain:crID>
                <domain:crDate>2017-07-31T14:44:41.000Z</domain:crDate>
                <domain:upID>user1, 4</domain:upID>
                <domain:upDate>2017-07-31T09:06:49.000Z</domain:upDate>
                <domain:exDate>2018-07-31T14:44:41.000Z</domain:exDate>
                <domain:authInfo>
                    <domain:pw>123ABC456DEF</domain:pw>
                </domain:authInfo>
            </domain:infData>
        </resData>
        <extension>
            <domainrobot:domain xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0">
                <domainrobot:zonec>23022508</domainrobot:zonec>
                <domainrobot:trustee>0</domainrobot:trustee>
                <domainrobot:privacy>0</domainrobot:privacy>
            </domainrobot:domain>
        </extension>
        <trID>
            <clTRID>ABC-12345</clTRID>
        </trID>
    </response>
</epp>