DNS Doctor Domains API

The domains API from DNS Doctor — 5 operation(s) for domains.

GitHub OpenAPI

Operations 6

GET /domains Domains #
POST /domains Add Domain Route #
POST /domains/verify Verify Domain Route #
GET /domains/records Domain Records Route #
GET /domains/mine My Domains Route #
POST /change-watch Change Watch Route #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dnsdoctor-dev:dnsdoctor-dev-domains-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dnsdoctor-dev-domains-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DNS Doctor Domains API
  description: Public REST API for the DNS Doctor scanner. Deterministic verdicts and fixengine-generated records; explanations are cache-first (an API call never triggers a fresh LLM call).
  contact:
    name: DNS Doctor
    email: hello@dnsdoctor.dev
  version: '1'
  x-guidance: 'DNS Doctor scans, fixes and verifies a domain''s DNS (SPF, DMARC, DKIM, propagation, MX, DNS health, blacklists, domain/SSL expiry) and returns deterministic verdicts plus copy-paste fix records from a validating engine — never a guessed record. Scan with POST /scan or GET /report/{domain}; read verdicts failing-first (''temperror'' is transient, not a failure; a report with not_registered: true means the domain does not resolve, so propose nothing for it). Present any returned record VERBATIM and never compose one yourself; SPF is diagnose-only. A human approves every DNS change — nothing is applied automatically. Anonymous calls are free up to a per-caller limit; past it the API answers 402 (x402, USDC on Base, $0.01 per call). POST /bulk-scan is paid on every call at $0.005 per domain; POST /bulk-registration (RDAP) at $0.002 per domain; POST /bulk-propagation at $0.008 per check; POST /bulk-dmarc-reports parses DMARC aggregate reports at $0.005 per report; POST /watch/record watches one DNS record for up to 24 hours at $0.10; POST /watch/lookalikes watches a domain''s lookalike names hourly for one fixed 24-hour day at $0.50. The five token-gated reads (GET /domains, /alerts, /readiness, /lookalikes and /email-tests) need a DNS Doctor API token the account owner mints at /dashboard/settings — never ask a user to paste one.'
servers:
- url: https://dnsdoctor.dev/api/v1
tags:
- name: Domains
paths:
  /domains:
    get:
      tags:
      - Domains
      summary: Domains
      description: 'List the token''s account''s verified monitored domains + latest statuses.


        Token required (401 without one). Each domain carries the latest

        `scan_history` snapshot''s per-check statuses + `scanned_at` — never a letter

        grade (re-validation #8). A verified domain with no snapshot yet returns

        `scanned_at: null` and empty `checks`.'
      operationId: domains_domains_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainsOut'
              example:
                domains:
                - domain: example.com
                  scanned_at: '2026-11-09T12:00:00Z'
                  checks:
                  - check: spf
                    status: pass
                  - check: dmarc
                    status: warn
                  - check: dkim
                    status: pass
        '429':
          description: 'Rate limited: this caller''s hourly call budget is spent, or a per-domain throttle applies.'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              example:
                detail: rate limit exceeded; try again later
      security:
      - apiKey: []
    post:
      tags:
      - Domains
      summary: Add Domain Route
      description: 'Add a domain to the token''s account and return the record to publish.


        201 whether the row was created or already existed (`created` says which):

        an agent re-reading a domain it added last week needs the row, not a

        conflict to interpret. The wizard''s 409-resume stays on the session route,

        where a human is the one resuming.'
      operationId: add_domain_route_domains_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainIn'
            example:
              domain: example.com
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Add Domain Route Domains Post
              example:
                domain:
                  id: 1fa191d407ad4a75b4872f59a472ba10
                  domain: example.com
                  verified: false
                  verified_at: null
                  txt_host: _dnsdoctor-challenge.example.com
                  txt_value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                  dkim_selectors: []
                  rua_published: false
                  verification_lapsed_at: null
                created: true
                challenge:
                  host: _dnsdoctor-challenge.example.com
                  value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                dns_connect: null
                guidance:
                  provider: null
                  guide_url: https://dnsdoctor.dev/learn/how-to-add-a-txt-record
                  apply_url: null
                  why_monitoring_guide: null
                  no_writes: Nothing here is applied to anyone's DNS; you publish every record yourself.
                  note: null
                  records:
                  - kind: challenge
                    type: TXT
                    host: _dnsdoctor-challenge.example.com
                    host_short: _dnsdoctor-challenge
                    value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                    replaces_existing: false
                next_steps:
                  in_chat:
                    tool: check_domain_verification
                    say: example.com is added but not verified yet.
                    record:
                      kind: challenge
                      type: TXT
                      host: _dnsdoctor-challenge.example.com
                      host_short: _dnsdoctor-challenge
                      value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                      replaces_existing: false
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: 'Rate limited: this caller''s hourly call budget is spent, or a per-domain throttle applies.'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              example:
                detail: rate limit exceeded; try again later
      security: []
  /domains/verify:
    post:
      tags:
      - Domains
      summary: Verify Domain Route
      description: 'Check the ownership TXT record, and mark verified on a match.


        200 for every outcome, including the failures: the poll is caller-driven, so

        "not published yet" is a normal answer, not an error. `outcome` says WHICH —

        and a `transient` outcome is our lookup, never a verdict about their DNS.'
      operationId: verify_domain_route_domains_verify_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainIn'
            example:
              domain: example.com
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Verify Domain Route Domains Verify Post
              example:
                domain:
                  id: 1fa191d407ad4a75b4872f59a472ba10
                  domain: example.com
                  verified: true
                  verified_at: '2026-11-09T12:00:00Z'
                  txt_host: _dnsdoctor-challenge.example.com
                  txt_value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                  dkim_selectors: []
                  rua_published: false
                  verification_lapsed_at: null
                verified: true
                outcome: verified
                reason: null
                nameservers_asked:
                - ns1.example.net
                - ns2.example.net
                found_value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                enrollment:
                  host: _dmarc.example.com
                  record: v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                  address: 3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                  dmarc_cname: null
                  dmarc_cname_domain: null
                guidance:
                  provider: null
                  guide_url: https://dnsdoctor.dev/learn/how-to-add-a-txt-record
                  apply_url: null
                  why_monitoring_guide: null
                  no_writes: Nothing here is applied to anyone's DNS; you publish every record yourself.
                  note: null
                  records:
                  - kind: dmarc
                    type: TXT
                    host: _dmarc.example.com
                    host_short: _dmarc
                    value: v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                    replaces_existing: true
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: 'Rate limited: this caller''s hourly call budget is spent, or a per-domain throttle applies.'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              example:
                detail: rate limit exceeded; try again later
      security: []
  /domains/records:
    get:
      tags:
      - Domains
      summary: Domain Records Route
      description: The records an owned domain still needs, and whether ours is published yet.
      operationId: domain_records_route_domains_records_get
      parameters:
      - name: domain
        in: query
        required: true
        schema:
          type: string
          title: Domain
        example: example.com
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Domain Records Route Domains Records Get
              example:
                domain:
                  id: 1fa191d407ad4a75b4872f59a472ba10
                  domain: example.com
                  verified: true
                  verified_at: '2026-11-09T12:00:00Z'
                  txt_host: _dnsdoctor-challenge.example.com
                  txt_value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                  dkim_selectors: []
                  rua_published: false
                  verification_lapsed_at: null
                challenge:
                  host: _dnsdoctor-challenge.example.com
                  value: dnsdoctor-verify=GBBshMoJN9cuPcKFZYeaYt3ihr6rp2ol
                enrollment:
                  host: _dmarc.example.com
                  record: v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                  address: 3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                  dmarc_cname: null
                  dmarc_cname_domain: null
                rua_published: false
                guidance:
                  provider: null
                  guide_url: https://dnsdoctor.dev/learn/how-to-add-a-txt-record
                  apply_url: null
                  why_monitoring_guide: null
                  no_writes: Nothing here is applied to anyone's DNS; you publish every record yourself.
                  note: null
                  records:
                  - kind: dmarc
                    type: TXT
                    host: _dmarc.example.com
                    host_short: _dmarc
                    value: v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                    replaces_existing: true
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: 'Rate limited: this caller''s hourly call budget is spent, or a per-domain throttle applies.'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              example:
                detail: rate limit exceeded; try again later
      security: []
  /domains/mine:
    get:
      tags:
      - Domains
      summary: My Domains Route
      description: 'Every domain on the account with its state and next step (`monitoring:read`).


        Unlike `GET /v1/domains` (verified rows + check statuses), this lists pending

        and lapsed rows too — the onboarding question is "what is left to do".'
      operationId: my_domains_route_domains_mine_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response My Domains Route Domains Mine Get
              example:
                domains:
                - domain: example.com
                  state: verified
                  next_step: Monitored. Call get_readiness to see whether DMARC enforcement is ready yet, and get_alerts for what changed.
                  checks: null
                  protection:
                    step: none
                    rungs: 1
                  reports_line: null
                  needs_you: 1
        '429':
          description: 'Rate limited: this caller''s hourly call budget is spent, or a per-domain throttle applies.'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              example:
                detail: rate limit exceeded; try again later
      security:
      - apiKey: []
  /change-watch:
    post:
      tags:
      - Domains
      summary: Change Watch Route
      description: '`watch_record_change`''s twin (D183): read the record, start the watch on a wait/edit.


        The same core, so the same one email to the token''s account. A lookup fault is

        the check-record route''s 503, never a started watch.'
      operationId: change_watch_route_change_watch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckRecordRequest'
            example:
              domain: example.com
              kind: dmarc
              expected_value: v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Change Watch Route Change Watch Post
              example:
                domain: example.com
                kind: dmarc
                name: _dmarc.example.com
                rdtype: TXT
                in_sync: false
                max_wait_seconds: 3600
                authoritative:
                  values:
                  - v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                  ttl: 3600
                  ns_in_agreement: true
                  nameservers_queried: 2
                cached:
                - resolver: 1.1.1.1
                  values:
                  - v=DMARC1; p=none; rua=mailto:dmarc@example.com
                  ttl_remaining: 3412
                - resolver: 8.8.8.8
                  values:
                  - v=DMARC1; p=none; rua=mailto:3f9a1c2e7b5d4a6f8e0c1b2a@rua.dnsdoctor.dev
                  ttl_remaining: 3600
                verdict: wait
                check_again_after_seconds: 3412
                found_at: []
                not_registered: false
                watch:
                  status: started
                  note: 'Watching _dmarc.example.com (TXT) for up to 48 hours. DNS Doctor will email the address on this DNS Doctor account once: when it''s live, or if something is in the way.'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: 'Rate limited: this caller''s hourly call budget is spent, or a per-domain throttle applies.'
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              example:
                detail: rate limit exceeded; try again later
      security:
      - apiKey: []
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    DomainOut:
      properties:
        domain:
          type: string
          title: Domain
        scanned_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Scanned At
        checks:
          items:
            $ref: '#/components/schemas/DomainCheck'
          type: array
          title: Checks
      type: object
      required:
      - domain
      - scanned_at
      - checks
      title: DomainOut
      description: 'A monitored domain with its latest scan snapshot''s per-check statuses.


        `scanned_at` is null (and `checks` empty) when the domain is verified but has

        no snapshot yet — awaiting its first monitored scan, not an error.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DomainIn:
      properties:
        domain:
          type: string
          maxLength: 253
          title: Domain
      type: object
      required:
      - domain
      title: DomainIn
      description: '`POST /v1/domains` — a bare domain, the same shape as `ScanIn`.'
    CheckRecordRequest:
      properties:
        domain:
          type: string
          title: Domain
        kind:
          type: string
          title: Kind
        host:
          anyOf:
          - type: string
          - type: 'null'
          title: Host
        expected_value:
          anyOf:
          - type: string
            maxLength: 1024
          - type: 'null'
          title: Expected Value
      type: object
      required:
      - domain
      - kind
      title: CheckRecordRequest
      description: 'One live record read. `kind` is the sugar; `host` only where it applies.


        Validation itself is `scanner/liveread.py::resolve_query`''s — this model

        carries only the wire shape, so the two consumers cannot drift on which

        `host`/`kind` combinations are legal (the route and the MCP core both raise

        from the same function, with the same authored detail strings).'
    DomainCheck:
      properties:
        check:
          type: string
          title: Check
        status:
          type: string
          title: Status
      type: object
      required:
      - check
      - status
      title: DomainCheck
      description: 'One check of a domain''s latest snapshot — name + status only.


        Deliberately NO letter grade: the A-F grade is `frontend/lib/grade.ts`, a

        versioned frontend contract. Recomputing it server-side would duplicate the

        rubric and drift; the API returns the raw per-check statuses instead.'
    DomainsOut:
      properties:
        domains:
          items:
            $ref: '#/components/schemas/DomainOut'
          type: array
          title: Domains
      type: object
      required:
      - domains
      title: DomainsOut
      description: 'The `GET /v1/domains` response: the account''s verified monitored domains.'
  headers:
    Retry-After:
      description: 'Seconds to wait before retrying: an upper bound on the refusing window (3600 for the hourly budgets, 60 for the per-domain scan throttle).'
      required: true
      schema:
        type: integer
        example: 3600
    RateLimit-Limit:
      description: Calls allowed per hour for this caller (per account with a token, else per client IP). Sent only when the hourly call budget refused the call.
      schema:
        type: integer
        example: 30
    RateLimit-Reset:
      description: Seconds until the window frees a call (same value as Retry-After). Budget refusals only.
      schema:
        type: integer
        example: 3600
    RateLimit-Remaining:
      description: Calls left in the current window (0 on a 429). Budget refusals only.
      schema:
        type: integer
        example: 0
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'A DNS Doctor API token: `Authorization: Bearer dnsd_…`.'
x-discovery:
  ownershipProofs:
  - '0xeb49cc7d9ac04add7ee0fbe51bc806b684ebdb6bfcdc8c2d7aa7eebc02032b93403764b0986d036ed68ad7e5914edc5403209f19806f4a87e15b1a5bdb73e9ab1b'