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

# Get domain DNS records

`GET /domains/{id}/dns-records`

## Request

- Base URL: `https://shipmail.to/api/v1`
- URL: `https://shipmail.to/api/v1/domains/{id}/dns-records`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://shipmail.to/api/auth/oauth2/authorize`, token URL `https://shipmail.to/api/auth/oauth2/token`)

Return the DNS records Shipmail requires for this domain and run a live, read-only DNS check. A connected domain needs four records: mx, spf, dkim and dmarc. A domain bought through Shipmail also returns mail_from_mx and mail_from_spf, which Shipmail publishes itself. This endpoint does not update the domain's persisted verification state.

## Headers

- `X-Shipmail-Organization` string

## Response `200`

Required DNS records with live diagnostics.

- DomainDnsRecordSet
  - `object` 'dns_record_set', required
  - `domain_id` string, required
  - `domain_name` string, required
  - `all_verified` boolean, required
  - `checked_at` string, date-time, required
  - `records` DomainDnsRecord[], required
    - `key` 'mx' | 'spf' | 'mail_from_mx' | 'mail_from_spf' | 'dkim' | 'dmarc', required
    - `type` 'MX' | 'TXT', required
    - `host` string, required: DNS host relative to the domain. @ means the root domain.
    - `value` string, nullable, required: Expected value. Null only while the DKIM value is pending.
    - `priority` integer, nullable, required: MX priority, or null for TXT records.
    - `ttl` integer, required
    - `status` 'verified' | 'not_found' | 'mismatch' | 'pending', required
    - `found_values` string[], required: Values observed during the live DNS check.

## Other responses

- `404`: Resource not found.
- `422`: Validation failed.
- `429`: Rate limit exceeded.

---

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