Register domain for verification
POST
/v1/domains
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" }'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 » Media type application/json
object
domain
required
string
Example
mycompany.comResponses
Sección titulada « Responses »Domain registered — add TXT record then call /verify
Media type application/json
object
domain
string
token
string
instructions
object
record_type
string
record_name
string
record_value
string
next_step
string
Example
{ "instructions": { "record_type": "TXT", "record_name": "_md-verify.mycompany.com", "record_value": "md-verify=abc123" }}Invalid domain
Unauthorized
Domain already registered