Update DNS records of specific domain. This will replace all existing DNS records of the domain.
Request
Add parameter in header API-Key
Example:API-Key: ********************
Body Params application/json
{
"records": [
{
"type": "A",
"name": "domain.com.",
"value": "135.226.123.12",
"ttl": 900
},
{
"type": "AAAA",
"name": "domain.com.",
"value": "2009:21d0:322:6100::5:c92b",
"ttl": 900
},
{
"type": "MX",
"name": "domain.com.",
"value": "10 mail.domain.com.",
"ttl": 900
},
{
"type": "TXT",
"name": "domain.com.",
"value": "v=spf1 include:spf.mijn.host ~all",
"ttl": 900
}
]
}
Request Code Samples
curl --location --request PUT 'https://mijn.host/api/v2/domains/domain.com/dns' \
--header 'Accept;' \
--header 'User-Agent: my-application/1.0.0' \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"records": [
{
"type": "A",
"name": "domain.com.",
"value": "135.226.123.12",
"ttl": 900
},
{
"type": "AAAA",
"name": "domain.com.",
"value": "2009:21d0:322:6100::5:c92b",
"ttl": 900
},
{
"type": "MX",
"name": "domain.com.",
"value": "10 mail.domain.com.",
"ttl": 900
},
{
"type": "TXT",
"name": "domain.com.",
"value": "v=spf1 include:spf.mijn.host ~all",
"ttl": 900
}
]
}'
Responses
application/json {
"status": 200,
"status_description": "DNS successfully updated"
}
Modified at 2024-10-29 09:40:08