DNS RecordsAdd Record

Add Record

curl -X POST "https://api.5centscdn.com/v2/dns/example_string/records" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "_METHOD": "PUT",
  "type": "A",
  "ttl": 3600,
  "host": "www",
  "record": "8.8.8.8",
  "priority": "10",
  "weight": "10",
  "port": "443",
  "frame": "N",
  "frame_title": "My Site",
  "frame_keywords": "cdn, streaming",
  "frame_description": "My CDN site",
  "mobile_meta": "N",
  "save_path": "N",
  "redirect_type": "301",
  "mail": "mail.example.com",
  "txt": "v=spf1 include:example.com ~all",
  "algorithm": "13",
  "fptype": "2",
  "status": "1",
  "caa_flag": "0",
  "caa_type": "issue",
  "caa_value": "letsencrypt.org",
  "tlsa_usage": "3",
  "tlsa_selector": "1",
  "tlsa_matching_type": "1",
  "key_tag": "12345",
  "digest_type": "2",
  "order": "10",
  "pref": "10",
  "flag": "U",
  "params": "SIP+D2U",
  "regexp": "",
  "replace": "_sip._udp.example.com",
  "cert_type": "1",
  "cert_key_tag": "0",
  "cert_algorithm": "13",
  "cpu": "Intel",
  "os": "Linux",
  "lat_deg": "37",
  "lat_min": "46",
  "lat_sec": "29",
  "lat_dir": "N",
  "long_deg": "122",
  "long_min": "25",
  "long_sec": "9",
  "long_dir": "W",
  "altitude": "0",
  "size": "1",
  "h_precision": "10000",
  "v_precision": "10",
  "smimea_usage": "3",
  "smimea_selector": "0",
  "smimea_matching_type": "1"
}'
{
  "status": "Success",
  "statusDescription": "The record was added successfully.",
  "data": {
    "id": 12345
  }
}
POST
/dns/{dnsId}/records
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
_METHODstring
Required

HTTP method override. Use PUT to create a record.

typestring
Required

DNS record type. A, AAAA, MX, CNAME, TXT, NS, SRV, WR, RP, SSHFP, ALIAS, CAA, TLSA, CERT, DS, NAPTR, PTR, HINFO, LOC, SMIMEA.

ttlinteger
Required

Time to live in seconds. Common values: 60, 300, 3600, 86400.

hoststring
Required

Hostname or subdomain. Use @ for the root domain.

recordstring
Required

Record value. IP address for A/AAAA, hostname for CNAME/MX/NS, text for TXT.

prioritystring

Priority for MX or SRV records. Lower value means higher priority.

weightstring

Weight for SRV records. Used to balance load between equal-priority servers.

portstring

Port number for SRV records.

framestring

Enable iframe redirect for WR records. Y means enabled, N means disabled.

frame_titlestring

HTML page title shown when using iframe redirect.

frame_keywordsstring

HTML meta keywords for iframe redirect page.

frame_descriptionstring

HTML meta description for iframe redirect page.

mobile_metastring

Add a mobile viewport meta tag. Y means enabled, N means disabled.

save_pathstring

Preserve the request path when redirecting. Y means enabled, N means disabled.

redirect_typestring

HTTP redirect type. 301 means permanent, 302 means temporary.

mailstring

Mail server hostname for MX records.

txtstring

TXT record content string.

algorithmstring

Algorithm identifier. For SSHFP records: 1=RSA, 2=DSA, 3=ECDSA, 4=Ed25519. For DS/CERT records: 2=DH, 3=DSA/SHA1, 4=ECC, 5=RSASHA1, 6=DSA-NSEC3-SHA1, 7=RSASHA1-NSEC3-SHA1, 8=RSASHA256, 10=RSASHA512, 13=ECDSAP256SHA256, 14=ECDSAP384SHA384, 15=Ed25519, 16=Ed448, 252=INDIRECT, 253=PRIVATEDNS, 254=PRIVATEOID.

fptypestring

Fingerprint hash type for SSHFP records. 1 means SHA-1, 2 means SHA-256.

statusstring

Record status on creation. 1 means active, 0 means inactive.

caa_flagstring

CAA record flag controlling certificate authority enforcement. 0 = Non-critical. 28 = Critical.

Options: 0, 28
caa_typestring

CAA property tag. Values: issue, issuewild, iodef.

caa_valuestring

CAA record value. CA domain name or mailto/http URL for iodef.

tlsa_usagestring

TLSA certificate usage. 0=PKIX-TA, 1=PKIX-EE, 2=DANE-TA, 3=DANE-EE.

tlsa_selectorstring

TLSA selector. 0 means full certificate, 1 means public key only.

tlsa_matching_typestring

TLSA matching type. 0 means full data, 1 means SHA-256, 2 means SHA-512.

key_tagstring

Key tag for DS records. Identifies the referenced DNSKEY record.

digest_typestring

DS record digest algorithm. 1 = SHA-1. 2 = SHA-256. 3 = GOST R 34.11-94. 4 = SHA-384.

Options: 1, 2, 3, 4
orderstring

Processing order for NAPTR records. Lower value is processed first.

prefstring

Preference for NAPTR records with equal order. Lower value is preferred.

flagstring

Flag for NAPTR records. 'Empty Flag' = no replacement (pass to next rule). U = terminal URI. S = terminal SRV lookup. A = terminal A/AAAA lookup. P = provider-specific.

Options: Empty Flag, U, S, A, P
paramsstring

Service parameters for NAPTR records.

regexpstring

Regular expression substitution for NAPTR records.

replacestring

Replacement FQDN for NAPTR records.

cert_typestring

CERT record certificate type. 1=PKIX, 2=SPKI, 3=PGP, 4=IPKIX, 5=ISPKI, 6=IPGP, 7=ACPKIX, 8=IACPKIX, 253=URI, 254=OID.

cert_key_tagstring

Key tag for CERT records.

cert_algorithmstring

CERT record cryptographic algorithm. 2=DH, 3=DSA/SHA1, 4=ECC, 5=RSASHA1, 6=DSA-NSEC3-SHA1, 7=RSASHA1-NSEC3-SHA1, 8=RSASHA256, 10=RSASHA512, 13=ECDSAP256SHA256, 14=ECDSAP384SHA384, 15=Ed25519, 16=Ed448, 252=INDIRECT, 253=PRIVATEDNS, 254=PRIVATEOID.

cpustring

CPU type identifier for HINFO records.

osstring

Operating system identifier for HINFO records.

lat_degstring

Latitude degrees for LOC records. Range 0-90.

lat_minstring

Latitude minutes for LOC records. Range 0-59.

lat_secstring

Latitude seconds for LOC records. Range 0-59.999.

lat_dirstring

Latitude direction for LOC records. N or S.

long_degstring

Longitude degrees for LOC records. Range 0-180.

long_minstring

Longitude minutes for LOC records. Range 0-59.

long_secstring

Longitude seconds for LOC records. Range 0-59.999.

long_dirstring

Longitude direction for LOC records. E or W.

altitudestring

Altitude in metres for LOC records.

sizestring

Size of the location in metres for LOC records.

h_precisionstring

Horizontal precision in metres for LOC records.

v_precisionstring

Vertical precision in metres for LOC records.

smimea_usagestring

S/MIME certificate usage. 0=PKIX-TA, 1=PKIX-EE, 2=DANE-TA, 3=DANE-EE.

smimea_selectorstring

S/MIME selector. 0 means full certificate, 1 means public key only.

smimea_matching_typestring

S/MIME matching type. 0 means full data, 1 means SHA-256, 2 means SHA-512.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

Body

application/json
_METHODstring
Required

HTTP method override. Use PUT to create a record.

Example:
PUT
typestring
Required

DNS record type. A, AAAA, MX, CNAME, TXT, NS, SRV, WR, RP, SSHFP, ALIAS, CAA, TLSA, CERT, DS, NAPTR, PTR, HINFO, LOC, SMIMEA.

Example:
A
ttlinteger
Required

Time to live in seconds. Common values: 60, 300, 3600, 86400.

Example:
3600
hoststring
Required

Hostname or subdomain. Use @ for the root domain.

Example:
www
recordstring
Required

Record value. IP address for A/AAAA, hostname for CNAME/MX/NS, text for TXT.

Example:
8.8.8.8
prioritystring

Priority for MX or SRV records. Lower value means higher priority.

Example:
10
weightstring

Weight for SRV records. Used to balance load between equal-priority servers.

Example:
10
portstring

Port number for SRV records.

Example:
443
framestring

Enable iframe redirect for WR records. Y means enabled, N means disabled.

Example:
N
frame_titlestring

HTML page title shown when using iframe redirect.

Example:
My Site
frame_keywordsstring

HTML meta keywords for iframe redirect page.

Example:
cdn, streaming
frame_descriptionstring

HTML meta description for iframe redirect page.

Example:
My CDN site
mobile_metastring

Add a mobile viewport meta tag. Y means enabled, N means disabled.

Example:
N
save_pathstring

Preserve the request path when redirecting. Y means enabled, N means disabled.

Example:
N
redirect_typestring

HTTP redirect type. 301 means permanent, 302 means temporary.

Example:
301
mailstring

Mail server hostname for MX records.

Example:
mail.example.com
txtstring

TXT record content string.

Example:
v=spf1 include:example.com ~all
algorithmstring

Algorithm identifier. For SSHFP records: 1=RSA, 2=DSA, 3=ECDSA, 4=Ed25519. For DS/CERT records: 2=DH, 3=DSA/SHA1, 4=ECC, 5=RSASHA1, 6=DSA-NSEC3-SHA1, 7=RSASHA1-NSEC3-SHA1, 8=RSASHA256, 10=RSASHA512, 13=ECDSAP256SHA256, 14=ECDSAP384SHA384, 15=Ed25519, 16=Ed448, 252=INDIRECT, 253=PRIVATEDNS, 254=PRIVATEOID.

Example:
13
fptypestring

Fingerprint hash type for SSHFP records. 1 means SHA-1, 2 means SHA-256.

Example:
2
statusstring

Record status on creation. 1 means active, 0 means inactive.

Example:
1
caa_flagstring

CAA record flag controlling certificate authority enforcement. 0 = Non-critical. 28 = Critical.

Allowed values:028
caa_typestring

CAA property tag. Values: issue, issuewild, iodef.

Example:
issue
caa_valuestring

CAA record value. CA domain name or mailto/http URL for iodef.

Example:
letsencrypt.org
tlsa_usagestring

TLSA certificate usage. 0=PKIX-TA, 1=PKIX-EE, 2=DANE-TA, 3=DANE-EE.

Example:
3
tlsa_selectorstring

TLSA selector. 0 means full certificate, 1 means public key only.

Example:
1
tlsa_matching_typestring

TLSA matching type. 0 means full data, 1 means SHA-256, 2 means SHA-512.

Example:
1
key_tagstring

Key tag for DS records. Identifies the referenced DNSKEY record.

Example:
12345
digest_typestring

DS record digest algorithm. 1 = SHA-1. 2 = SHA-256. 3 = GOST R 34.11-94. 4 = SHA-384.

Allowed values:1234
orderstring

Processing order for NAPTR records. Lower value is processed first.

Example:
10
prefstring

Preference for NAPTR records with equal order. Lower value is preferred.

Example:
10
flagstring

Flag for NAPTR records. 'Empty Flag' = no replacement (pass to next rule). U = terminal URI. S = terminal SRV lookup. A = terminal A/AAAA lookup. P = provider-specific.

Allowed values:Empty FlagUSAP
paramsstring

Service parameters for NAPTR records.

Example:
SIP+D2U
regexpstring

Regular expression substitution for NAPTR records.

Example:
replacestring

Replacement FQDN for NAPTR records.

Example:
_sip._udp.example.com
cert_typestring

CERT record certificate type. 1=PKIX, 2=SPKI, 3=PGP, 4=IPKIX, 5=ISPKI, 6=IPGP, 7=ACPKIX, 8=IACPKIX, 253=URI, 254=OID.

Example:
1
cert_key_tagstring

Key tag for CERT records.

Example:
0
cert_algorithmstring

CERT record cryptographic algorithm. 2=DH, 3=DSA/SHA1, 4=ECC, 5=RSASHA1, 6=DSA-NSEC3-SHA1, 7=RSASHA1-NSEC3-SHA1, 8=RSASHA256, 10=RSASHA512, 13=ECDSAP256SHA256, 14=ECDSAP384SHA384, 15=Ed25519, 16=Ed448, 252=INDIRECT, 253=PRIVATEDNS, 254=PRIVATEOID.

Example:
13
cpustring

CPU type identifier for HINFO records.

Example:
Intel
osstring

Operating system identifier for HINFO records.

Example:
Linux
lat_degstring

Latitude degrees for LOC records. Range 0-90.

Example:
37
lat_minstring

Latitude minutes for LOC records. Range 0-59.

Example:
46
lat_secstring

Latitude seconds for LOC records. Range 0-59.999.

Example:
29
lat_dirstring

Latitude direction for LOC records. N or S.

Example:
N
long_degstring

Longitude degrees for LOC records. Range 0-180.

Example:
122
long_minstring

Longitude minutes for LOC records. Range 0-59.

Example:
25
long_secstring

Longitude seconds for LOC records. Range 0-59.999.

Example:
9
long_dirstring

Longitude direction for LOC records. E or W.

Example:
W
altitudestring

Altitude in metres for LOC records.

Example:
0
sizestring

Size of the location in metres for LOC records.

Example:
1
h_precisionstring

Horizontal precision in metres for LOC records.

Example:
10000
v_precisionstring

Vertical precision in metres for LOC records.

Example:
10
smimea_usagestring

S/MIME certificate usage. 0=PKIX-TA, 1=PKIX-EE, 2=DANE-TA, 3=DANE-EE.

Example:
3
smimea_selectorstring

S/MIME selector. 0 means full certificate, 1 means public key only.

Example:
0
smimea_matching_typestring

S/MIME matching type. 0 means full data, 1 means SHA-256, 2 means SHA-512.

Example:
1

Responses

statusstring

Operation outcome.

statusDescriptionstring

Human-readable description of the operation outcome.

dataobject

Response data payload.