prufy
Skip to the page

DevelopmentInspect a name's DNS

Development

Inspect a name's DNS

What every resolver answers for any name, without creating a claim.

GET/api/dns/inspect

A way to see raw observations while building: who runs the zone, and what each server says about the challenge record's name.

Authentication

Send the session cookie. Without it the answer is unauthorized. How sessions work.

Query parameters

namestringrequired

The domain to look up. Normalized the same way as a claim's input.

Response

200 OK, with every field below present. Times are ISO 8601 strings in UTC.

  • zoneobject

    Who is in charge of this name's DNS.

    Show the 3 fields insideInside zone
    • kindstring

      Whether the name has nameservers, doesn't exist, or couldn't be looked up.

      • One of delegatednxdomainlookup_failed
    • apexstring | null

      The zone the name lives in, when it's delegated.

    • providerstring | null

      Who runs that zone, when it's delegated.

  • observationsarray of objects

    What each DNS server answered.

    Show what each item hasEach item has
    • resolverstring

      Who answered: authoritative:<nameserver> for one of the domain's own servers, or a public resolver.

      • One of googlecloudflare, or a value added later
    • serverIpstring | null

      The address that was asked, when we know it.

    • qnamestring

      The name that was looked up.

    • qtypestring

      The record type that was asked for.

      • One of TXTNSSOACNAMEAAAAA
    • rcodestring | null

      The DNS response code. Null when no response arrived at all.

      • One of NOERRORNXDOMAINSERVFAILREFUSEDOTHER
    • answersarray of strings

      The values that came back, one per record.

    • cnameChainarray of strings

      Any CNAMEs followed on the way to the answer.

    • adboolean | null

      The DNSSEC authenticated-data flag. Null when the server can't report it.

    • latencyMsnumber

      How long the answer took, in milliseconds.

    • errorstring | null

      How the lookup went wrong, if it did.

      • One of timeoutservfailrefusednetworkbad_responseno_nameserver_address

Errors

StatusKindWhen
400bad_requestname is missing or longer than 2,000 characters.
401unauthorizedThe request has no session cookie, or one we don't recognise.
404not_foundThe server is running in production.
422emptyThe input is blank. This and the seven kinds below are a 422, each with a message that says what to type instead.
422invalid_charactersThe input has characters a domain can't contain.
422label_too_longOne part between dots is longer than 63 characters.
422too_longThe whole name is longer than 253 characters.
422ip_addressThe input is an IP address, not a domain.
422reserved_tldThe ending is set aside, like .test or .localhost.
422public_suffixThe input is a suffix many people share, like co.uk, not a domain under it.
422single_labelThe input has no dot, so there's no ending to look up.

Any route can also answer 500 with internal_error. Every error has the same shape, described in Errors.