Knowledge Base
Categories: DNS API
How to Modify a CNAME Record Using the API
When your system or integration needs to modify a CNAME record programmatically. This article explains how to modify a CNAME record using the API.
Description
Modifies a Canonical (CNAME) record.
Parameters
|
Name
|
Data Type
|
Required / Optional
|
Description
|
|---|---|---|---|
|
auth-userid
|
Integer
|
Required
| Your Live Account Reseller Id |
|
api-key
|
String
|
Required
|
An alphanumeric code that can be used to authenticate your API calls
|
|
domain-name
|
String
|
Required
|
Domain name for which you want to modify the CNAME record
|
|
host
|
String
|
Optional
|
The host part of the domain name for which you need to modify a CNAME
Example:
You may send this as www, if u wish to modify the CNAME record for www.domainname.com.
|
|
current-value
|
String
|
Required
|
Current CNAME value
|
|
new-value
|
String
|
Required
|
New CNAME value
|
|
ttl
|
Integer
|
Optional
|
Number of seconds the record needs to be cached by the DNS Resolvers. Default value is 14400.
|
HTTP Method
POST
Example Test URL Request
https://test.httpapi.com/api/dns/manage/update-cname-record.json?auth-userid=0&api-key=key&domain-name=domain.asia¤t-value=blog.domain.com&new-value=wp.domain.com |
Response
Returns a status key with value as Success if the record is modified successfully.
In case of any errors, a status key with value as ERROR along with an error message will be returned.
Did you find this article helpful?