Introduction
You can add a DNS entry to a domain using the addzonerecord WHM API call. You could use this API call to make changes to your customer's domains through the command line.
Procedure
The addzonerecord API call requires # parameters,domain
,name
, and type
, class
. If you wanted to add a TXT record named test to a domain the command would look like this:
[root@b ~]# whmapi1 addzonerecord domain=example.com name=test.example.com class=IN ttl=86400 type=TXT txtdata="Test"
---
metadata:
command: addzonerecord
reason: OK
result: 1
version: 1
The command I ran also included txtdata , this is a required portion of a TXT record . Each DNS record type has it's own requirements. More information can be found in the WHM API documentation :
Comments
0 comments
Article is closed for comments.