Domain monitor schedules and alerts
Documentation navigation
Schedule domain checks and route severity-based alerts to email, Slack, Teams or a webhook.
Create a saved domain monitor before adding alerts. Choose a check interval that fits how quickly your team needs to detect a DNS or sender change. Use an immediate run after an intentional configuration change instead of waiting for the next scheduled check.
Enable a schedule
Set schedulingEnabled: true and intervalSeconds when creating or updating the monitor. For example, 86400 requests a daily interval. Turning scheduling off pauses future scheduled checks; an explicit run-now request is still permitted.
/domain-monitor/monitors/{monitorId}
Update domain monitor
Request, parameters, and responses
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
monitorId | string:uuid | Yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Optional display name |
intervalSeconds | integer:int64 | No | Interval in seconds |
enabled | boolean | No | Enable/disable scheduled monitor runs (legacy alias for schedulingEnabled) |
schedulingEnabled | boolean | No | Enable/disable scheduled monitor runs. Direct run-now remains available. |
{
"name": "Example name",
"intervalSeconds": 1,
"enabled": true,
"schedulingEnabled": true
}
Responses
| Status | Schema | Description |
|---|---|---|
200 | DomainMonitorDto | OK |
HTTP and SDK snippets
HTTP
PUT /domain-monitor/monitors/00000000-0000-4000-8000-000000000000 HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
Content-Type: application/json
{
"name": "Example name",
"intervalSeconds": 1,
"enabled": true,
"schedulingEnabled": true
}
cURL
curl -X PUT "https://api.mailslurp.com/domain-monitor/monitors/00000000-0000-4000-8000-000000000000" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data '{"name":"Example name","intervalSeconds":1,"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 = {
"monitorId": "00000000-0000-4000-8000-000000000000",
"updateDomainMonitorOptions": {
"name": "Example name",
"intervalSeconds": 1,
"enabled": true,
"schedulingEnabled": true
}
};
const result = await domainMonitorController.updateDomainMonitor(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)
update_domain_monitor_options = {
"name": "Example name",
"intervalSeconds": 1,
"enabled": True,
"schedulingEnabled": True
}
result = domainMonitorController.update_domain_monitor("00000000-0000-4000-8000-000000000000", update_domain_monitor_options)
Keep one history for the domain when changing its interval. Creating a new monitor for every check makes it harder to compare the same sender over time.
Choose an alert destination
An alert sink belongs to one monitor. It specifies a destination type, target, minimum severity and enabled state.
| Destination | Setup |
|---|---|
| Use an address monitored by the people responsible for the sender. | |
| Webhook | Use an HTTPS receiver in your operations system. |
| Slack or Teams | Configure the destination required by the monitor's alert settings, then select the severity. |
Start with HIGH when only urgent findings should interrupt the team, or MEDIUM when the channel is used for regular sender review. The supported thresholds are LOW, MEDIUM, HIGH and CRITICAL.
// Add an alert sink and get the verification address for observed auth samples.
const alertSink =
await mailslurp.domainMonitorController.createDomainMonitorAlertSink({
monitorId: monitor.id,
createDomainMonitorAlertSinkOptions: {
type: "EMAIL",
target: YOUR_ALERT_EMAIL,
severityThreshold: "MEDIUM",
enabled: true,
},
});
const verification =
await mailslurp.domainMonitorController.createDomainMonitorEmailVerificationAddress({
monitorId: monitor.id,
});
console.log({
alertTarget: alertSink.target,
verificationAddress: verification.emailAddress,
verificationStatus: verification.status,
});
This example uses the mailslurp client and monitor from the setup page. Set YOUR_ALERT_EMAIL to your team address. It creates an email sink and a verification address for receiving authentication samples.
/domain-monitor/monitors/{monitorId}/alert-sinks
Create alert sink for monitor
Request, parameters, and responses
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
monitorId | string:uuid | Yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
type | enum: EMAIL | WEBHOOK | SLACK | TEAMS | Yes | |
target | string | Yes | |
severityThreshold | enum: LOW | MEDIUM | HIGH | CRITICAL | No | |
enabled | boolean | No |
{
"type": "EMAIL",
"target": "value",
"severityThreshold": "LOW",
"enabled": true
}
Responses
| Status | Schema | Description |
|---|---|---|
201 | DomainMonitorAlertSinkDto | Created |
HTTP and SDK snippets
HTTP
POST /domain-monitor/monitors/00000000-0000-4000-8000-000000000000/alert-sinks HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
Content-Type: application/json
{
"type": "EMAIL",
"target": "value",
"severityThreshold": "LOW",
"enabled": true
}
cURL
curl -X POST "https://api.mailslurp.com/domain-monitor/monitors/00000000-0000-4000-8000-000000000000/alert-sinks" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data '{"type":"EMAIL","target":"value","severityThreshold":"LOW","enabled":true}'
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",
"createDomainMonitorAlertSinkOptions": {
"type": "EMAIL",
"target": "value",
"severityThreshold": "LOW",
"enabled": true
}
};
const result = await domainMonitorController.createDomainMonitorAlertSink(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_alert_sink_options = {
"type": "EMAIL",
"target": "value",
"severityThreshold": "LOW",
"enabled": True
}
result = domainMonitorController.create_domain_monitor_alert_sink("00000000-0000-4000-8000-000000000000", create_domain_monitor_alert_sink_options)
/domain-monitor/monitors/{monitorId}/alert-sinks
List alert sinks for monitor
Request, parameters, and responses
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
monitorId | string:uuid | Yes |
Responses
| Status | Schema | Description |
|---|---|---|
200 | DomainMonitorAlertSinkDto[] | OK |
HTTP and SDK snippets
HTTP
GET /domain-monitor/monitors/00000000-0000-4000-8000-000000000000/alert-sinks HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
cURL
curl -X GET "https://api.mailslurp.com/domain-monitor/monitors/00000000-0000-4000-8000-000000000000/alert-sinks" \
-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.getDomainMonitorAlertSinks(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.get_domain_monitor_alert_sinks("00000000-0000-4000-8000-000000000000")
Investigate a missing alert
Check that the monitor's schedule is enabled, a run has completed, the alert sink is enabled and the finding meets the severity threshold. Inspect the actual run: an unchanged or lower-severity result may not be the event you expected. Confirm the destination configuration before broadening the alert threshold.
Use notification settings for account and device-render notifications. Domain-monitor sinks have their own monitor-specific configuration. Read monitor results to investigate the evidence behind an alert.