{
  "name": "Authenticated Event Chat API",
  "version": "2.0.0",
  "authentication": "Firebase ID tokens required",
  "features": {
    "twoStepAuth": "WebSocket authentication after connection",
    "rateLimiting": "20 messages per minute per user",
    "messageLimits": "500 character maximum",
    "autoCleanup": "Ephemeral chat rooms with automatic cleanup"
  },
  "endpoints": {
    "chat": {
      "path": "/chat/:eventId",
      "method": "WebSocket",
      "description": "Real-time chat (auth via WebSocket message)",
      "authFlow": [
        "1. Connect to WebSocket",
        "2. Send auth message with Firebase token",
        "3. Receive auth_success confirmation",
        "4. Start chatting"
      ]
    },
    "chatInfo": {
      "path": "/chat/:eventId/info",
      "method": "GET",
      "description": "Get chat room statistics",
      "auth": "Authorization: Bearer <firebase-token>"
    },
    "connectToken": {
      "path": "/chat/:eventId/connect-token",
      "method": "POST",
      "description": "Get temporary connection token (optional)",
      "auth": "Authorization: Bearer <firebase-token>"
    },
    "health": {
      "path": "/health",
      "method": "GET",
      "description": "Health check"
    },
    "test": {
      "path": "/test",
      "method": "GET",
      "description": "Test endpoint with API info"
    }
  },
  "rateLimits": {
    "messagesPerMinute": 20,
    "maxMessageLength": 500,
    "authTimeoutSeconds": 30
  }
}