DNS Records API (v1)

API v1 is legacy: it's read-only and kept for existing integrations. For new integrations, use API v2: see the DNS Records API and how v2 differs from v1.

The DNS Check API is used to request data for either a specific DNS record or all records in a DNS record group.

URL

https://www.dnscheck.co/api/v1/groups/:group_uuid/:record_id?api_key=KEY

Instead of the api_key parameter, you can send the key in the Authorization header as Authorization: Bearer KEY, which keeps it out of server logs and browser history. See API Keys.

Requests count against the account's per-minute request limit, which API v1 and v2 share. Over it, a request gets a 429 with a Retry-After header giving the seconds to wait. See Rate Limits for each plan's limit.

Parameters

group_uuid and record_id are required. So is api_key, unless you send the key in the Authorization header instead.

Parameter Description Example Value
api_key The secret key used to authenticate the connecting application. Refer to the API Keys page for details. 0123456789abcdef0123456789abcdef
group_uuid The UUID of the DNS record group. When viewing a DNS record or record group, this is the 36-character string that follows "/tests/" in the URL. The UUID of this DNS record group is the example value in the next column. ea883d67-d9f6-45e3-b3a1-844dd1857824
record_id The ID of the DNS record. When viewing the URL of a DNS record's details or history page, this is the integer that follows the UUID in the URL. For example, this DNS record has a record_id of "8". Specify a record_id of "all" to show information for all DNS records in a DNS record group. 8

Example Request

The following API call returns data for the dnscheck.co MX record in this example DNS Record Group:

curl -H "Authorization: Bearer KEY" https://www.dnscheck.co/api/v1/groups/ea883d67-d9f6-45e3-b3a1-844dd1857824/8

The above DNS record group is unique in that accessing it does not require a valid API key. It serves as a live example for API documentation.

Example Response

{
  "dns_record": {
    "created_at": "2015-04-17T20:46:06Z",
    "updated_at": "2023-01-29T05:15:35Z",
    "status": "pass",
    "id": 8,
    "name": "dnscheck.co.",
    "record_type": "MX",
    "value": "10 mail.protonmail.ch.",
    "exclusive": true,
    "invert": false,
    "fail_count": 0,
    "url": "https://www.dnscheck.co/tests/ea883d67-d9f6-45e3-b3a1-844dd1857824/8"
  }
}

Response Definitions

Field Description Type
id A unique identifier for the DNS record integer
name The fully qualified domain name of the DNS record. For example, "example.com." string
record_type The type of DNS record. Valid values are "A", "AAAA", "ALIAS", "CAA", "CNAME", "HTTPS", "MX", "NS", "PTR", "SOA", "SPF", "SRV", "SVCB", and "TXT" string
value The expected value of the DNS record. For example, "104.131.72.189" string
exclusive Indicates whether the records found for this name and record_type must match exactly the exclusive DNS records in the group that share them, so an extra or missing record fails the check. See Exclusive DNS Record Matching boolean
invert Indicates whether the check logic is inverted (paid feature). When true, the check passes when the DNS record is absent or when the expected value is NOT found boolean
created_at The ISO 8601 time and date that the DNS record was created string
updated_at The ISO 8601 time and date that the DNS record was last updated string
status The pass/fail status of the DNS record. Valid values are "pass", "fail", and "unknown" string
fail_count If the DNS record is failing, this field indicates how many consecutive checks have failed integer
url The URL of the DNS record's details page string

DNS monitoring illustration

Protect your DNS infrastructure with automated monitoring

Get notified immediately when DNS records change. Start monitoring your critical DNS infrastructure for free in under 5 minutes.

No credit card required • Cancel anytime