Domains
Add and verify sending domains programmatically.
Before you can send email from a domain, you must add it and publish DNS records that prove ownership (MX, SPF, DKIM, DMARC).
List Domains
GET /api/v1/domains
Scope: domains:manage
Response
Add a Domain
POST /api/v1/domains
Scope: domains:manage
Adds a new domain and returns the DNS records to publish. DKIM keys are generated server-side.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Domain name (e.g., wistfare.com) |
Response
Publish each record in your DNS provider, then call the verify endpoint.
Verify DNS Records
POST /api/v1/domains/:id/verify
Scope: domains:manage
Triggers a DNS lookup and updates the mx_verified, spf_verified, dkim_verified, dmarc_verified flags. When all pass, the domain's verified becomes true.
Response
Delete a Domain
DELETE /api/v1/domains/:id
Scope: domains:manage
Removes the domain and cascades delete to all mailboxes under it. This is irreversible.
Returns { "ok": true }.