MonitorsImap pop monitors
Create IMAP/POP Monitor
Creates a new IMAP/POP monitor.
POST /api/imap-pop-monitors
Authentication
Requires a valid session.
- Header:
Authorization: Bearer <token>
Request Body
{
"customerId": "11111111-1111-4111-8111-111111111111",
"name": "Mailbox Access",
"hostname": "mail.example.com",
"port": 993,
"status": "active",
"checkInterval": 30,
"timeoutSeconds": 30,
"imapPopConfig": {
"protocol": "imap",
"user": "monitor@example.com",
"password": "password",
"tls": true,
"tlsOptions": { "rejectUnauthorized": true }
}
}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/imap).
- Must be a hostname only (no protocol like
port(number | null, optional)- If omitted or
null, the worker chooses a default port depending onimapPopConfig.protocolandimapPopConfig.tls.
- If omitted or
status(string, optional)- Allowed:
active,maintenance,disabled,paused,inactive - Note:
paused/inactiveare normalized todisabled.
- Allowed:
checkInterval(number, optional)timeoutSeconds(number, optional)imapPopConfig(object, optional)- Stored as the monitor's
configJSON.
- Stored as the monitor's
imapPopConfig (worker-supported keys)
protocol(imap|pop3)- Default:
imap
- Default:
user(string)password(string)tls(boolean)- Default:
false
- Default:
tlsOptions.rejectUnauthorized(boolean)- Used by the IMAP worker library; POP3 currently ignores this option.
Default ports (worker behavior)
If port is omitted or null:
- IMAP:
- TLS (
tls: true):993 - Non-TLS (
tls: false):143
- TLS (
- POP3:
- TLS (
tls: true):995 - Non-TLS (
tls: false):110
- TLS (
cURL
curl -X POST "https://YOUR_DOMAIN/api/imap-pop-monitors" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customerId": "11111111-1111-4111-8111-111111111111",
"name": "Mailbox Access",
"hostname": "mail.example.com",
"port": 993,
"status": "active",
"checkInterval": 30,
"timeoutSeconds": 30,
"imapPopConfig": { "protocol": "imap", "user": "monitor@example.com", "password": "password", "tls": true }
}'Response
{
"id": 500,
"organizationId": 1,
"customerId": 10,
"name": "Mailbox Access",
"hostname": "mail.example.com",
"port": 993,
"checkInterval": 30,
"timeoutSeconds": 30,
"status": "active",
"notificationPhoneNumber": null,
"notificationEmail": null,
"lastCheckedAt": null,
"createdAt": "2026-02-26T12:00:00.000Z",
"updatedAt": "2026-02-26T12:00:00.000Z",
"config": {
"protocol": "imap",
"user": "monitor@example.com",
"password": "password",
"tls": true
},
"imapPopConfig": {
"protocol": "imap",
"user": "monitor@example.com",
"password": "password",
"tls": true
}
}Errors
400Invalid hostname or invalid request body400Invalid Customer identifier401Unauthorized403Forbidden (e.g.readonlyor global supporter)404Customer not found