---
title: "SMTP-Versandprotokolle abrufen"
description: "Gibt die letzten SMTP-Versandereignis-Logs aus Redis zurück. Nur für Admins."
---

`GET /api/organization/smtp/logs`

## Query Parameter

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `limit` | number | 100 | Maximale Anzahl zurückzugebender Ereignisse (1-500) |

## Beispiel (cURL)

```bash
curl -X GET "$BASE_URL/api/organization/smtp/logs?limit=50" \
  -H "Cookie: $SESSION_COOKIE" \
  -H "Accept: application/json"
```

## Antwort (Response)

```json
{
  "events": [
    {
      "type": "smtp_send",
      "timestamp": "2026-04-15T12:00:00.000Z",
      "to": "admin@deinkunde.com",
      "subject": "Website Down: deinkunde.com",
      "status": "sent"
    }
  ]
}
```

Gibt `{ "events": [] }` zurück, wenn keine Logs vorhanden sind oder bei Redis-Fehlern (fail-open).

## Häufige Fehler

- `401 Unauthorized` wenn du nicht authentifiziert bist
- `403 Forbidden` wenn du kein Admin bist
