MonitorsSmtp monitors
Create SMTP Monitor
Creates a new SMTP monitor.
POST /api/smtp-monitors
Authentication
Requires a valid session.
- Header:
Authorization: Bearer <token>
Request Body
{
"customerId": "11111111-1111-4111-8111-111111111111",
"name": "Outbound SMTP",
"hostname": "smtp.example.com",
"port": 587,
"status": "active",
"checkInterval": 60,
"timeoutSeconds": 30,
"smtpConfig": {
"secure": false,
"ignoreTls": false,
"requireTls": false,
"auth": {
"user": "username",
"pass": "password"
}
}
}Fields
customerId(number | string, required)- Accepts either the internal numeric customer ID or the public customer UUID.
name(string, required)hostname(string, required)- Must be a hostname only (no protocol like
https://, no path like/smtp).
- Must be a hostname only (no protocol like
port(number | null, optional)- If omitted or
null, the worker defaults to465whensmtpConfig.secure=true, otherwise25.
- If omitted or
status(string, optional)- Allowed:
active,maintenance,disabled,paused,inactive
- Allowed:
checkInterval(number, optional)timeoutSeconds(number, optional)smtpConfig(object, optional)- Stored as the monitor's
configJSON.
- Stored as the monitor's
smtpConfig (worker-supported keys)
The SMTP worker coerces/uses these keys:
secure(boolean, defaultfalse)ignoreTls(boolean, defaultfalse)requireTls(boolean, defaultfalse)auth.userandauth.pass(strings)- Credentials are only used when both
userandpassare provided.
- Credentials are only used when both
cURL
curl -X POST "https://YOUR_DOMAIN/api/smtp-monitors" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customerId": "11111111-1111-4111-8111-111111111111",
"name": "Outbound SMTP",
"hostname": "smtp.example.com",
"port": 587,
"status": "active",
"checkInterval": 60,
"timeoutSeconds": 30,
"smtpConfig": {
"secure": false,
"ignoreTls": false,
"requireTls": false,
"auth": { "user": "username", "pass": "password" }
}
}'Response
{
"id": 200,
"organizationId": 1,
"customerId": 10,
"name": "Outbound SMTP",
"hostname": "smtp.example.com",
"port": 587,
"status": "active",
"checkInterval": 60,
"timeoutSeconds": 30,
"notificationEmail": null,
"notificationPhoneNumber": null,
"lastCheckedAt": null,
"createdAt": "2026-01-01T12:00:00.000Z",
"updatedAt": "2026-01-01T12:00:00.000Z",
"config": {
"secure": false,
"ignoreTls": false,
"requireTls": false,
"auth": { "user": "username", "pass": "password" }
},
"smtpConfig": {
"secure": false,
"ignoreTls": false,
"requireTls": false,
"auth": { "user": "username", "pass": "password" }
}
}Errors
400Invalid hostname or invalid request body400Invalid Customer identifier401Unauthorized403Forbidden (e.g.readonlyor global supporter)