Verify a domain
To send emails from a domain (for example, notificaciones@tuempresa.com)
you must prove that you own that domain. Verification is done by
publishing a TXT record in your DNS — a standard process that does not
affect your email or any other services on the domain.
Verification flow
Section titled “Verification flow”The process has three steps:
- Register the domain via API → you receive a unique token.
- Publish that token as a TXT record in your DNS.
- Verify by calling the
/verifyendpoint → the system performs the DNS lookup and, if found, marks the domain as verified.
Operations
Section titled “Operations”List registered domains
GET /v1/domainsReturns all domains on the account with their status: verified (boolean),
verified_at (timestamp or null), and the associated token.
Register a domain
POST /v1/domainsBody: { "domain": "tuempresa.com" }. Response: 201 with the token and the
exact instructions for publishing in DNS. Returns 409 if the domain
is already registered on the account.
Verify
POST /v1/domains/{domain}/verifyPerforms a DNS TXT lookup. If found, sets verified: true and records
verified_at. Response: { domain, verified, verified_at }. Returns 400
if the TXT record is not found yet.
Delete a domain
DELETE /v1/domains/{domain}Requires an admin API key. Response: 204.
Step-by-step example
Section titled “Step-by-step example”# Step 1: register the domaincurl -X POST https://api.mailerdash.com/v1/domains \ -H "Authorization: Bearer $MAILERDASH_API_KEY" \ -H "Content-Type: application/json" \ -d '{"domain": "tuempresa.com"}'The response includes the exact instructions you need:
{ "domain": "tuempresa.com", "token": "md-verify=abc123xyz", "instructions": { "record_type": "TXT", "record_name": "_md-verify.tuempresa.com", "record_value": "md-verify=abc123xyz", "next_step": "Add this TXT record to your DNS, then call POST /v1/domains/tuempresa.com/verify" }}Step 2: in your DNS panel (Cloudflare, Route 53, Namecheap, etc.) add the following record:
| Field | Value |
|---|---|
| Name / Host | _md-verify.tuempresa.com |
| Type | TXT |
| Value | md-verify=abc123xyz |
| TTL | Any (300 seconds recommended) |
Wait a few minutes for the record to propagate, then:
# Step 3: verifycurl -X POST https://api.mailerdash.com/v1/domains/tuempresa.com/verify \ -H "Authorization: Bearer $MAILERDASH_API_KEY"Successful response:
{ "domain": "tuempresa.com", "verified": true, "verified_at": "2026-06-22T14:30:00.000Z"}Without a verified domain you cannot send
Section titled “Without a verified domain you cannot send”Attempting to send an email (transactional or campaign) with a from_email whose
domain is not verified results in 403 Forbidden with code
domain_not_authorized. The error is returned at request time, before
the message is queued.
Once verified, the domain is automatically available for all API keys on your account — there is no additional activation step.
Next step
Section titled “Next step”With your domain verified, the next step is to configure the email authentication records: SPF, DKIM, and DMARC. These records improve deliverability and protect your domain from spoofing.
See the SPF, DKIM, and DMARC guide.