API-key: ********************
{
"alias": "My DNS Template",
"default": false,
"records": [
{
"type": "A",
"name": "",
"value": "192.168.1.1",
"ttl": 300
},
{
"type": "CNAME",
"name": "www",
"value": "www.example.nl",
"ttl": 300
},
{
"type": "CNAME",
"name": "mail",
"value": "mail.example.nl",
"ttl": 300
},
{
"type": "MX",
"name": "",
"value": "mail.example.nl",
"ttl": 300,
"priority": 10
},
{
"type": "TXT",
"name": "",
"value": "v=spf1 include:_spf.example.nl ~all",
"ttl": 7200
},
{
"type": "AAAA",
"name": "",
"value": "2001:41d0:302:1100:0:0:5:b92b",
"ttl": 7200
}
]
}
curl --location --request PUT 'https://mijn.host/api/v2/domains/dns-templates/1000' \
--header 'Accept;' \
--header 'User-Agent: my-application/1.0.0' \
--header 'API-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"alias": "My DNS Template",
"default": false,
"records": [
{
"type": "A",
"name": "",
"value": "192.168.1.1",
"ttl": 300
},
{
"type": "CNAME",
"name": "www",
"value": "www.example.nl",
"ttl": 300
},
{
"type": "CNAME",
"name": "mail",
"value": "mail.example.nl",
"ttl": 300
},
{
"type": "MX",
"name": "",
"value": "mail.example.nl",
"ttl": 300,
"priority": 10
},
{
"type": "TXT",
"name": "",
"value": "v=spf1 include:_spf.example.nl ~all",
"ttl": 7200
},
{
"type": "AAAA",
"name": "",
"value": "2001:41d0:302:1100:0:0:5:b92b",
"ttl": 7200
}
]
}'
{
"status": 200,
"status_description": "DNS template updated"
}