Skip to content

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.

The process has three steps:

  1. Register the domain via API → you receive a unique token.
  2. Publish that token as a TXT record in your DNS.
  3. Verify by calling the /verify endpoint → the system performs the DNS lookup and, if found, marks the domain as verified.

List registered domains

GET /v1/domains

Returns all domains on the account with their status: verified (boolean), verified_at (timestamp or null), and the associated token.

Register a domain

POST /v1/domains

Body: { "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}/verify

Performs 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.

Ventana de terminal
# Step 1: register the domain
curl -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:

FieldValue
Name / Host_md-verify.tuempresa.com
TypeTXT
Valuemd-verify=abc123xyz
TTLAny (300 seconds recommended)

Wait a few minutes for the record to propagate, then:

Ventana de terminal
# Step 3: verify
curl -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"
}

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.

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.