IMAP/POP Monitor erstellen
Erstellt einen neuen IMAP/POP Monitor.
POST /api/imap-pop-monitors
Authentifizierung
Erfordert eine gültige 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 }
}
}Felder
customerId(number | string, required)- Akzeptiert entweder die interne numerische Kunden-ID oder die öffentliche Kunden-UUID.
name(string, required)hostname(string, required)- Muss ein Hostname sein (kein Protokoll wie
https://, kein Pfad wie/imap).
- Muss ein Hostname sein (kein Protokoll wie
port(number | null, optional)- Wenn weggelassen oder
null, wählt der Worker einen Default-Port abhängig vonimapPopConfig.protocolundimapPopConfig.tls.
- Wenn weggelassen oder
status(string, optional)- Erlaubt:
active,maintenance,disabled,paused,inactive - Hinweis:
paused/inactivewerden zudisablednormalisiert.
- Erlaubt:
checkInterval(number, optional)timeoutSeconds(number, optional)imapPopConfig(object, optional)- Wird als
configJSON gespeichert.
- Wird als
imapPopConfig (vom Worker unterstützte Keys)
protocol(imap|pop3)- Default:
imap
- Default:
user(string)password(string)tls(boolean)- Default:
false
- Default:
tlsOptions.rejectUnauthorized(boolean)- Wird von der IMAP Worker-Library genutzt; POP3 ignoriert diese Option aktuell.
Default-Ports (Worker-Verhalten)
Wenn port weggelassen oder null ist:
- 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
400Ungültiger Hostname oder ungültiger Request Body400Ungültiger Customer-Identifier401Unauthorized403Forbidden (z.B.readonlyoder global supporter)404Customer not found