Skip to Content
Uptimeify Docs

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.deinkunde.com",
  "port": 993,
  "status": "active",
  "checkInterval": 30,
  "timeoutSeconds": 30,
  "imapPopConfig": {
    "protocol": "imap",
    "user": "monitor@deinkunde.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).
  • port (number | null, optional)
    • Wenn weggelassen oder null, wählt der Worker einen Default-Port abhängig von imapPopConfig.protocol und imapPopConfig.tls.
  • status (string, optional)
    • Erlaubt: active, maintenance, disabled, paused, inactive
    • Hinweis: paused / inactive werden zu disabled normalisiert.
  • checkInterval (number, optional)
  • timeoutSeconds (number, optional)
  • checkMode (string, optional)
    • Erlaubt: protocol, tcp. Standard: protocol.
    • Im Modus tcp führt der Monitor nur eine reine TCP-Port-Erreichbarkeitsprüfung durch: imapPopConfig ist nicht erforderlich und wird nicht gespeichert. Im Modus protocol läuft die vollständige IMAP/POP-Login-Prüfung (bisheriges Verhalten).
    • port ist erforderlich, wenn checkMode tcp ist. Ohne port schlägt der Request mit 400 / data.code: "portRequiredForTcp" fehl.
  • imapPopConfig (object, optional)
    • Wird als config JSON gespeichert.
    • Erforderlich (user + password), außer checkMode ist tcp.

imapPopConfig (vom Worker unterstützte Keys)

  • protocol (imap | pop3)
    • Default: imap
  • user (string)
  • password (string)
  • tls (boolean)
    • Default: false
  • 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
  • POP3:
    • TLS (tls: true): 995
    • Non-TLS (tls: false): 110

Duplikate

Hat dieser Kunde schon einen Monitor mit derselbe hostname (Gross- und Kleinschreibung und ein Punkt am Ende zählen nicht), port, checkMode und imapPopConfig.protocol, wird die Anfrage mit 409 und data.code monitorAlreadyExists abgewiesen. data.existingId und data.existingPublicId nennen den vorhandenen Monitor. Mit "allowDuplicate": true wird der zweite Monitor trotzdem angelegt (zum Beispiel mit anderem Intervall oder anderen Alarmwegen).

  • allowDuplicate (boolean, optional, Standard false): Monitor auch als Duplikat anlegen. Wird nicht gespeichert.
{
  "statusCode": 409,
  "statusMessage": "A monitor for this target already exists for this customer. Send allowDuplicate: true to create it anyway.",
  "data": { "code": "monitorAlreadyExists", "existingId": 300, "existingPublicId": "44444444-4444-4444-8444-444444444444" }
}

Grenze je Ziel-Host

Eine Organisation kann höchstens 100 Monitore auf denselben Ziel-Host haben, gezählt über alle Monitortypen zusammen (Websites mit HTTP, Keyword, DNS-Website und Playwright mit echter URL, dazu TCP, ICMP, DNS, SSH, SMTP, FTP und IMAP/POP). Die Grenze schützt davor, dass die Checkflotte als Lastgenerator gegen fremde Hosts missbraucht wird. Verglichen wird der exakte Hostname: Gross- und Kleinschreibung, Port, Pfad und ein Punkt am Ende zählen nicht, www.example.com und example.com sind aber verschiedene Hosts. Ist die Grenze erreicht, wird die Anfrage mit 403 und data.code targetHostMonitorLimitReached abgewiesen. data.host nennt den normalisierten Host, data.limit die Grenze. "allowDuplicate": true hebt die Grenze nicht auf. Dieselbe Prüfung läuft, wenn ein PATCH den hostname ändert. Ein PATCH ohne Hostwechsel geht immer, vorhandene Monitore über der Grenze bleiben bestehen. Brauchst du eine höhere Grenze, wende dich an den Support. Unabhängig von deiner Organisation dürfen über alle Uptimeify-Kunden hinweg höchstens 300 Monitore auf denselben Host zeigen. Darüber wird die Anfrage mit 403 und data.code targetHostPlatformLimitReached abgewiesen; data.host und data.limit sind wie oben gesetzt, die Meldung verrät nicht, wie viele Monitore andere Organisationen haben.

{
  "statusCode": 403,
  "statusMessage": "Target host monitor limit reached: your organization already has 100 monitors for example.com (maximum 100 per host). Remove monitors for this host or contact support to raise the limit.",
  "data": { "code": "targetHostMonitorLimitReached", "host": "example.com", "limit": 100 }
}

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.deinkunde.com",
    "port": 993,
    "status": "active",
    "checkInterval": 30,
    "timeoutSeconds": 30,
    "imapPopConfig": { "protocol": "imap", "user": "monitor@deinkunde.com", "password": "password", "tls": true }
  }'

Response

{
  "id": 500,
  "organizationId": 1,
  "customerId": 10,
  "name": "Mailbox Access",
  "hostname": "mail.deinkunde.com",
  "port": 993,
  "checkInterval": 30,
  "timeoutSeconds": 30,
  "allowedCheckCountryCodes": ["DE"],
  "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@deinkunde.com",
    "password": "password",
    "tls": true
  },
  "imapPopConfig": {
    "protocol": "imap",
    "user": "monitor@deinkunde.com",
    "password": "password",
    "tls": true
  }
}

Errors

  • 400 Ungültiger Hostname oder ungültiger Request Body
  • 400 Ungültiger Customer-Identifier
  • 401 Unauthorized
  • 403 Forbidden (z.B. readonly oder global supporter)
  • 404 Customer not found
  • 403 targetHostMonitorLimitReached: die Organisation hat schon 100 Monitore auf diesen Ziel-Host (siehe Grenze je Ziel-Host); allowDuplicate: true hebt die Grenze nicht auf
  • 403 targetHostPlatformLimitReached: auf den Host zeigen über alle Uptimeify-Kunden schon 300 Monitore (siehe Grenze je Ziel-Host)
  • 409 monitorAlreadyExists: dieser Kunde hat schon so einen Monitor (siehe Duplikate); allowDuplicate: true legt ihn trotzdem an

Auf dieser Seite