DNS Zone

/dns-zone

POST

Create a new DNS zone.

JSON request

name string The domain name
records array
type string One of ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘SRV’ or ‘TXT’.
name string The name specificly for type
content string The content specificly for type
ttl string The Time To Live (TTL) for this record
priority string Only relevant for MX records

JSON response

object: DNS Zone

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "name": "example.com",
        "records": [
            {
                "type": "MX",
                "name": "mail.example.com",
                "content": "mx1.example.net",
                "ttl": 3600,
                "priority": 10
            },
            {
                "type": "MX",
                "name": "mail.example.com",
                "content": "mx2.example.net",
                "ttl": 3600,
                "priority": 20
            },
            {
                "type": "A",
                "name": "example.com",
                "content": "1.2.3.4",
                "ttl": 3600
            },
            {
                "type": "A",
                "name": "*.example.com",
                "content": "1.2.3.4",
                "ttl": 3600
            },
            {
                "type": "CNAME",
                "name": "google.example.com",
                "content": "google.com",
                "ttl": 3600
            }
        ]
    }
' \
"{{api_base_url}}/dns-zone" | python -m json.tool

/dns-zone/{name}

GET

JSON response

object: DNS Zone

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/dns-zone/{id}" | python -m json.tool

PUT

Update an existing DNS zone.

JSON request

records array
type string One of ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘SRV’ or ‘TXT’.
name string The name specificly for type
content string The content specificly for type
ttl string The Time To Live (TTL) for this record
priority string Only relevant for MX records

JSON response

object: DNS Zone

Possible errors

Sample

curl \
--request PUT \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "records": [
            {
                "type": "MX",
                "name": "mail.example.com",
                "content": "mx1.example.net",
                "ttl": 3600,
                "priority": 10
            },
            {
                "type": "MX",
                "name": "mail.example.com",
                "content": "mx2.example.net",
                "ttl": 3600,
                "priority": 20
            },
            {
                "type": "A",
                "name": "example.com",
                "content": "1.2.3.4",
                "ttl": 3600
            },
            {
                "type": "A",
                "name": "*.example.com",
                "content": "1.2.3.4",
                "ttl": 3600
            },
            {
                "type": "CNAME",
                "name": "google.example.com",
                "content": "google.com",
                "ttl": 3600
            }
        ]
    }
' \
"{{api_base_url}}/dns-zone/{id}" | python -m json.tool