---
title: "Get a domain and DNS records"
method: GET
path: "/domains/{id}"
tags: ["Domains"]
---

# Get a domain and DNS records

`GET /domains/{id}`

## Request

- Base URL: `https://api.groundmail.dev`
- URL: `https://api.groundmail.dev/domains/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Response `200`

Domain detail

- DomainDetailResponse
  - `domain` Domain, required
    - `id` string, required
    - `name` string, required
    - `status` 'pending' | 'verified' | 'failed', required
    - `created_at` string, date-time, required
    - `verified_at` string, date-time, nullable, required
    - `open_tracking` boolean, required: Open tracking preference for this domain.
    - `click_tracking` boolean, required: Click tracking preference for this domain.
    - `tracking_status` 'disabled' | 'pending' | 'active' | 'error', required: Whether open/click tracking is applied to outgoing mail. `disabled` when both preferences are off, `pending` until the tracking CNAME is accepted and a certificate is issued for the tracking hostname (links and opens are not tracked yet; this takes a few minutes after the CNAME is added), `active` once both are done, `error` when tracking or the certificate could not be set up. Re-checked when you verify the domain and when you read it.
    - `tracking_error` string, nullable, required: Why tracking is not active yet, when `tracking_status` is `pending` or `error`.
    - `tls_mode` 'opportunistic' | 'enforced', required: Preferred outbound TLS behavior for this domain.
    - `inbound_enabled` boolean, required: True when Groundmail should accept inbound mail for this domain.
    - `inbound_status` 'disabled' | 'pending' | 'active' | 'error', required: `pending` before verification, `active` once inbound receiving is configured, or `error` when setup fails.
    - `inbound_error` string, nullable, required: Last inbound configuration error, if any.
    - `inbound_spam_threshold` number, nullable: Received mail scoring at or above this is `spam` (and dropped when `inbound_spam_action` is `drop`). Null uses the default (10) and drops nothing.
    - `inbound_spam_action` 'flag' | 'drop': `flag` keeps spam with `spam_status: spam`; `drop` discards it (no stored email, no webhook).
    - `tenant` string: The `external_id` of the tenant that owns this domain. Present only on a tenant's domain.
  - `records` DnsRecord[], required
    - `type` string, required: DNS record type (`TXT`, `CNAME`, or `MX`)
    - `host` string, required
    - `value` string, required: Record content. For MX records, the mail server hostname (priority is in `priority`).
    - `priority` integer: MX preference when `type` is `MX` (lower is preferred).
    - `purpose` string, required: Human-readable purpose (`Domain ownership`, `DKIM`, `Return path`, `SPF`, `DMARC`, `Inbound receiving`)
  - `analysis` DomainDnsAnalysis, required
    - `dmarc` DomainDmarcAnalysis, required
      - `host` string, required
      - `configured` boolean, required
      - `record` string, nullable, required
      - `policy` string, nullable, required: Parsed DMARC `p=` policy when present (`none`, `quarantine`, or `reject`)
      - `rua` string[], required
      - `guidance` string, required
    - `bimi` DomainBimiAnalysis, required
      - `host` string, required
      - `configured` boolean, required
      - `record` string, nullable, required
      - `location` string, nullable, required: Parsed BIMI `l=` logo URL when present
      - `authority` string, nullable, required: Parsed BIMI `a=` VMC URL when present
      - `requires_dmarc_enforcement` boolean, required: True when BIMI is unlikely to work until DMARC is set to p=quarantine or p=reject
      - `guidance` string, required
  - `inbound_records` DnsRecord[], required
    - `type` string, required: DNS record type (`TXT`, `CNAME`, or `MX`)
    - `host` string, required
    - `value` string, required: Record content. For MX records, the mail server hostname (priority is in `priority`).
    - `priority` integer: MX preference when `type` is `MX` (lower is preferred).
    - `purpose` string, required: Human-readable purpose (`Domain ownership`, `DKIM`, `Return path`, `SPF`, `DMARC`, `Inbound receiving`)
  - `inbound_note` string, required
  - `inbound_configured` boolean
  - `inbound_pending` boolean
  - `inbound_error` string, nullable
  - `tracking_dns` DomainTrackingDns
    - `required` boolean, required: True when open or click tracking is enabled for this domain.
    - `host` string, nullable, required: Customer CNAME host (e.g. ps.example.com) when tracking is required.
    - `target` string, nullable, required: Tracking CNAME target when tracking is required.
    - `ok` boolean, nullable, required: Whether the tracking CNAME resolves to `target` in public DNS; null when tracking is disabled. Use the domain's `tracking_status` to know whether tracking is active.
  - `tracking_error` string, nullable: Present when tracking preferences were saved but delivery-side tracking provisioning failed. Customer-facing message; internal failure details are logged server-side.
  - `tls_error` string, nullable: Present when TLS mode was saved but delivery-side TLS provisioning failed. Customer-facing message; internal failure details are logged server-side.

## Other responses

- `401`: Unauthorized
- `404`: Domain not found

---

[API](https://skmtc.dev/groundmail/apis/groundmail-api.md) · [All operations](https://skmtc.dev/groundmail/apis/groundmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/groundmail/apis/groundmail-api/revisions/479821c9fecf?raw)
