---
title: "Verify a domain"
method: POST
path: "/email/domains/{id}/verify"
tags: ["Domains"]
---

# Verify a domain

`POST /email/domains/{id}/verify`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/email/domains/{id}/verify`
- Auth: HTTP bearer

Run an on-demand DNS check and advance the domain's verification status. The response includes per-record `checks` so you can see exactly which DNS records are still missing or wrong. `checks.mx` and `checks.spf` are true once the record is correct on your nameservers; `checks.dkim` also needs the email provider to confirm the key. The domain is `verified` when all three are true. Get the records to publish from [Retrieve a domain](#get-email-domains-id). Verification also re-runs periodically in the background. If another workspace also added this domain, yours verifies only once the domain's sending identity is yours: your DKIM record is live and theirs is gone on two checks at least 10 minutes apart, or their domain is deleted. While they have it verified, this returns `409` once all your records are live, and nothing is written. Requires the `domains:write` capability.

## Response `200`

The updated domain with per-record checks.

- object
  - `object` 'domain', required
  - `id` string, required
  - `name` string, required
  - `status` 'pending' | 'verifying' | 'verified' | 'degraded' | 'failed', required
  - `records` object[], nullable, required
    - `type` string, required
    - `name` string, required
    - `value` string, required
    - `priority` number
  - `dkim_selector` string, nullable, required
  - `open_tracking` boolean, nullable, required
  - `click_tracking` boolean, nullable, required
  - `tls` 'opportunistic' | 'enforced', required
  - `tracking_subdomain` string, nullable, required
  - `tracking_verified_at` string, nullable, required: When tracked links and open pixels started using the custom tracking host (`tracking_subdomain`). Non-null only while sends actually use it: the domain is verified (or degraded) and the host's last check proved it answers over HTTPS. Otherwise null, and links use the default tracking host. A host that stops answering, or a domain that's no longer verified, goes back to null.
  - `verified_at` string, nullable, required
  - `created_at` string, required
  - `updated_at` string, required
  - `checks` unknown[], nullable
    - unknown

## Other responses

- `401`: Missing or invalid API key.
- `404`: Domain not found.
- `409`: Domain is already verified in another workspace.
- `502`: Couldn't reach the mailing engine.

---

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