Update DNS zone record
PUT
https://api.lws.net/v1/
operationIdputDomainZdns
Update an existing DNS zone record for the specified domain. The ID for the record can be found by running a GET request on the domain's DNS zone. If the record does not exists, it will be added instead
Path parameters
-
domainstring required -
Domain name whose DNS record to update
Request body
application/json
-
idintegerrequiredID of the record to update
-
typestringrequiredType of DNS record
-
namestringrequiredRecord name
-
valuestringrequiredRecord value
-
ttlintegerrequiredTime To Live in seconds
Example request
{
"id": 234851,
"type": "A",
"name": "@",
"value": "192.0.2.1",
"ttl": 86400
}
Responses
200
DNS record updated successfully
{
"code": 200,
"info": "Updated record",
"data": {
"id": "568470",
"type": "AAAA",
"name": "@",
"value": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
"ttl": 86400
}
}
Response fields 8 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobject -
idintegerID of the record. Used for record-specific function like DELETE
-
typestringType of field to add to the DNS Zone. Must be A, AAAA, CNAME, ANAME, MX, NS, TXT, SRV, SPF or CAA
-
namestringName of the field to add to the DNS Zone. Its content depends on the type of record to add. For example, @ or mail for A records, www for CNAME records, @ for NS, etc...
-
valuestringValue of the field to add to the DNS Zone. It could be an IP address, a domain name, a DNS, ...
-
ttlintegerTime To Live of the field to add to the DNS Zone. Must be 86400, 43200, 21600, 7200, 3600, 1800 or 900
314
Domain not found on account
314 is not a registered HTTP status code. It is specific to this API.
{
"code": 314,
"info": "Provided domain has not been found on your account. You must own this domain to manage it."
}
Response fields 2 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
400
Invalid input
{
"code": 400,
"info": "Invalid input",
"data": []
}
Response fields 3 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobjectDetails about validation errors
500
Internal Server Error
{
"code": 500,
"info": "Internal Server Error",
"data": "string"
}
Response fields 3 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
datastringError message
502
Bad Gateway
{
"code": 502,
"info": "Invalid response from upstream server",
"data": []
}
Response fields 3 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobjectInvalid response returned by the server
401
Unauthorized - Missing authentication headers
{
"code": 401,
"info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Response fields 2
-
codeinteger -
infostring
429
Rate limit exceeded
{
"code": 429,
"info": "Rate limit exceeded. Please try again later."
}
Response fields 2
-
codeinteger -
infostring