Uptimeify Docs

SMTP Monitor erstellen

Erstellt einen neuen SMTP Monitor.

POST /api/smtp-monitors

Authentifizierung

Erfordert eine gültige 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"
    }
  }
}

Felder

  • customerId (number | string, erforderlich)
    • Akzeptiert entweder die interne numerische Kunden-ID oder die öffentliche Kunden-UUID.
  • name (string, erforderlich)
  • hostname (string, erforderlich)
    • Muss nur ein Hostname sein (kein Protokoll wie https://, kein Pfad wie /smtp).
  • port (number | null, optional)
    • Wenn weggelassen oder null, nutzt der Worker standardmäßig 465, wenn smtpConfig.secure=true, sonst 25.
  • status (string, optional)
    • Erlaubt: active, maintenance, disabled, paused, inactive
  • checkInterval (number, optional)
  • timeoutSeconds (number, optional)
  • smtpConfig (object, optional)
    • Wird als config JSON des Monitors gespeichert.

smtpConfig (vom Worker unterstützte Keys)

Der SMTP Worker nutzt/normalisiert diese Keys:

  • secure (boolean, default false)
  • ignoreTls (boolean, default false)
  • requireTls (boolean, default false)
  • auth.user und auth.pass (strings)
    • Credentials werden nur verwendet, wenn beide user und pass gesetzt sind.

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

  • 400 Ungültiger Hostname oder ungültiger Request Body
  • 400 Ungültiger Customer-Identifier
  • 401 Unauthorized
  • 403 Forbidden (z. B. readonly oder global supporter)

Auf dieser Seite