> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lupin.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Domains

> Send from your own domain with real DNS verification.

# Domains

`GET|POST /v0/domains` · `GET|PATCH|DELETE /v0/domains/:id` (project twins too).

## Setup

```bash theme={null}
curl -X POST $BASE/v0/domains -H "authorization: Bearer $KEY" \
  -H 'content-type: application/json' \
  -d '{"domain":"mail.example.com","tracking_enabled":true}'
```

The response includes every DNS record to publish: ownership TXT, MX,
SPF, DKIM and DMARC (plus wildcard MX when `subdomains_enabled`).
`GET …/:id/zone-file` renders them as BIND text; `GET …/:id/setup-link`
returns a console setup URL.

## Verify

`POST …/:id/verify` checks the ownership TXT over DNS-over-HTTPS in real
time. Missing records → `PENDING` (`dns_records_missing`); wrong values →
`dns_records_invalid`; transient DNS trouble → retryable `ses_*` reasons.
First success flips to `VERIFIED` and fires `domain.verified`. Enabling
`subdomains_enabled` later returns the domain to `PENDING` until the wildcard
MX exists.

`feedback_enabled` routes bounces/complaints back to your inboxes;
`tracking_enabled` is required for open tracking on that domain.
