Register domain for verification
const url = 'https://api.mailerdash.com/v1/domains';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"domain":"mycompany.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mailerdash.com/v1/domains \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "domain": "mycompany.com" }'DEPRECATED — use the dashboard domain-centric flow (POST /v1/client/domains then POST /v1/client/domains/{domain}/verify), which manages the account-level domain (ownership + verification, the source of truth for send authorization). This key-scoped endpoint still works and now also writes the account-level domain, but the domain-centric endpoints are the supported path. Starts domain ownership verification. Returns TXT record to add to DNS.
Authorizations
Sección titulada «Authorizations »Request Body required
Sección titulada «Request Body required »object
Example
mycompany.comResponses
Sección titulada « Responses »Domain registered — add TXT record then call /verify
object
object
Example
{ "instructions": { "record_type": "TXT", "record_name": "_md-verify.mycompany.com", "record_value": "md-verify=abc123" }}Invalid domain
Unauthorized
Domain already registered. error.code distinguishes the cases: domain_held_by_hosting_tenant when the domain is registered to your own mailbox-hosting service (contact support to link it to this account as well — self-service cannot, because it would inherit the tenant’s verified state), otherwise a generic conflict when another account holds it.