Monitor SPF, DKIM, and DMARC with MailSlurp
Documentation navigation
Track sender-domain health and DNS drift so delivery issues are visible before they affect customers.
Domain Monitor helps teams keep sender configuration healthy over time. It is designed for the operational reality that domains change, DNS records drift, and a working sender setup can quietly become risky if nobody is watching it.
What Domain Monitor is for
Use Domain Monitor when you need to keep track of:
- SPF records
- DKIM alignment and key configuration
- DMARC policy posture
- MX and related delivery dependencies
- sender-domain changes that could affect launch readiness or ongoing deliverability
Who typically uses it
- platform teams responsible for production email infrastructure
- lifecycle teams that depend on branded sender domains
- release teams that want to verify sender posture before large sends
Recommended workflow
- Add the domain or domains you care about.
- Confirm the expected authentication and routing posture.
- Review status before major campaigns or releases.
- Re-check whenever DNS, mail infrastructure, or ownership changes.
What to do when a domain needs attention
Start with the item that changed or failed, then work outward:
- confirm which DNS record or sender-health signal changed
- compare it to the expected production setup
- correct the configuration in DNS or the sending platform
- re-run the review before resuming large sends
How it fits with other docs
- Use Custom domains when you are setting sender identity up for the first time.
- Use Campaign Probe when you need to review actual live campaign output.
- Use Deliverability tests when you need a pass/fail release or launch check.
- Use Reputation when sender-health risks show up in delivery outcomes.
Create your first monitor
Begin with a domain you send from and identify the services authorized to send for it. A DNS check inspects the domain's records; a delivered sample adds evidence about the authentication of an actual message.
For a one-off check, call checkDomainMonitor. To retain history and run checks on a schedule, create a saved monitor, then run it immediately:
Install mailslurp-client and configure the client on your server. Replace the domain with your sending domain:
import { MailSlurp } from 'mailslurp-client';
const mailslurp = new MailSlurp({ apiKey: process.env.MAILSLURP_API_KEY });
const YOUR_DOMAIN = 'example.com';
let monitor;
// Run a one-shot domain monitor check without creating a saved monitor.
const domainCheck = await mailslurp.toolsController.checkDomainMonitor({
checkDomainMonitorOptions: {
domain: YOUR_DOMAIN,
},
});
console.log({
domain: domainCheck.domain,
status: domainCheck.status,
healthScore: domainCheck.healthScore,
spfOk: domainCheck.spfOk,
dmarcOk: domainCheck.dmarcOk,
dkimOk: domainCheck.dkimOk,
mxOk: domainCheck.mxOk,
insights: domainCheck.insights,
});
// Create a saved monitor for scheduled domain authentication checks.
monitor = await mailslurp.domainMonitorController.createDomainMonitor({
createDomainMonitorOptions: {
domain: YOUR_DOMAIN,
name: `Deliverability monitor for ${YOUR_DOMAIN}`,
intervalSeconds: 24 * 60 * 60,
schedulingEnabled: true,
},
});
console.log({
monitorId: monitor.id,
domain: monitor.domain,
schedulingEnabled: monitor.schedulingEnabled,
});
// Trigger an immediate run and inspect the domain health result.
const runNow = await mailslurp.domainMonitorController.runDomainMonitorNow({
monitorId: monitor.id,
});
console.log({
runId: runNow.run.id,
status: runNow.run.status,
healthScore: runNow.run.healthScore,
passingChecks: runNow.run.passingChecks,
failingChecks: runNow.run.failingChecks,
insights: runNow.run.insights,
});
/domain-monitor/monitors
Create domain monitor
Request, parameters, and responses
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | |
name | string | No | Optional display name |
intervalSeconds | integer:int64 | No | Check interval in seconds |
enabled | boolean | No | Whether scheduled monitor runs are enabled (legacy alias for schedulingEnabled) |
schedulingEnabled | boolean | No | Whether scheduled monitor runs are enabled. Direct run-now is always permitted. |
{
"domain": "example.com",
"name": "Primary Domain",
"intervalSeconds": 300,
"enabled": true,
"schedulingEnabled": true
}
Responses
| Status | Schema | Description |
|---|---|---|
201 | DomainMonitorDto | Created |
HTTP and SDK snippets
HTTP
POST /domain-monitor/monitors HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
Content-Type: application/json
{
"domain": "example.com",
"name": "Primary Domain",
"intervalSeconds": 300,
"enabled": true,
"schedulingEnabled": true
}
cURL
curl -X POST "https://api.mailslurp.com/domain-monitor/monitors" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data '{"domain":"example.com","name":"Primary Domain","intervalSeconds":300,"enabled":true,"schedulingEnabled":true}'
JavaScript SDK
import { Configuration, DomainMonitorControllerApi } from "mailslurp-client";
const config = new Configuration({ apiKey: "YOUR_API_KEY" });
const domainMonitorController = new DomainMonitorControllerApi(config);
const request = {
"createDomainMonitorOptions": {
"domain": "example.com",
"name": "Primary Domain",
"intervalSeconds": 300,
"enabled": true,
"schedulingEnabled": true
}
};
const result = await domainMonitorController.createDomainMonitor(request);
Python SDK
import mailslurp_client
from mailslurp_client.api.domain_monitor_controller_api import DomainMonitorControllerApi
configuration = mailslurp_client.Configuration()
configuration.api_key["x-api-key"] = "YOUR_API_KEY"
with mailslurp_client.ApiClient(configuration) as api_client:
domainMonitorController = DomainMonitorControllerApi(api_client)
create_domain_monitor_options = {
"domain": "example.com",
"name": "Primary Domain",
"intervalSeconds": 300,
"enabled": True,
"schedulingEnabled": True
}
result = domainMonitorController.create_domain_monitor(create_domain_monitor_options)
/domain-monitor/monitors/{monitorId}/run-now
Run monitor now
Request, parameters, and responses
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
monitorId | string:uuid | Yes |
Responses
| Status | Schema | Description |
|---|---|---|
200 | DomainMonitorRunNowResult | OK |
HTTP and SDK snippets
HTTP
POST /domain-monitor/monitors/00000000-0000-4000-8000-000000000000/run-now HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
cURL
curl -X POST "https://api.mailslurp.com/domain-monitor/monitors/00000000-0000-4000-8000-000000000000/run-now" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"
JavaScript SDK
import { Configuration, DomainMonitorControllerApi } from "mailslurp-client";
const config = new Configuration({ apiKey: "YOUR_API_KEY" });
const domainMonitorController = new DomainMonitorControllerApi(config);
const request = {
"monitorId": "00000000-0000-4000-8000-000000000000"
};
const result = await domainMonitorController.runDomainMonitorNow(request);
Python SDK
import mailslurp_client
from mailslurp_client.api.domain_monitor_controller_api import DomainMonitorControllerApi
configuration = mailslurp_client.Configuration()
configuration.api_key["x-api-key"] = "YOUR_API_KEY"
with mailslurp_client.ApiClient(configuration) as api_client:
domainMonitorController = DomainMonitorControllerApi(api_client)
result = domainMonitorController.run_domain_monitor_now("00000000-0000-4000-8000-000000000000")
Open the returned run in the dashboard or retrieve it with getDomainMonitorRun. Read the status, individual findings and evidence before changing DNS. A failed execution or an unchecked signal should not be treated as a healthy result.
Continue the workflow
- Interpret authentication findings and compare runs.
- Schedule checks and configure email, Slack, Teams or webhook alerts.
- Connect Google Postmaster data.
- Run inbox placement after a sender change to measure actual folder outcomes.
- Review warmup progress when introducing or recovering a sender.