Black Friday promo up to -50% Time left:

Add record

Description

Add new record to domain zone.

Note: This function is available only for master zones. Works with reverse and ENUM zones too.


 Parameters

Name Data Type Status Description
auth-id or sub-auth-id or sub-auth-user Integer Required Authentication parameter
auth-password String Required Authentication parameter
domain-name  String Required Domain name or reverse zone name you want to assign new record to
record-type  String Required A, AAAA, MX, CNAME, TXT, SPF, NS, SRV, WR, RP, SSHFP, ALIAS, CAA, TLSA, CERT, DS, PTR, NAPTR, HINFO, LOC, DNAME, SMIMEA, OPENPGPKEY
host String Required host / subdomain
record  String  Required Record you want to add. Example 10.10.10.10 or cname.cloudns.net
ttl  Integer  Required Available TTL's:
60 = 1 minute
300 = 5 minutes
900 = 15 minutes
1800 = 30 minutes
3600 = 1 hour
21600 = 6 hours
43200 = 12 hours
86400 = 1 day
172800 = 2 days
259200 = 3 days
604800 = 1 week
1209600 = 2 weeks
2592000 = 1 month
priority  Integer Optional Priority for MX or SRV record
weight  Integer Optional Weight for SRV record
port Integer  Optional Port for SRV record
frame Integer Optional 0 or 1 for Web redirects to disable or enable frame
frame-title String Optional Title if frame is enabled in Web redirects
frame-keywords  String Optional Keywords if frame is enabled in Web redirects
frame-description String Optional Description if frame is enabled in Web redirects
mobile-meta Integer Optional Mobile responsive meta tags if Web redirects with frame is enabled. Default value - 0.
save-path Integer Optional 0 or 1 for Web redirects
redirect-type  Integer Optional 301 or 302 for Web redirects if frame is disabled
mail String Optional E-mail address for RP records
txt String Optional Domain name for TXT record used in RP records
algorithm Integer Optional Algorithm used to create the SSHFP fingerprint. Required for SSHFP records only.
fptype Integer Optional Type of the SSHFP algorithm. Required for SSHFP records only.
status Integer Optional Set to 1 to create the record active or to 0 to create it inactive. If omitted the record will be created active.
geodns-location Integer Optional ID of a GeoDNS location for A, AAAA, CNAME, NAPTR or SRV record. The GeoDNS locations can be obtained with List GeoDNS locations
geodns-code String Optional Code of a GeoDNS location for A, AAAA, CNAME, NAPTR or SRV record. The GeoDNS location codes can be obtained with List GeoDNS locations
caa_flag Integer  Optional 0 - Non critical or 128 - Critical
caa_type  String  Optional Type of CAA record. The available flags are issue, issuewild, iodef.
caa_value  String  Optional If caa_type is issue, caa_value can be hostname or ";". If caa_type is issuewild, it can be hostname or ";". If caa_type is iodef, it can be "mailto:someemail@address.tld, http://example.tld or http://example.tld.   
tlsa_usage  String  Optional (From 0 to 3) It shows the provided association that will be used.
tlsa_selector  String  Optional (From 0 to 1) It specifies which part of the TLS certificate presented by the server will be matched against the association data
tlsa_matching_type  String  Optional (From 0 to 2) It specifies how the certificate association is presented.
key-tag Integer  Optional A numeric value used for identifying the referenced DS record.
algorithm Integer  Optional The algorithm of the referenced DS record.
digest-type Integer  Optional The cryptographic hash algorithm is used to create the Digest value.
order String  Optional Specifies the order in which multiple NAPTR records must be processed (low to high).
pref String  Optional Specifies the order (low to high) in which NAPTR records with equal Order values should be processed.
flag Integer Optional Controls aspects of the rewriting and interpretation of the fields in the record.
params String Optional Specifies the service parameters applicable to this delegation path.
regexp String Optional Contains a substitution expression that is applied to the original string, held by the client in order to construct the next domain name to lookup.
replace Integer Optional Specifies the next domain name (fully qualified) to query for depending on the potential values found in the flags field.
cert-type Integer Optional Type of the Certificate/CRL.
cert-key-tag Integer Optional A numeric value (0-65535), used the efficiently pick a CERT record.
cert-algorithm Integer Optional Identifies the algorithm, used to produce a legitimate signature.
lat-deg Integer Optional A numeric value(0-90), sets the latitude degrees.
lat-min Integer Optional A numeric value(0-59), sets the latitude minutes. If omitted the default value is 0.
lat-sec Integer Optional A numeric value(0-59), sets the latitude seconds. If omitted the default value is 0.
lat-dir String Optional Sets the latitude direction. Possible values:
  • N - North
  • S - South
long-deg Integer Optional A numeric value(0-180), sets the longitude degrees.
long-min Integer Optional A numeric value(0-59), sets the longitude minutes. If omitted the default value is 0
long-sec Integer Optional A numeric value(0-59), sets the longitude seconds. If omitted the default value is 0
long-dir String Optional Sets the longitude direction. Possible values:
  • W - West
  • E - East
altitude Integer Optional A numeric value(-100000.00 - 42849672.95), sets the altitude in meters.
size Integer Optional A numeric value(0 - 90000000.00), sets the size in meters. If omitted the default value is 0.
h-precision Integer Optional A numeric value(0 - 90000000.00), sets the horizontal precision in meters. If omitted the default value is 10000.
v-precision Integer Optional A numeric value(0 - 90000000.00), sets the vertical precision in meters. If omitted the default value is 10.
cpu String Optional The CPU of the server.
os String Optional The operating system of the server.

Response: Array with status and status description.


Errors

When the authenctication of API user is not correct, any API request will fail with the following status and statusDescription:

{"status":"Failed","statusDescription":"Invalid authentication, incorrect auth-id or auth-password."}

In case the credentials of API sub user are invalid, the following status and statusDescription will be returned:

{"status":"Failed","statusDescription":"Invalid authentication, incorrect sub-auth-id, sub-auth-user or auth-password."}

When invalid or non-existant domain-name is entered, the following status will be returned:

{"status":"Failed","statusDescription":"Missing domain-name"}

If invalid record type is entered for record-type parameter, the following status will be returned:

{"status":"Failed","statusDescription":"This record type is not supported."}

When TTL parameter is not from the suggested values or Integer, the API request will fail and the following status and statusDescription will be returned:

{"status":"Failed","statusDescription":"Invalid TTL. Choose from the list of the values we support."}

If invalid value is entered for record parameter, the API request will fail and a statusDescription message will be desplayed, based on the record type:

- when an invalid value is entered for records, that require domain name as record parameter:

{"status":"Failed","statusDescription":"This is not a domain name."}

- when an invalid value is entered for records, that require URL as record parameter:

{"status":"Failed","statusDescription":"The domain must be pointed to an URL as shown in the example."}

- when an invalid value is entered for records, that require IP address as record parameter:

{"status":"Failed","statusDescription":"This is not a valid IP address."}

Note: These are example errors in JSON format.


Example

URL JSON: https://api.cloudns.net/dns/add-record.json
Domain POST/GET:
auth-id=0&auth-password=password&domain-name=domain.com&record-type=A&host=www&record=10.10.10.10&ttl=3600
sub-auth-id=0&auth-password=password&domain-name=domain.com&record-type=A&host=www&record=10.10.10.10&ttl=3600
Reverse IPv4 POST/GET:
auth-id=0&auth-password=password&domain-name=1.0.0.127.in-addr.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600
sub-auth-id=0&auth-password=password&domain-name=1.0.0.127.in-addr.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600
Reverse IPv6 POST/GET:
auth-id=0&auth-password=password&domain-name=1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.ip6.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600
sub-auth-id=0&auth-password=password&domain-name=1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.ip6.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600

URL XML: https://api.cloudns.net/dns/add-record.xml
Domain POST/GET:
auth-id=0&auth-password=password&domain-name=domain.com&record-type=A&host=www&record=10.10.10.10&ttl=3600
sub-auth-id=0&auth-password=password&domain-name=domain.com&record-type=A&host=www&record=10.10.10.10&ttl=3600
Reverse IPv4 POST/GET:
auth-id=0&auth-password=password&domain-name=1.0.0.127.in-addr.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600
sub-auth-id=0&auth-password=password&domain-name=1.0.0.127.in-addr.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600
Reverse IPv6 POST/GET:
auth-id=0&auth-password=password&domain-name=1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.ip6.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600
sub-auth-id=0&auth-password=password&domain-name=1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.ip6.arpa&record-type=PTR&host=@&record=domain.com&ttl=3600


Last modified: 2023-10-31
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more