This method adds a record to an existing domain. It requires the following information to be posted in order to successfully create the record:
URI {recordType} value: “ARecord”
Field | Sample data |
aHostName
|
“www” – this is the host name excluding the domain |
aIPAddress | “1.2.3.4” – this is an IPv4 address |
aTTL | “3600” – This is the number of seconds from 60 and above |
aALFPacId (optional) | “” – Empty quotes unless you provide an ID |
aGeoZoneId (optional) | “” – Empty quotes unless you provide an ID |
aFailoverId (optional) | “”– Empty quotes unless you provide an ID |
URI {recordType} value: “AAAARecord”
Field | Sample data |
aaaaHostName
|
“www” – this is the host name excluding the domain |
aaaaIPAddress | “1::1” – this is an IPv6 address |
aaaaTTL | “3600” – This is the number of seconds from 60 and above |
aaaaALFPacId (optional) | “” – Empty quotes unless you provide an ID |
aaaaGeoZoneId (optional) | “” – Empty quotes unless you provide an ID |
aaaaFailoverId (optional) | “”– Empty quotes unless you provide an ID |
URI {recordType} value: “MXRecord”
Field | Sample data |
mxDomainName
|
“@” – this is the host name excluding the domain |
mxPreference | “10” – this is an integer |
mxMailServer | “mail.example.com” – This is a FQDN |
mxTTL | “3600” – This is the number of seconds from 60 and above |
URI {recordType} value: “CNAMERecord”
Field | Sample data |
cnameName
|
“www” – this is the host name excluding the domain |
cnameAliasFor | “url.example.com” – this is a FQDN |
cnameTTL | “3600” – This is the number of seconds from 60 and above |
URI {recordType} value: “TXTRecord”
Field | Sample data |
txtHostName
|
“@” – this is the host name excluding the domain |
txtText | “v=spf1 include:outlook.com ip4:107.6.6.1/26 ~all” |
txtTTL | “3600” – This is the number of seconds from 60 and above |
URI {recordType} value: “NSRecord”
Field | Sample data |
nsHostName
|
“@” – this is the host name excluding the domain |
nsName | “ns1.mynameserver.com” |
nsTTL | “3600” – This is the number of seconds from 60 and above |
URI {recordType} value: “PTRRecord”
Field | Sample data |
ptrHostName
|
“123” |
ptrDomainName | “my-reverse-ip-name.example.com” |
ptrTTL | “3600” – This is the number of seconds from 60 and above |
URI {recordType} value: “WebRedirectRecord”
Field | Sample data |
HostName
|
“@” – this is the host name excluding the domain |
Dest | “http://www.google.com” |
CarryPath | “Yes” or “No” |
RedirectType | “301” or “302” |
Sample CURL for adding an A record
curl -u username:password -X POST -H “Accept: application/json” “https://api.totaluptime.com/CloudDNS/Domain/{DomainID}/ARecord” -d “{\”aHostName\”:\”www\”,\”aIPAddress\”:\”203.0.113.2\”,\”aTTL\”:\”60\”}”
Sample CURL for adding a CNAME record
curl -u username:password -X POST -H “Accept: application/json” “https://api.totaluptime.com/CloudDNS/Domain/{DomainID}/CNAMERecord” -d “{\”cnameAliasFor\”:\”test.example.com\”,\”cnameName\”:\”www\”,\”cnameTTL\”:\”60\”}”
Sample CURL for adding a TXT record
curl -u username:password -X POST -H “Accept: application/json” “https://api.totaluptime.com/CloudDNS/Domain/{DomainID}/TXTRecord” -d “{\”txtHostName\”:\”_acme_test\”,\”txtText\”:\”test-text-content\”,\”txtTTL\”:\”3600\”}”
All record types are supported in the API, we just have not articulated them here yet. Try guessing based on what you see in the UI and above data, otherwise please do not hesitate to contact us for assistance.