---
title: "Capture a DNS snapshot"
method: POST
path: "/api/domains/{domain}/dns/snapshot"
tags: ["DNS"]
---

# Capture a DNS snapshot

`POST /api/domains/{domain}/dns/snapshot`

## Request

- Base URL: `https://domani.run`
- URL: `https://domani.run/api/domains/{domain}/dns/snapshot`
- Auth: HTTP bearer

Captures all DNS records for a domain via public DNS lookups (Cloudflare DoH). Discovers subdomains from Certificate Transparency logs, SPF records, and common names. The snapshot is also stored server-side as a backup.

## Path parameters

- `domain` string, required

## Request body

- object
  - `extra_subdomains` string[]: Additional subdomains to include in the snapshot

## Response `200`

DNS snapshot captured

- object
  - `domain` string
  - `records` DnsRecord[]
    - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SRV' | 'CAA' | 'TLSA', required: DNS record type. TLSA publishes a DANE record; its value is the rdata 'usage selector matching-type hex-data'.
    - `name` string, required: Record name (@ for root, or subdomain, e.g. _443._tcp for TLSA)
    - `value` string, required: Record value (IP address, hostname, or TLSA rdata like '3 1 1 abc123...')
    - `ttl` integer, required: Time to live in seconds
    - `priority` integer: Priority value (required for MX records)
    - `required` boolean: False when the zone Domani manages for the domain cannot hold the record (a TXT longer than the registrar accepts); such a record is shown but not needed for mail to work. Absent on plain zone records.
  - `subdomains` string[]
  - `sources` string[]
  - `capturedAt` string, date-time

## Other responses

- `401`: Missing or invalid API key
- `404`: Domain not found
- `429`: Rate limit exceeded - wait and retry

---

[API](https://skmtc.dev/domani/apis/domani-run-api.md) · [All operations](https://skmtc.dev/domani/apis/domani-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/domani/apis/domani-run-api/revisions/7679f8159533?raw)
