SMTP Monitor aktualisieren
Aktualisiert einen SMTP Monitor.
PATCH /api/smtp-monitors/:smtpMonitorPublicId
Authentifizierung
Erfordert eine gültige Session.
- Header:
Authorization: Bearer <token>
Parameter
smtpMonitorPublicId(Pfad, erforderlich): Öffentliche UUID des SMTP Monitors.
Request Body
Alle Felder sind optional.
{
"name": "Outbound SMTP (Primary)",
"hostname": "smtp.example.com",
"port": 587,
"status": "paused",
"checkInterval": 60,
"timeoutSeconds": 30,
"allowedCheckCountryCodes": ["de", "us"],
"smtpConfig": {
"secure": false,
"requireTls": true,
"auth": {
"user": "username",
"pass": "password"
}
}
}Hinweise
statusakzeptiertactive,maintenance,disabled,paused,inactive.pausedundinactivewerden zudisablednormalisiert.allowedCheckCountryCodeswird zu Uppercase ISO Codes normalisiert (z. B.DE,US). Leere Listen werdennull.- SMTP Config kann als
smtpConfigoder alsconfig(Alias) übergeben werden. Wenn beides fehlt, bleibt die gespeicherte Config unverändert. - Nutzer mit Rolle
readonlydürfen nurstatusändern.
cURL
curl -X PATCH "https://YOUR_DOMAIN/api/smtp-monitors/33333333-3333-4333-8333-333333333333" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "disabled"
}'Response
{
"id": 200,
"organizationId": 1,
"customerId": 10,
"name": "Outbound SMTP (Primary)",
"hostname": "smtp.example.com",
"port": 587,
"status": "disabled",
"checkInterval": 60,
"timeoutSeconds": 30,
"notificationEmail": null,
"notificationPhoneNumber": null,
"lastCheckedAt": "2026-01-01T12:00:00.000Z",
"createdAt": "2026-01-01T12:00:00.000Z",
"updatedAt": "2026-01-01T12:01:00.000Z",
"config": {
"secure": false,
"requireTls": true,
"auth": { "user": "username", "pass": "password" }
},
"smtpConfig": {
"secure": false,
"requireTls": true,
"auth": { "user": "username", "pass": "password" }
}
}Errors
400SMTP Monitor Public ID (UUID) erforderlich401Unauthorized403Forbidden (readonly Nutzer dürfen nurstatusändern; global supporters dürfen nicht aktualisieren)404Not found