### Status

Wird geladen...

### Version

-

### Uptime

-

### Environment

-

## API Endpoints

🔧 System
GET /api/health Server Status prüfen

#### Response

    { "success": true, "data": { "status": "healthy", ... } }

GET /api/config Öffentliche Konfiguration

#### Response

    Klicke auf "Testen"

🔐 OAuth
GET /api/oauth/status OAuth Provider Status

#### Response

    Klicke auf "Testen"

GET /api/oauth/gmail/connect Gmail OAuth starten

#### Query Parameter

    userId: string (required)

#### Response

    { "success": true, "data": { "url": "https://accounts.google.com/..." } }

GET /api/oauth/outlook/connect Outlook OAuth starten

#### Query Parameter

    userId: string (required)

#### Response

    { "success": true, "data": { "url": "https://login.microsoftonline.com/..." } }

📬 E-Mail
GET /api/email/accounts Verbundene E-Mail-Konten

#### Query Parameter

    userId: string (required)

#### Response

    {
      "success": true,
      "data": [
        { "id": "...", "email": "user@gmail.com", "provider": "gmail", "connected": true }
      ]
    }

POST /api/email/sort E-Mails sortieren (KI)

#### Request Body

    {
      "userId": "string (required)",
      "accountId": "string (required)",
      "maxEmails": 50
    }

#### Response

    {
      "success": true,
      "data": {
        "sorted": 42,
        "categories": { "vip": 5, "newsletters": 20, ... },
        "timeSaved": { "minutes": 10, "formatted": "10 Minuten" }
      }
    }

GET /api/email/stats Sortier-Statistiken

#### Query Parameter

    userId: string (required)

#### Response

    {
      "success": true,
      "data": {
        "totalSorted": 1250,
        "todaySorted": 45,
        "weekSorted": 312,
        "timeSaved": 312
      }
    }

DELETE /api/email/accounts/:accountId E-Mail-Konto trennen

#### Query Parameter

    userId: string (required)

#### Response

    { "success": true, "message": "Konto erfolgreich getrennt" }

💳 Subscription
POST /api/subscription/checkout Checkout Session erstellen

#### Request Body

    {
      "userId": "string (required)",
      "plan": "basic | pro | business (required)",
      "email": "string (optional)"
    }

#### Response

    { "success": true, "data": { "url": "https://checkout.stripe.com/...", "sessionId": "..." } }

GET /api/subscription/status Subscription Status

#### Query Parameter

    userId: string (required)

#### Response

    {
      "success": true,
      "data": {
        "status": "active",
        "plan": "pro",
        "features": { "emailAccounts": 3, ... },
        "currentPeriodEnd": "2026-02-15T00:00:00Z"
      }
    }

POST /api/subscription/portal Stripe Kundenportal

#### Request Body

    { "userId": "string (required)" }

#### Response

    { "success": true, "data": { "url": "https://billing.stripe.com/..." } }

POST /api/subscription/cancel Subscription kündigen

#### Request Body

    { "userId": "string (required)" }

## Features

### 🤖 Mistral AI

Intelligente E-Mail-Kategorisierung mit modernster KI-Technologie.

### 📧 Multi-Provider

Unterstützt Gmail und Outlook mit OAuth 2.0 Authentifizierung.

### 💳 Stripe Billing

Sichere Zahlungsabwicklung mit Subscriptions und Kundenportal.

### 🔒 Rate Limiting

Schutz vor Missbrauch mit intelligenten Request-Limits.

### 📊 Statistiken

Detaillierte Einblicke in sortierte E-Mails und gesparte Zeit.

### 🌐 Webhooks

Real-time Updates für Gmail und Outlook Benachrichtigungen.