- Reference (v1)
- Domains
- Update DNS information for a domain
Version: API v1
Update DNS information for a domain
PUT/v1/accounts/{accountIdentifier}/dns/{domainIdentifier}
API version
v1
Request method
PUT
Operation ID
updateDnsRecords
Updates DNS records for all available types
Request
- accountIdentifierstringrequired
Name or UID of the account
- domainIdentifierstringrequired
Name of the domain or subdomain
Format
application/json
- mxone of 2 alternatives
- Alternativearray of object
- Array[
- *object
- priorityintegerrequired
- valuestringrequired
]
- Alternativestring (one of: AUTO, NONE)
- *string (one of: AUTO, NONE)
- targetone of 2 alternatives
- Alternativestring
CNAME (only allowed for subdomains)
- *string
CNAME (only allowed for subdomains)
- Alternativeobject
- astringrequired
- aaaastring
- nsarray of string
- Array[
- *string
]
- txtarray of string
- Array[
- *string
]
- srvarray of object
- Array[
- *object
- servicestringrequired
- protocolstring (one of: tcp, udp, tls)required
- serverstringrequired
- prioritynumberrequired
- weightnumberrequired
- portnumberrequired
]
- caaarray of object
- Array[
- *object
- tagstring (one of: issue, issuewild, iodef)required
- flagnumber (one of: 0, 128)required
- domainstringrequired
]
Content-Type: application/json
{
"mx": [
{
"priority": 123,
"value": "string"
}
],
"target": "mittwald.de",
"ns": [
"string"
],
"txt": [
"string"
],
"srv": [
{
"service": "string",
"protocol": "tcp",
"server": "string",
"priority": 123,
"weight": 123,
"port": 123
}
],
"caa": [
{
"tag": "issue",
"flag": 123,
"domain": "string"
}
]
}
{
"type": "object",
"properties": {
"mx": {
"oneOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"priority",
"value"
],
"properties": {
"priority": {
"type": "integer"
},
"value": {
"type": "string"
}
}
}
},
{
"type": "string",
"enum": [
"AUTO",
"NONE"
]
}
]
},
"target": {
"oneOf": [
{
"type": "string",
"description": "CNAME (only allowed for subdomains)",
"example": "mittwald.de"
},
{
"type": "object",
"required": [
"a"
],
"properties": {
"a": {
"type": "string"
},
"aaaa": {
"type": "string"
}
}
}
]
},
"ns": {
"type": "array",
"items": {
"type": "string"
}
},
"txt": {
"type": "array",
"items": {
"type": "string"
}
},
"srv": {
"type": "array",
"items": {
"type": "object",
"required": [
"service",
"protocol",
"server",
"priority",
"weight",
"port"
],
"properties": {
"service": {
"type": "string"
},
"protocol": {
"type": "string",
"enum": [
"tcp",
"udp",
"tls"
]
},
"server": {
"type": "string"
},
"priority": {
"type": "number"
},
"weight": {
"type": "number"
},
"port": {
"type": "number"
}
}
}
},
"caa": {
"type": "array",
"items": {
"type": "object",
"required": [
"tag",
"flag",
"domain"
],
"properties": {
"tag": {
"type": "string",
"enum": [
"issue",
"issuewild",
"iodef"
]
},
"flag": {
"type": "number",
"enum": [
0,
128
]
},
"domain": {
"type": "string"
}
}
}
}
}
}
Responses
Format
application/json
Description
Successful operation
- messagestring
Content-Type: application/json
{
"message": "string"
}
{
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
Format
application/json
Description
Validation exception
- fieldstring
- messagestringrequired
Error message
- validationErrorsarray of object
List of validation errors
- Array[
- *object
- contextobject
- namestring
- messagestring
- pathstring
]
Content-Type: application/json
{
"field": "string",
"message": "string",
"validationErrors": [
{
"context": {
"name": "string"
},
"message": "string",
"path": "string"
}
]
}
{
"type": "object",
"required": [
"message"
],
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string",
"description": "Error message"
},
"validationErrors": {
"type": "array",
"description": "List of validation errors",
"items": {
"type": "object",
"properties": {
"context": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"message": {
"type": "string"
},
"path": {
"type": "string"
}
}
}
}
}
}
Usage examples
$ curl \
--fail \
--location \
-X PUT \
-d '{"mx":[{"priority":123,"value":"string"}],"target":"mittwald.de","ns":["string"],"txt":["string"],"srv":[{"service":"string","protocol":"tcp","server":"string","priority":123,"weight":123,"port":123}],"caa":[{"tag":"issue","flag":123,"domain":"string"}]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v1/accounts/string/dns/string