The create command allows you to register a domain name, other objects can be created only as part of the domain name creation operation. In addition to the standard EPP command elements, the create command MUST contain a domain:create command that identifies the domain namespace and the location of the domain schema.
We recommend that you first read about
field definitions and
registrant types, which will explain the allowable values in for the data described below.
Domains
To register a domain via EPP you need to provide the following information:
- The details of the domain itself.
- Details of a new account or the ID of an existing account.
- If you create a new account then you must also supply contact details
- Details of the nameservers.
The identifiers of account and contact objects created as part of the operation are returned in the response.
<domain:create> element
The <domain:create> element contains the following child elements:
- A <domain:name> element. More than one <domain:name> element can be given here to create multiple domain names on the same account. To create multiple domain names on a single account, the 1.1 versions of the nom- schemas must be used.
- An optional <domain:period> element.
- A <domain:account> element. This contains either:
- a <domain:account-id> element containing the identifier of the account object to be used for the domain name; or
- an <account:create> element defining the sub-elements of a account object to be created and used.
- An optional <domain:ns> element containing the nameservers in order for the domain name. This has one to ten <domain:host> sub-elements, each of which will contain the following child elements
- A <domain:hostName> element giving the name of the host object.
- Optional <domain:hostAddr> elements giving the ip addresses of the host object. This element should be provided only if the nameserver needs glue records. It should have an "ip" attribute of "v4" or "v6" indicating the ip version. A maximum of one ipv4 and one ipv6 address can be provided.
- An optional <domain:first-bill>
- An optional <domain:recur-bill>
- An optional <domain:auto-bill>
- An optional <domain:next-bill> The <domain:next-bill> element is removed after renewal.
- An optional <domain:notes>
- An optional <domain:reseller> element. Note that this is only available in the 2.0 versions of the nom- schemas
<domain:creData> element
The <domain:creData> element is returned in the response and describes the domain name that has been created. It contains the following sub-elements:
- A <domain:name> element.
- If an account object was created for the registrant, a <domain:account> field containing an <account:creData> sub-element giving details of the created account object. The <account:creData> element is described below.
- A <domain:crDate> element.
- A <domain:exDate> element .
If multiple <domain:name> elements are provided in the request, the <domain:creData> element will be repeated for each domain name.
Accounts
Accounts can only be created as part of the domain creation process. Once an account has been created you can add domains to it by specifying the ID of the account.
<account:create> element
The <account:create> element will have the following sub-elements:
- An <account:name> element.
- An optional <account:trad-name> element.
- An <account:type> element.
- An <account:opt-out> element.
- One to three <account:contact> elements giving admin contacts to be added to the account. The <account:contact> element has an order attribute that may be of values "1", "2" or "3" and has a single element which is of the following type:
- <contact:create> defining the sub-elements of the contact to be created.
- An <account:addr> element giving the admin address for the account. The <account:addr> element has the following sub-elements defining the parts of the address:
- <account:street>
- <account:city>
- <account:county>
- <account:postcode>
- <account:country>
<account:creData> element
The <account:creData> element is returned in a response and describes the account object that has been created. It contains the following sub-elements:
- An <account:roid> element giving the repository object identifier for the domain name. An <account:name> element giving the name of the account holder (registrant of the domain name).
- If any contact objects were created, an <account:contact> element with type and main attributes for each one. This contains a single <contact:creData> element giving the details of the created contact object. This sub-element is described below.
Contacts
Contacts can be created during domain name creation or update of an existing registration.
<contact:create> element
The <contact:create> element has the following sub-elements:
- A <contact:name> element.
- A <contact:email> element.
- An optional <contact:phone>
- An optional <contact:mobile>
<contact:creData> element
The <contact:creData> element describes a contact object that has been created and contains the following sub-elements:
- A <contact:roid> element giving the repository object identifier for the contact object.
- A <contact:name> element giving the name of the contact object.
Examples
Registering a domain and creating a new account
This is an example of a create command where the account id is not known and a new account object is created. Two existing nameservers are referenced and a new one is created and then referenced:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
epp-1.0.xsd">
<command>
<create>
<domain:create
xmlns:domain="http://www.nominet.org.uk/epp/xml/nom-domain-2.0"
xsi:schemaLocation="http://www.nominet.org.uk/epp/xml/nom-domain-2.0
nom-domain-2.0.xsd">
<domain:name>example.co.uk</domain:name>
<domain:period>2</domain:period>
<domain:account>
<account:create
xmlns:account="http://www.nominet.org.uk/epp/xml/nom-account-2.0"
xmlns:contact="http://www.nominet.org.uk/epp/xml/nom-contact-2.0">
<account:name>Mr R. Strant</account:name>
<account:trad-name>R. S. Industries</account:trad-name>
<account:type>LTD</account:type>
<account:co-no>NI123456</account:co-no>
<account:opt-out>N</account:opt-out>
<account:addr>
<account:street>2102 High Street</account:street>
<account:city>Oxford</account:city>
<account:county>Oxfordshire</account:county>
<account:postcode>OX1 1DF</account:postcode>
<account:country>GB</account:country>
</account:addr>
<account:contact order="1">
<contact:create>
<contact:name>Mr R. Strant</contact:name>
<contact:phone>01865 123456</contact:phone>
<contact:email>r.strant@strant.co.uk</contact:email>
</contact:create>
</account:contact>
<account:contact order="2">
<contact:create>
<contact:name>Ms S. Strant</contact:name>
<contact:phone>01865 123457</contact:phone>
<contact:email>s.strant@strant.co.uk</contact:email>
</contact:create>
</account:contact>
</account:create>
</domain:account>
<domain:ns>
<domain:host>
<domain:hostName>ns0.epp-example.com</domain:hostName>
</domain:host>
<domain:host>
<domain:hostName>ns0.epp-example.co.uk</domain:hostName>
<domain:hostAddr ip="v4">111.123.145.121</domain:hostAddr>
<domain:hostAddr ip="v6">abcd::1234</domain:hostAddr>
</domain:host>
</domain:ns>
<domain:recur-bill>bc</domain:recur-bill>
</domain:create>
</create>
<clTRID>ABC-12345</clTRID>
</command>
</epp>
Registering a new domain onto an existing account
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
epp-1.0.xsd">
<command>
<create>
<domain:create
xmlns:domain="http://www.nominet.org.uk/epp/xml/nom-domain-2.0"
xsi:schemaLocation="http://www.nominet.org.uk/epp/xml/nom-domain-2.0
nom-domain-2.0.xsd">
<domain:name>example1.co.uk</domain:name>
<domain:account>
<domain:account-id>1000</domain:account-id>
</domain:account>
<domain:recur-bill>bc</domain:recur-bill>
</domain:create>
</create>
<clTRID>ABC-12345</clTRID>
</command>
</epp>
Response to registering a domain and creating a new account
This is an example of a successful create response where an account object was created as part of the operation:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
epp-1.0.xsd">
<response>
<result code="1000">
<msg>Command completed successfully </msg>
</result>
<resData>
<domain:creData
xmlns:domain="http://www.nominet.org.uk/epp/xml/nom-domain-2.0"
xmlns:account="http://www.nominet.org.uk/epp/xml/nom-account-2.0"
xmlns:contact="http://www.nominet.org.uk/epp/xml/nom-contact-2.0"
xsi:schemaLocation="http://www.nominet.org.uk/epp/xml/nom-domain-2.0
nom-domain-2.0.xsd">
<domain:name>example.co.uk</domain:name>
<domain:account>
<account:creData>
<account:roid>100029-UK</account:roid>
<account:name>Mr R. Strant</account:name>
<account:contact type="admin" order="1">
<contact:creData>
<contact:roid>C100081-UK</contact:roid>
<contact:name>Mr R. Strant</contact:name>
</contact:creData>
</account:contact>
<account:contact type="admin" order="2">
<contact:creData>
<contact:roid>C100082-UK</contact:roid>
<contact:name>Ms S. Strant</contact:name>
</contact:creData>
</account:contact>
</account:creData>
</domain:account>
<domain:crDate>2005-10-14T13:40:50</domain:crDate>
<domain:exDate>2007-10-14T13:40:50</domain:exDate>
</domain:creData>
</resData>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>102497</svTRID>
</trID>
</response>
</epp>
Notes:
- In accordance with the EPP RFC 4930, object identifiers are globally unique - this is achieved by appending the IANA administered identifier '-UK' to the registry identifier. This suffix may be included when using the identifier in requests but is not mandatory.
Response to registering a domain onto an existing account
This is an example of a successful create response where no objects (other than the domain name) were created as part of the operation:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
epp-1.0.xsd">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<domain:creData
xmlns:domain="http://www.nominet.org.uk/epp/xml/nom-domain-2.0"
xsi:schemaLocation="http://www.nominet.org.uk/epp/xml/nom-domain-2.0
nom-domain-2.0.xsd">
<domain:name>example1.co.uk</domain:name>
<domain:crDate>2005-10-14T13:30:48</domain:crDate>
<domain:exDate>2007-10-14T13:30:48</domain:exDate>
</domain:creData>
</resData>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>102493</svTRID>
</trID>
</response>
</epp>