Zone:create

Create a new zone for one of your domains

To create a new zone for one of your domains, send the following request to our API server. You may only create zones for domains that are in your account and that use our nameservers. The element \<zone:record> may be repeated to specify multiple records for the new zone.

If you try to create a zone for a domain that has already a zone, the API server will return an error. To force the creation, set the attribute \<zone:replace> to true. In this case the API server will remove existing zones if necessary.

XML Template
<?xml version="1.0" encoding="UTF-8"?>
    <request xmlns:zone="http://www.eurodns.com/zone" xmlns:record="http://www.eurodns.com/record">
        <zone:create>
            <zone:name>#DOMAIN.TLD#</zone:name>
            <zone:replace>#REPLACE#</zone:replace>
            <zone:records>
                <zone:record>
                    <record:type>#RECORD TYPE#</record:type>
                    <record:host>#RECORD HOST#</record:host>
                    <record:data>#RECORD DATA#</record:data>
                    <record:ttl>#RECORD TTL#</record:ttl>
                    <record:mx_priority>#RECORD MX PRIORITY#</record:mx_priority>
                    <record:refresh>#RECORD REFRESH#</record:refresh>
                    <record:retry>#RECORD RETRY#</record:retry>
                    <record:expire>#RECORD EXPIRE#</record:expire>
                    <record:minimum>#RECORD MINIMUM#</record:minimum>
                    <record:serial>#RECORD SERIAL#</record:serial>
                    <record:resp_person>#RECORD RESP PERSON#</record:resp_person>
                    <record:weight>#RECORD WEIGHT#</record:weight>
                    <record:port>#RECORD PORT#</record:port>
                    <record:flag>#RECORD FLAG#</record:flag>
                    <record:tag>#RECORD TAG#</record:tag>
                </zone:record>
            </zone:records>
        </zone:create>
    </request>

<zone:create> (Occurrences: 1)

R #DOMAIN.TLD# The name of the domain to create the zone for
O #REPLACE# If set to true, the API will remove an existing zone

<zone:records> (Occurrences: 1)

<zone:record> (Occurrences: 1+)

Note: Repeat this section to specify multiple records

R #RECORD TYPE# Type of the record (SOA, NS, PTR, MX, A, CNAME, AAAA, TXT, APEX, CAA)
R #RECORD HOST# Host of the record
R #RECORD DATA# Data of the record
R/O #RECORD TTL# How long to cache records retrieved from the zone file (600, 900, 1800, 3600, 7200, 14400, 21600, 43200, 86400, 172800, 432000, 604800)
R/O #RECORD MX PRIORITY# If record type is MX, priority of the MX record (10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
R/O #RECORD REFRESH# If record type is SOA, how often secondary DNS servers should check if changes are made to the zone
R/O #RECORD RETRY# If record type is SOA.
R/O #RECORD EXPIRE# If record type is SOA, how long the zone will be valid after a refresh.
R/O #RECORD MINIMUM# If record type is SOA, used as the default TTL for new records created within the zone.
R/O #RECORD SERIAL# If record type is SOA, used by secondary DNS servers to check if the zone has changed
R/O #RECORD RESP PERSON# If record type is SOA, specifies the domain mailbox name for a responsible person
R/O #RECORD WEIGHT# If record type is SRV
R/O #RECORD PORT# If record type is SRV
R/O #RECORD FLAG# The issuer critical flag (in case of CAA record)
R/O #RECORD TAG# The tag (issue/issuewild/iodef, in case of CAA record)
If the action was successful, the following code will be returned:
<?xml version="1.0" encoding="UTF-8"?>
    <response xmlns="http://www.eurodns.com/">
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
    </response>
Request example:
<request xmlns:zone="http://www.eurodns.com/zone" xmlns:record="http://www.eurodns.com/record">
    <zone:create>
        <zone:name>domain.tld</zone:name>
        <zone:replace>true</zone:replace>
        <zone:records>

            <zone:record>
                <record:type>MX</record:type>
                <record:host>@</record:host>
                <record:data>mail</record:data>
                <record:ttl>3600</record:ttl>
                <record:mx_priority>10</record:mx_priority>
            </zone:record>

            <zone:record>
                <record:type>A</record:type>
                <record:host>@</record:host>
                <record:data>80.92.66.130</record:data>
                <record:ttl>3600</record:ttl>
            </zone:record>

            <zone:record>
                <record:type>A</record:type>
                <record:host>*</record:host>
                <record:data>80.92.66.130</record:data>
                <record:ttl>3600</record:ttl>
            </zone:record>

            <zone:record>
                <record:type>A</record:type>
                <record:host>www</record:host>
                <record:data>80.92.66.130</record:data>
                <record:ttl>3600</record:ttl>
            </zone:record>

            <zone:record>
                <record:type>A</record:type>
                <record:host>mail</record:host>
                <record:data>80.92.66.174</record:data>
                <record:ttl>3600</record:ttl>
            </zone:record>

        </zone:records>
    </zone:create>
</request>
The previous XML template will create the following zone:
; zone file for domain.tld
ttl 3600 
domain.tld  IN SOA ns1.eurodns.com. hostmaster.eurodns.com. (
                            2008010200 ; serial
                            86400 ; refresh
                            604800 ; expire
                            86400 ; minimum
                        ) 

@       3600     IN NS      ns1.eurodns.com.
@       3600     IN NS      ns2.eurodns.com.
@       3600     IN NS      ns3.eurodns.com.
@       3600     IN NS      ns4.eurodns.com.
        3600     IN MX 10   mail

; IPV4 server host definition
*       3600     IN A       80.92.66.130
@       3600     IN A       80.92.66.130
mail    3600     IN A       80.92.66.174
www     3600     IN A       80.92.66.130

Legend

O The element is optional and does not have to be specified in the request and/or answer
R The element is mandatory and has to specified in the request and/or answer