{
    "openapi": "3.0.0",
    "info": {
        "title": "WayPresenter API",
        "description": "WayPresenter church presentation software API. All endpoints return a standard JSON envelope: { success: bool, message: string, data: mixed }.",
        "contact": {
            "name": "Waystream",
            "url": "https://waypresenter.com"
        },
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "/api/v1",
            "description": "API v1"
        }
    ],
    "paths": {
        "/analytics/track-signup": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "Track user signup",
                "description": "Records analytics data when a new user signs up. Tracks location, source, and referrer information.",
                "operationId": "dba056317a6ea1ec99973325afec362b",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "ip_address",
                                    "user_agent",
                                    "source"
                                ],
                                "properties": {
                                    "user_id": {
                                        "description": "User UUID (optional, can be linked later)",
                                        "type": "string",
                                        "format": "uuid",
                                        "example": "550e8400-e29b-41d4-a716-446655440000"
                                    },
                                    "email": {
                                        "description": "User email address",
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "ip_address": {
                                        "description": "User IP address for geolocation",
                                        "type": "string",
                                        "example": "192.168.1.1"
                                    },
                                    "user_agent": {
                                        "description": "Browser/user agent string",
                                        "type": "string",
                                        "example": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
                                    },
                                    "source": {
                                        "description": "Where the signup originated",
                                        "type": "string",
                                        "enum": [
                                            "website",
                                            "desktop_app",
                                            "mobile_app"
                                        ]
                                    },
                                    "referrer": {
                                        "description": "Referrer URL or source",
                                        "type": "string",
                                        "example": "https://google.com"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Signup tracked successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Signup tracked successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Too many requests. Please slow down."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/analytics/track-download": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "Track download event",
                "description": "Records analytics data when a user downloads the application. Tracks platform, location, and source.",
                "operationId": "82fcf3ee45945fc84b6fb577c6368690",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "platform",
                                    "ip_address",
                                    "user_agent",
                                    "source"
                                ],
                                "properties": {
                                    "user_id": {
                                        "description": "User UUID (optional)",
                                        "type": "string",
                                        "format": "uuid",
                                        "example": "550e8400-e29b-41d4-a716-446655440000"
                                    },
                                    "email": {
                                        "description": "User email address",
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "platform": {
                                        "description": "Download platform",
                                        "type": "string",
                                        "enum": [
                                            "windows",
                                            "macos-intel",
                                            "macos-arm",
                                            "linux-appimage",
                                            "linux-deb"
                                        ]
                                    },
                                    "ip_address": {
                                        "description": "User IP address for geolocation",
                                        "type": "string",
                                        "example": "192.168.1.1"
                                    },
                                    "user_agent": {
                                        "description": "Browser/user agent string",
                                        "type": "string",
                                        "example": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
                                    },
                                    "source": {
                                        "description": "Where the download originated",
                                        "type": "string",
                                        "enum": [
                                            "download_page",
                                            "email_link",
                                            "direct",
                                            "external"
                                        ]
                                    },
                                    "referrer": {
                                        "description": "Referrer URL or source",
                                        "type": "string",
                                        "example": "https://google.com"
                                    },
                                    "download_link_url": {
                                        "description": "The actual download URL",
                                        "type": "string",
                                        "example": "https://cdn.example.com/WayPresenter-Setup.exe"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Download tracked successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Download tracked successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Too many requests. Please slow down."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/admin/analytics/signups": {
            "get": {
                "tags": [
                    "Admin Analytics"
                ],
                "summary": "Get signup statistics",
                "description": "Returns aggregated signup analytics data including totals, breakdowns by country/source/city, and daily trends.",
                "operationId": "3b679e1f3c7ef8b7b4521261e09f061a",
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "description": "Number of days to look back (1-365)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 30,
                            "maximum": 365,
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Signup statistics retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "required": [
                                                "total_signups",
                                                "by_country",
                                                "by_source",
                                                "top_cities",
                                                "daily_signups"
                                            ],
                                            "properties": {
                                                "total_signups": {
                                                    "type": "integer",
                                                    "example": 1250
                                                },
                                                "by_country": {
                                                    "type": "object",
                                                    "example": {
                                                        "US": 450,
                                                        "UK": 230,
                                                        "Canada": 180
                                                    }
                                                },
                                                "by_source": {
                                                    "type": "object",
                                                    "example": {
                                                        "website": 800,
                                                        "desktop_app": 300,
                                                        "mobile_app": 150
                                                    }
                                                },
                                                "top_cities": {
                                                    "type": "object",
                                                    "example": {
                                                        "New York": 85,
                                                        "London": 62,
                                                        "Toronto": 45
                                                    }
                                                },
                                                "daily_signups": {
                                                    "type": "object",
                                                    "example": {
                                                        "2026-02-01": 45,
                                                        "2026-02-02": 52,
                                                        "2026-02-03": 38
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/admin/analytics/downloads": {
            "get": {
                "tags": [
                    "Admin Analytics"
                ],
                "summary": "Get download statistics",
                "description": "Returns aggregated download analytics data including totals, breakdowns by platform/country/source/city, and daily trends.",
                "operationId": "e5905d57a2b03e7009912cd7cf53d643",
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "description": "Number of days to look back (1-365)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 30,
                            "maximum": 365,
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Download statistics retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "required": [
                                                "total_downloads",
                                                "by_platform",
                                                "by_country",
                                                "by_source",
                                                "top_cities",
                                                "daily_downloads"
                                            ],
                                            "properties": {
                                                "total_downloads": {
                                                    "type": "integer",
                                                    "example": 3420
                                                },
                                                "by_platform": {
                                                    "type": "object",
                                                    "example": {
                                                        "windows": 1850,
                                                        "macos-intel": 680,
                                                        "macos-arm": 520,
                                                        "linux-appimage": 250,
                                                        "linux-deb": 120
                                                    }
                                                },
                                                "by_country": {
                                                    "type": "object",
                                                    "example": {
                                                        "US": 1420,
                                                        "UK": 580,
                                                        "Germany": 420
                                                    }
                                                },
                                                "by_source": {
                                                    "type": "object",
                                                    "example": {
                                                        "download_page": 1580,
                                                        "email_link": 1200,
                                                        "direct": 450,
                                                        "external": 190
                                                    }
                                                },
                                                "top_cities": {
                                                    "type": "object",
                                                    "example": {
                                                        "New York": 185,
                                                        "London": 142,
                                                        "Berlin": 98
                                                    }
                                                },
                                                "daily_downloads": {
                                                    "type": "object",
                                                    "example": {
                                                        "2026-02-01": 125,
                                                        "2026-02-02": 142,
                                                        "2026-02-03": 118
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/admin/analytics/metrics": {
            "get": {
                "tags": [
                    "Admin Analytics"
                ],
                "summary": "Get all analytics metrics",
                "description": "Returns combined signup and download analytics in a single request.",
                "operationId": "00bac57f5d2cef5917a1eaf6400a34a1",
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "description": "Number of days to look back (1-365)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 30,
                            "maximum": 365,
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "All metrics retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "required": [
                                                "signups",
                                                "downloads"
                                            ],
                                            "properties": {
                                                "signups": {
                                                    "required": [
                                                        "total_signups",
                                                        "by_country",
                                                        "by_source",
                                                        "top_cities",
                                                        "daily_signups"
                                                    ],
                                                    "properties": {
                                                        "total_signups": {
                                                            "type": "integer",
                                                            "example": 1250
                                                        },
                                                        "by_country": {
                                                            "type": "object",
                                                            "example": {
                                                                "US": 450,
                                                                "UK": 230,
                                                                "Canada": 180
                                                            }
                                                        },
                                                        "by_source": {
                                                            "type": "object",
                                                            "example": {
                                                                "website": 800,
                                                                "desktop_app": 300,
                                                                "mobile_app": 150
                                                            }
                                                        },
                                                        "top_cities": {
                                                            "type": "object",
                                                            "example": {
                                                                "New York": 85,
                                                                "London": 62,
                                                                "Toronto": 45
                                                            }
                                                        },
                                                        "daily_signups": {
                                                            "type": "object",
                                                            "example": {
                                                                "2026-02-01": 45,
                                                                "2026-02-02": 52
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "downloads": {
                                                    "required": [
                                                        "total_downloads",
                                                        "by_platform",
                                                        "by_country",
                                                        "by_source",
                                                        "top_cities",
                                                        "daily_downloads"
                                                    ],
                                                    "properties": {
                                                        "total_downloads": {
                                                            "type": "integer",
                                                            "example": 3420
                                                        },
                                                        "by_platform": {
                                                            "type": "object",
                                                            "example": {
                                                                "windows": 1850,
                                                                "macos-intel": 680,
                                                                "macos-arm": 520
                                                            }
                                                        },
                                                        "by_country": {
                                                            "type": "object",
                                                            "example": {
                                                                "US": 1420,
                                                                "UK": 580,
                                                                "Germany": 420
                                                            }
                                                        },
                                                        "by_source": {
                                                            "type": "object",
                                                            "example": {
                                                                "download_page": 1580,
                                                                "email_link": 1200
                                                            }
                                                        },
                                                        "top_cities": {
                                                            "type": "object",
                                                            "example": {
                                                                "New York": 185,
                                                                "London": 142
                                                            }
                                                        },
                                                        "daily_downloads": {
                                                            "type": "object",
                                                            "example": {
                                                                "2026-02-01": 125,
                                                                "2026-02-02": 142
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/admin/analytics/app-sessions": {
            "get": {
                "tags": [
                    "Admin Analytics"
                ],
                "summary": "Get app usage session statistics",
                "description": "Returns aggregated app usage stats: active sessions right now, DAU, MAU, total sessions, average duration, breakdown by platform, and daily active users. Stale sessions are auto-abandoned before computing.",
                "operationId": "9669d2bf12f6b6bfb4e120a9693b1d69",
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "description": "Lookback window in days (1–365). Affects total_sessions, avg_duration_seconds, by_platform, and daily_active_users. DAU and MAU always use today / this month.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 30,
                            "maximum": 365,
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "App session statistics retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "active_now": {
                                                    "description": "Sessions with status=active right now",
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "dau": {
                                                    "description": "Distinct users who started a session today",
                                                    "type": "integer",
                                                    "example": 85
                                                },
                                                "mau": {
                                                    "description": "Distinct users who started a session this calendar month",
                                                    "type": "integer",
                                                    "example": 430
                                                },
                                                "total_sessions": {
                                                    "description": "Total sessions started in the lookback window",
                                                    "type": "integer",
                                                    "example": 1240
                                                },
                                                "avg_duration_seconds": {
                                                    "description": "Average ended/abandoned session duration in the lookback window",
                                                    "type": "integer",
                                                    "example": 2700
                                                },
                                                "by_platform": {
                                                    "type": "object",
                                                    "example": {
                                                        "macos-intel": 620,
                                                        "windows": 480,
                                                        "macos-arm": 140
                                                    }
                                                },
                                                "daily_active_users": {
                                                    "type": "object",
                                                    "example": {
                                                        "2026-05-01": 78,
                                                        "2026-05-02": 91
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/admin/users": {
            "get": {
                "tags": [
                    "Admin"
                ],
                "summary": "List all users",
                "description": "Returns a paginated list of all users. Requires admin role.",
                "operationId": "e348ad3b20cd8a75e654c18ee3bcef42",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Filter by email or username",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "created_at",
                            "enum": [
                                "created_at",
                                "email",
                                "username",
                                "role"
                            ]
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Users retrieved successfully"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/ai/learning": {
            "get": {
                "tags": [
                    "AI"
                ],
                "summary": "List AI learning data",
                "description": "Returns a paginated list of AI learning data for the authenticated user.",
                "operationId": "f8d8b55468b561759d1e82a477423317",
                "responses": {
                    "200": {
                        "description": "Paginated list of AI learning data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/AiLearningData"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "Store learning data",
                "description": "Stores a new AI learning data entry for the authenticated user.",
                "operationId": "72ba083512fc420f2a6e5fb0fe2f8221",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "type",
                                    "original_text"
                                ],
                                "properties": {
                                    "type": {
                                        "description": "Type of learning data",
                                        "type": "string"
                                    },
                                    "original_text": {
                                        "description": "Original text content",
                                        "type": "string"
                                    },
                                    "detected_content": {
                                        "description": "Detected content",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "feedback": {
                                        "description": "User feedback",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "confidence": {
                                        "description": "Confidence score",
                                        "type": "number",
                                        "default": 0
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Learning data created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/AiLearningData"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/ai/learning/{id}": {
            "delete": {
                "tags": [
                    "AI"
                ],
                "summary": "Delete learning data",
                "description": "Deletes an AI learning data entry for the authenticated user.",
                "operationId": "466661a8e5e78a25d4e32999cfee2c54",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Learning data ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Learning data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/ai/detections": {
            "get": {
                "tags": [
                    "AI"
                ],
                "summary": "List detection logs",
                "description": "Returns a paginated list of detection logs for the authenticated user.",
                "operationId": "acd404ba278c6f688e10d7c7739f2ce6",
                "responses": {
                    "200": {
                        "description": "Paginated list of detection logs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/DetectionLog"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "Store detection log",
                "description": "Stores a new detection log entry for the authenticated user.",
                "operationId": "77a3d6eb4ea80b0284cc2fc10e5b7f0c",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "transcript"
                                ],
                                "properties": {
                                    "transcript": {
                                        "description": "Transcript text",
                                        "type": "string"
                                    },
                                    "detected_type": {
                                        "description": "Type of detection",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "content_id": {
                                        "description": "Associated content ID",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "confidence": {
                                        "description": "Confidence score",
                                        "type": "number",
                                        "default": 0
                                    },
                                    "action_taken": {
                                        "description": "Action taken based on detection",
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Detection log created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/DetectionLog"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/app-config": {
            "get": {
                "tags": [
                    "AppConfig"
                ],
                "summary": "Get app configuration",
                "description": "Returns developer-controlled configuration for the WayPresenter desktop app.",
                "operationId": "8aa481a614b9b4481cf60d2f5ddc1a8c",
                "responses": {
                    "200": {
                        "description": "App configuration retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "onlineTranscriptionEnabled": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "deepgramDefaultModel": {
                                                    "type": "string",
                                                    "example": "nova-3"
                                                },
                                                "maxBibleTranslationsFree": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "maxBibleTranslationsPremium": {
                                                    "type": "integer",
                                                    "example": 10
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/app-sessions": {
            "post": {
                "tags": [
                    "AppUsageSessions"
                ],
                "summary": "Start an app usage session",
                "description": "Opens a new session when the user logs in. Returns a session_id that the client uses for subsequent heartbeat and end calls.",
                "operationId": "65e8b36368d2be40e5531f8ee3a43eb2",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "device_id": {
                                        "description": "Registered device UUID",
                                        "type": "string",
                                        "format": "uuid",
                                        "nullable": true
                                    },
                                    "platform": {
                                        "description": "windows | macos-intel | macos-arm | linux-appimage | linux-deb",
                                        "type": "string",
                                        "example": "macos-intel"
                                    },
                                    "app_version": {
                                        "type": "string",
                                        "example": "1.0.7"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Session started",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "session_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "No organisation found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/app-sessions/{session}/heartbeat": {
            "put": {
                "tags": [
                    "AppUsageSessions"
                ],
                "summary": "Send a session heartbeat",
                "description": "Updates last_heartbeat_at to confirm the app is still running. Called every 5 minutes. A 404 response means the session was abandoned server-side; the client should start a new one.",
                "operationId": "fdd6446dec6807e523eec0388ea63e45",
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Heartbeat recorded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Session not found or already abandoned — client must start a new session",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "string",
                                            "example": "SESSION_NOT_FOUND"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/app-sessions/{session}/end": {
            "put": {
                "tags": [
                    "AppUsageSessions"
                ],
                "summary": "End an app usage session",
                "description": "Marks the session as ended and records the client-measured duration. Called on logout or app quit.",
                "operationId": "33e86fe97f4a544c376199c939c078d7",
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "duration_seconds"
                                ],
                                "properties": {
                                    "duration_seconds": {
                                        "description": "Total session duration in seconds (max 7 days)",
                                        "type": "integer",
                                        "maximum": 604800,
                                        "minimum": 0,
                                        "example": 3600
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Session ended",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Session not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/auth/sso": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "SSO authentication",
                "description": "Validates an SSO request_id, finds or creates the user, and returns the SSO JWT. Called by client apps at both sign-in and sign-up.",
                "operationId": "6c36097923112e4a4713f56504ab38d1",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "request_id"
                                ],
                                "properties": {
                                    "request_id": {
                                        "description": "SSO request ID from the SSO server",
                                        "type": "string"
                                    },
                                    "device_id": {
                                        "description": "Unique device identifier",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "platform": {
                                        "description": "Client platform (e.g. electron, ios, android)",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "device_token": {
                                        "description": "Push notification device token",
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Authentication successful",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "user": {
                                                            "$ref": "#/components/schemas/User"
                                                        },
                                                        "access_token": {
                                                            "description": "SSO JWT bearer token",
                                                            "type": "string"
                                                        },
                                                        "settings": {
                                                            "oneOf": [
                                                                {
                                                                    "$ref": "#/components/schemas/UserSetting"
                                                                }
                                                            ],
                                                            "nullable": true
                                                        },
                                                        "exists": {
                                                            "description": "Whether the user already existed",
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or invalid SSO response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Registration failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/me": {
            "get": {
                "tags": [
                    "Auth"
                ],
                "summary": "Get current user",
                "description": "Returns the authenticated user profile and settings.",
                "operationId": "e339e0e74860c0647fd1d41bbbbc13b2",
                "responses": {
                    "200": {
                        "description": "User retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "user": {
                                                            "$ref": "#/components/schemas/User"
                                                        },
                                                        "settings": {
                                                            "oneOf": [
                                                                {
                                                                    "$ref": "#/components/schemas/UserSetting"
                                                                }
                                                            ],
                                                            "nullable": true
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/auth/logout": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Logout",
                "description": "Logout endpoint for SSO JWT sessions. Session invalidation is handled by the SSO server.",
                "operationId": "a05022a34eef599e04fb0a5254375b84",
                "responses": {
                    "200": {
                        "description": "Logged out successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/auth/send-download-email": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Send download links email",
                "description": "Sends an email with application download links to the authenticated user.",
                "operationId": "dd9f73e65cf2918ac446ae7a93044806",
                "responses": {
                    "200": {
                        "description": "Download email sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/auth/send-download-email-by-email": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Send download email by email address",
                "description": "Sends download email to the provided email address (used for resend button).",
                "operationId": "04856c3a6ad184aa1c02372d7e1e62b8",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Download email sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "User not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/refresh": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Refresh token",
                "description": "Refreshes an SSO JWT token using the current bearer token.",
                "operationId": "03c7bb98658eb98880114621321bd8d8",
                "responses": {
                    "200": {
                        "description": "Token refreshed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "access_token": {
                                                            "description": "New access token",
                                                            "type": "string"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Token required or refresh failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bible/translations": {
            "get": {
                "tags": [
                    "Bible"
                ],
                "summary": "List Bible translations",
                "description": "Returns a list of all available Bible translations.",
                "operationId": "1c6eeaaaa601674ad9b407921ec2ecb6",
                "responses": {
                    "200": {
                        "description": "List of Bible translations",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bible/books": {
            "get": {
                "tags": [
                    "Bible"
                ],
                "summary": "List Bible books",
                "description": "Returns a list of all Bible books.",
                "operationId": "8ea5783d8d4013f58c0754d978bff4a6",
                "responses": {
                    "200": {
                        "description": "List of Bible books",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bible/{translation}/{book}/{chapter}": {
            "get": {
                "tags": [
                    "Bible"
                ],
                "summary": "Get chapter verses",
                "description": "Returns all verses for a specific chapter in a Bible book.",
                "operationId": "34822571277f132453f51b3ce879dff1",
                "parameters": [
                    {
                        "name": "translation",
                        "in": "path",
                        "description": "Translation abbreviation",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "book",
                        "in": "path",
                        "description": "Book name or abbreviation",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "chapter",
                        "in": "path",
                        "description": "Chapter number",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of verses in the chapter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Translation or book not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bible/{translation}/{book}/{chapter}/{verse}": {
            "get": {
                "tags": [
                    "Bible"
                ],
                "summary": "Get specific verse",
                "description": "Returns a specific Bible verse.",
                "operationId": "a6039eb80a351130c447c17ca8fa1a44",
                "parameters": [
                    {
                        "name": "translation",
                        "in": "path",
                        "description": "Translation abbreviation",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "book",
                        "in": "path",
                        "description": "Book name or abbreviation",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "chapter",
                        "in": "path",
                        "description": "Chapter number",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "verse",
                        "in": "path",
                        "description": "Verse number",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Verse retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Translation, book, or verse not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/bible/{translation}/search": {
            "get": {
                "tags": [
                    "Bible"
                ],
                "summary": "Search verses",
                "description": "Search for Bible verses within a specific translation.",
                "operationId": "349769a57c0575b4e257bb0e6bdc02a9",
                "parameters": [
                    {
                        "name": "translation",
                        "in": "path",
                        "description": "Translation abbreviation",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (minimum 2 characters)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Maximum number of results to return",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Search results",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Translation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/checkout": {
            "post": {
                "tags": [
                    "Billing"
                ],
                "summary": "Create a checkout session",
                "operationId": "3874bfe4ec7071ce758bb67cd18ac693",
                "responses": {
                    "200": {
                        "description": "Checkout URL",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Already subscribed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/billing/portal": {
            "post": {
                "tags": [
                    "Billing"
                ],
                "summary": "Get Stripe Customer Portal URL",
                "operationId": "b6bda0678ddca63ecf8ea1ab1c59d4f7",
                "responses": {
                    "200": {
                        "description": "Portal URL",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/subscription/auto-renew": {
            "post": {
                "tags": [
                    "Billing"
                ],
                "summary": "Toggle subscription auto-renew",
                "operationId": "108912aa4f05b236cbed867722f5b578",
                "responses": {
                    "200": {
                        "description": "Updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/subscription/renew-now": {
            "post": {
                "tags": [
                    "Billing"
                ],
                "summary": "Manually renew subscription",
                "operationId": "f8569bdfc3f9ff18a8eff623c7abcc5b",
                "responses": {
                    "200": {
                        "description": "Renewed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/subscription/cancel": {
            "post": {
                "tags": [
                    "Billing"
                ],
                "summary": "Cancel subscription at period end",
                "operationId": "69cd7443b0525600aedb9f5a2c07b56d",
                "responses": {
                    "200": {
                        "description": "Canceled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/billing/devices/{id}": {
            "delete": {
                "tags": [
                    "Billing"
                ],
                "summary": "Revoke a device by ID (admin/owner only)",
                "operationId": "862615706d83245754dca907faec7750",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Device revoked"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Device not found"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/libraries/{library}/contents": {
            "get": {
                "tags": [
                    "CustomContent"
                ],
                "summary": "List contents",
                "description": "Returns a list of custom contents for a library.",
                "operationId": "ad65d864c9f4c1368f40ed41a970cd17",
                "parameters": [
                    {
                        "name": "library",
                        "in": "path",
                        "description": "Library ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of custom contents",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/CustomContent"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "CustomContent"
                ],
                "summary": "Create content",
                "description": "Creates a new custom content in a library.",
                "operationId": "6058072de3f7e39f3d5939d0d23d7009",
                "parameters": [
                    {
                        "name": "library",
                        "in": "path",
                        "description": "Library ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "description": "Content title",
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "content": {
                                        "description": "Content body",
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "content_type": {
                                        "description": "Content type",
                                        "type": "string",
                                        "default": "text"
                                    },
                                    "slides": {
                                        "description": "Slides data",
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        },
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Content created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/CustomContent"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/contents/{id}": {
            "put": {
                "tags": [
                    "CustomContent"
                ],
                "summary": "Update content",
                "description": "Updates an existing custom content.",
                "operationId": "2574818ecc420be6b11faf634f386dd8",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Content ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "description": "Content title",
                                        "type": "string"
                                    },
                                    "content": {
                                        "description": "Content body",
                                        "type": "string"
                                    },
                                    "content_type": {
                                        "description": "Content type",
                                        "type": "string"
                                    },
                                    "slides": {
                                        "description": "Slides data",
                                        "type": "array",
                                        "items": {
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Content updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/CustomContent"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Content not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "CustomContent"
                ],
                "summary": "Delete content",
                "description": "Deletes a custom content.",
                "operationId": "6e7724a3d7b874923062742d93ddc014",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Content ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Content not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/devices": {
            "get": {
                "tags": [
                    "Devices"
                ],
                "summary": "List active devices for the current organization",
                "operationId": "46a0f54e6220465e766db551281ddf64",
                "responses": {
                    "200": {
                        "description": "Device list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Devices"
                ],
                "summary": "Register a new device",
                "operationId": "105912c6cbfa1e606b7eb228c5b83de1",
                "responses": {
                    "201": {
                        "description": "Device registered — token returned once",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Device limit reached",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/devices/{token}": {
            "delete": {
                "tags": [
                    "Devices"
                ],
                "summary": "Revoke a device",
                "operationId": "c2d42e1e68faa34354b3ffdb7a3c6623",
                "parameters": [
                    {
                        "name": "token",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Device revoked"
                    },
                    "404": {
                        "description": "Device not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/downloads/urls": {
            "get": {
                "tags": [
                    "Downloads"
                ],
                "summary": "Get all download URLs",
                "description": "Returns download URLs, versions, and metadata for all platforms.",
                "operationId": "b1aaad6995ed51d2b3a1f5c783354a9f",
                "responses": {
                    "200": {
                        "description": "Download URLs retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "windows": {
                                                    "properties": {
                                                        "url": {
                                                            "type": "string",
                                                            "example": "https://s3.../presigned-url"
                                                        },
                                                        "version": {
                                                            "type": "string",
                                                            "example": "1.0.3"
                                                        },
                                                        "filename": {
                                                            "type": "string",
                                                            "example": "waypresenter-1.0.3-setup.exe"
                                                        },
                                                        "size": {
                                                            "type": "integer",
                                                            "example": 223322777
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "macos-intel": {
                                                    "properties": {
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "version": {
                                                            "type": "string"
                                                        },
                                                        "filename": {
                                                            "type": "string"
                                                        },
                                                        "size": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "macos-arm": {
                                                    "properties": {
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "version": {
                                                            "type": "string"
                                                        },
                                                        "filename": {
                                                            "type": "string"
                                                        },
                                                        "size": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "linux-appimage": {
                                                    "properties": {
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "version": {
                                                            "type": "string"
                                                        },
                                                        "filename": {
                                                            "type": "string"
                                                        },
                                                        "size": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "linux-deb": {
                                                    "properties": {
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "version": {
                                                            "type": "string"
                                                        },
                                                        "filename": {
                                                            "type": "string"
                                                        },
                                                        "size": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/downloads/{platform}": {
            "get": {
                "tags": [
                    "Downloads"
                ],
                "summary": "Get download URL for platform",
                "description": "Returns download URL and metadata for a specific platform.",
                "operationId": "ebfe0f5b4e128b1fb9bcb847b62d4a46",
                "parameters": [
                    {
                        "name": "platform",
                        "in": "path",
                        "description": "Platform identifier",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "windows",
                                "macos-intel",
                                "macos-arm",
                                "linux-appimage",
                                "linux-deb"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Download URL retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "url": {
                                                    "type": "string"
                                                },
                                                "version": {
                                                    "type": "string"
                                                },
                                                "filename": {
                                                    "type": "string"
                                                },
                                                "size": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Platform not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Platform not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/downloads/versions": {
            "get": {
                "tags": [
                    "Downloads"
                ],
                "summary": "Get all version numbers",
                "description": "Returns just the version numbers for all platforms (lightweight endpoint).",
                "operationId": "30c1b1022a59858036a0c9465da2d365",
                "responses": {
                    "200": {
                        "description": "Versions retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "windows": {
                                                    "type": "string",
                                                    "example": "1.0.3"
                                                },
                                                "macos-intel": {
                                                    "type": "string",
                                                    "example": "1.0.3"
                                                },
                                                "macos-arm": {
                                                    "type": "string",
                                                    "example": "1.0.3"
                                                },
                                                "linux-appimage": {
                                                    "type": "string",
                                                    "example": "1.0.3"
                                                },
                                                "linux-deb": {
                                                    "type": "string",
                                                    "example": "1.0.3"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/feature-requests": {
            "get": {
                "tags": [
                    "Feature Requests"
                ],
                "summary": "Get all feature requests",
                "description": "Returns a paginated list of feature requests with optional filters",
                "operationId": "d856651ff637be8cb5daf330115466fb",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by status",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "open",
                                "under-review",
                                "planned",
                                "in-progress",
                                "completed",
                                "declined"
                            ]
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Filter by category",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "presentation",
                                "bible",
                                "media",
                                "ai",
                                "general"
                            ]
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Sort by",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "latest",
                                "popular"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "properties": {
                                                "requests": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "title": {
                                                                "type": "string"
                                                            },
                                                            "description": {
                                                                "type": "string"
                                                            },
                                                            "category": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "votes_count": {
                                                                "type": "integer"
                                                            },
                                                            "has_voted": {
                                                                "type": "boolean"
                                                            },
                                                            "created_at": {
                                                                "type": "string",
                                                                "format": "date-time"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Feature Requests"
                ],
                "summary": "Create a feature request",
                "description": "Creates a new feature request. Authentication required.",
                "operationId": "ff843113055d708358fc4ae7c0ed0cd2",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "description"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "Dark mode support"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Please add dark mode to reduce eye strain"
                                    },
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "presentation",
                                            "bible",
                                            "media",
                                            "ai",
                                            "general"
                                        ],
                                        "example": "general"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Feature request created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "title": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "category": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "votes_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/feature-requests/{id}": {
            "get": {
                "tags": [
                    "Feature Requests"
                ],
                "summary": "Get a specific feature request",
                "description": "Returns details of a specific feature request",
                "operationId": "43a272311726f90922849a38aac4250f",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Feature request ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful"
                    },
                    "404": {
                        "description": "Not found"
                    }
                }
            }
        },
        "/feature-requests/{id}/vote": {
            "post": {
                "tags": [
                    "Feature Requests"
                ],
                "summary": "Vote for a feature request",
                "description": "Adds or removes a vote for a feature request. Authentication required.",
                "operationId": "cf8b7c02143cce1e4c5577a2b6b3c4c1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Feature request ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Vote toggled successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "voted": {
                                            "type": "boolean"
                                        },
                                        "votes_count": {
                                            "type": "integer"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not found"
                    }
                }
            }
        },
        "/feature-requests/{id}/status": {
            "put": {
                "tags": [
                    "Feature Requests"
                ],
                "summary": "Update feature request status (Admin)",
                "description": "Updates the status of a feature request. Admin authentication required.",
                "operationId": "953c63479d8b3a5d739987b1b4eaa228",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Feature request ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "status"
                                ],
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "open",
                                            "under-review",
                                            "planned",
                                            "in-progress",
                                            "completed",
                                            "declined"
                                        ]
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Status updated successfully"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden - Admin access required"
                    },
                    "404": {
                        "description": "Not found"
                    }
                }
            }
        },
        "/media": {
            "get": {
                "tags": [
                    "Media"
                ],
                "summary": "List user media",
                "description": "Returns a paginated list of media for the authenticated user.",
                "operationId": "9ab42df5ee3522af70a5cebd5af4a52d",
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Filter by media type",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "image",
                                "video",
                                "audio",
                                "document"
                            ],
                            "nullable": true
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of media",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Media"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Media"
                ],
                "summary": "Upload media file",
                "description": "Uploads a new media file for the authenticated user.",
                "operationId": "5097fb0e01baab5c55492423b3ad5555",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file",
                                    "type"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Max 100MB",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "image",
                                            "video",
                                            "audio",
                                            "document"
                                        ]
                                    },
                                    "organization_id": {
                                        "type": "string",
                                        "format": "uuid",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Media uploaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Media"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/media/{id}": {
            "get": {
                "tags": [
                    "Media"
                ],
                "summary": "Get media",
                "description": "Returns a single media item with URL.",
                "operationId": "b7787c23458f63b35d90f467786c2b23",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Media ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Media retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Media"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Media not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Media"
                ],
                "summary": "Delete media",
                "description": "Deletes a media item and its associated files.",
                "operationId": "5bb1b0d0c929f2683607d9faa8111afd",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Media ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Media deleted successfully"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Media not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/organizations": {
            "get": {
                "tags": [
                    "Organizations"
                ],
                "summary": "List user organizations",
                "description": "Returns all organizations the authenticated user owns or is a member of.",
                "operationId": "212e7ae65bac93ef8fe7a173dd8c21ed",
                "responses": {
                    "200": {
                        "description": "Organizations retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Organization"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Create organization",
                "description": "Creates a new organization owned by the authenticated user.",
                "operationId": "242e48fe4b9103f0f1d4b5a5859f95fd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreOrganizationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Organization created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Organization"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/organizations/{id}": {
            "get": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Get organization",
                "description": "Returns a single organization by ID.",
                "operationId": "48cdf9d798c6ca08239cfc955245c9fc",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Organization retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Organization"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Organization not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Update organization",
                "description": "Updates an existing organization.",
                "operationId": "e0800af62031e251464c437124800423",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateOrganizationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Organization updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Organization"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Organization not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Delete organization",
                "description": "Deletes an organization.",
                "operationId": "75e2aee63897597e0059352c695789de",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Organization deleted successfully"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Organization not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/organizations/{organization}/invite": {
            "post": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Invite member to organization",
                "description": "Sends an invitation to a user to join the organization.",
                "operationId": "ff059c7df3ee62c8df6a4235c3ca26b6",
                "parameters": [
                    {
                        "name": "organization",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "role": {
                                        "type": "string",
                                        "example": "member"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Invitation sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Organization not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/organizations/{organization}/members/{user}": {
            "delete": {
                "tags": [
                    "Organizations"
                ],
                "summary": "Remove member from organization",
                "description": "Removes a member from the organization.",
                "operationId": "9ff7fa4a52e6db6e79fee660ce594b98",
                "parameters": [
                    {
                        "name": "organization",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user",
                        "in": "path",
                        "description": "User ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Member removed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Organization or user not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/presentations": {
            "get": {
                "tags": [
                    "Presentations"
                ],
                "summary": "List presentations",
                "description": "Returns a paginated list of presentations for the authenticated user.",
                "operationId": "ed85ffde072f2f069a827af51d675e21",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of presentations per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of presentations",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Presentation"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Presentations"
                ],
                "summary": "Create presentation",
                "description": "Creates a new presentation with optional slides.",
                "operationId": "c1fc80fb2b6345bee7868101cbdeeb11",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StorePresentationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Presentation created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Presentation"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/presentations/{id}": {
            "get": {
                "tags": [
                    "Presentations"
                ],
                "summary": "Get presentation",
                "description": "Returns a single presentation with its slides.",
                "operationId": "be460185e8e9459cb07f2aef54ed22fd",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Presentation ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Presentation retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Presentation"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Presentations"
                ],
                "summary": "Update presentation",
                "description": "Updates an existing presentation.",
                "operationId": "50fba3c8b819d51151a47406657c06d8",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Presentation ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdatePresentationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Presentation updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Presentation"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Presentations"
                ],
                "summary": "Delete presentation",
                "description": "Deletes a presentation.",
                "operationId": "8f16e5bfd6548fd5a3a4852151e9d8b2",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Presentation ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Presentation deleted successfully"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/presentations/{presentation}/duplicate": {
            "post": {
                "tags": [
                    "Presentations"
                ],
                "summary": "Duplicate presentation",
                "description": "Creates a copy of an existing presentation including all its slides.",
                "operationId": "f2625f855d043d90a7ae087f50f76b12",
                "parameters": [
                    {
                        "name": "presentation",
                        "in": "path",
                        "description": "Presentation ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Presentation duplicated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Presentation"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/presentations/{presentation}/slides": {
            "get": {
                "tags": [
                    "PresentationSlides"
                ],
                "summary": "List slides for a presentation",
                "operationId": "2419192aefc7c56063cdaaaedf95fb26",
                "parameters": [
                    {
                        "name": "presentation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Presentation slides retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/PresentationSlide"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "PresentationSlides"
                ],
                "summary": "Create a slide for a presentation",
                "operationId": "21ee274c996d1e6df09345bcc88f4921",
                "parameters": [
                    {
                        "name": "presentation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "type",
                                    "text_content"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    },
                                    "text_content": {
                                        "type": "string"
                                    },
                                    "media_id": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "duration": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "transition": {
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Presentation slide created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/PresentationSlide"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/presentation-slides/{id}": {
            "put": {
                "tags": [
                    "PresentationSlides"
                ],
                "summary": "Update a presentation slide",
                "operationId": "e6197b03308e2b81ac8bc10a61850194",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    },
                                    "text_content": {
                                        "type": "string"
                                    },
                                    "media_id": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "duration": {
                                        "type": "integer",
                                        "nullable": true
                                    },
                                    "transition": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Presentation slide updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/PresentationSlide"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation slide not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "PresentationSlides"
                ],
                "summary": "Delete a presentation slide",
                "operationId": "4d880c5319304c9cf39d30fdc18e6adc",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Presentation slide deleted successfully"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation slide not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/presentations/{presentation}/slides/reorder": {
            "post": {
                "tags": [
                    "PresentationSlides"
                ],
                "summary": "Reorder slides for a presentation",
                "operationId": "2f89e9aa845af40079f1102f3d2b75d5",
                "parameters": [
                    {
                        "name": "presentation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "slides"
                                ],
                                "properties": {
                                    "slides": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "id",
                                                "order"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "order": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Presentation slides reordered successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/PresentationSlide"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Presentation not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/search": {
            "get": {
                "tags": [
                    "Search"
                ],
                "summary": "Global search",
                "description": "Search across all content types (songs, presentations, bible verses, and media) for the authenticated user.",
                "operationId": "dab5c8ed6835f39e55a92e541a07fff0",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (minimum 2 characters)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Maximum number of results per type",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Search results across all types",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "properties": {
                                                        "songs": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/Song"
                                                            }
                                                        },
                                                        "presentations": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/Presentation"
                                                            }
                                                        },
                                                        "bible": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        },
                                                        "media": {
                                                            "type": "array",
                                                            "items": {
                                                                "$ref": "#/components/schemas/Media"
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/search/songs": {
            "get": {
                "tags": [
                    "Search"
                ],
                "summary": "Search songs",
                "description": "Search songs for the authenticated user with paginated results.",
                "operationId": "e47ded4808bdf4c1f4a7a583e27bfb26",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (minimum 2 characters)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of matching songs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Song"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/search/presentations": {
            "get": {
                "tags": [
                    "Search"
                ],
                "summary": "Search presentations",
                "description": "Search presentations for the authenticated user with paginated results.",
                "operationId": "91c52c0d0bd34958a908e6b0e44a3e4b",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (minimum 2 characters)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of matching presentations",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Presentation"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/search/bible": {
            "get": {
                "tags": [
                    "Search"
                ],
                "summary": "Search Bible verses",
                "description": "Search Bible verses with paginated results.",
                "operationId": "4d04dc6fd01704df4d5550bb3c0ae3ca",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (minimum 2 characters)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of matching Bible verses",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/search/media": {
            "get": {
                "tags": [
                    "Search"
                ],
                "summary": "Search media",
                "description": "Search media files for the authenticated user with paginated results.",
                "operationId": "11d2e65df7f8ea03fd03a657e8a8dfaf",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (minimum 2 characters)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of matching media",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Media"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/settings/{deviceId}": {
            "get": {
                "tags": [
                    "Settings"
                ],
                "summary": "Get settings for device",
                "operationId": "5cda21d2073b7761ec29a79116de21c8",
                "parameters": [
                    {
                        "name": "deviceId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UserSetting"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Settings"
                ],
                "summary": "Update settings for device",
                "operationId": "1f64bb04205f539cadbdf5b3e77985fa",
                "parameters": [
                    {
                        "name": "deviceId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "audio_settings": {
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "ai_settings": {
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "display_settings": {
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "active_theme_id": {
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Settings updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UserSetting"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Settings"
                ],
                "summary": "Delete settings for device",
                "operationId": "755ac1745a18677d9d7e2e17ee883650",
                "parameters": [
                    {
                        "name": "deviceId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Settings deleted"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/settings/sync": {
            "post": {
                "tags": [
                    "Settings"
                ],
                "summary": "Sync settings",
                "operationId": "ed95dd31cb9244f7b3f5e1dea56c3844",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "device_id",
                                    "settings"
                                ],
                                "properties": {
                                    "device_id": {
                                        "type": "string"
                                    },
                                    "platform": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "settings": {
                                        "properties": {
                                            "audio_settings": {
                                                "type": "object",
                                                "nullable": true
                                            },
                                            "ai_settings": {
                                                "type": "object",
                                                "nullable": true
                                            },
                                            "display_settings": {
                                                "type": "object",
                                                "nullable": true
                                            },
                                            "active_theme_id": {
                                                "type": "string",
                                                "nullable": true
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Settings synced",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UserSetting"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/shares": {
            "post": {
                "tags": [
                    "Shares"
                ],
                "summary": "Create a share",
                "operationId": "7c805637489eb53e1737ab1703c12536",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "shareable_type",
                                    "shareable_id"
                                ],
                                "properties": {
                                    "shareable_type": {
                                        "type": "string",
                                        "enum": [
                                            "song",
                                            "presentation",
                                            "theme",
                                            "media"
                                        ]
                                    },
                                    "shareable_id": {
                                        "type": "string"
                                    },
                                    "permission": {
                                        "type": "string",
                                        "default": "view",
                                        "enum": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "shared_with_user_id": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "shared_with_team_id": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "shared_with_organization_id": {
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Share created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Share"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/shares/received": {
            "get": {
                "tags": [
                    "Shares"
                ],
                "summary": "List received shares",
                "operationId": "069cfbdf902d13c0250233238f63b4f8",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Share"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/shares/sent": {
            "get": {
                "tags": [
                    "Shares"
                ],
                "summary": "List sent shares",
                "operationId": "1f6e9dcd3c0409cc47d754e252f9c894",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Share"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/shares/{share}": {
            "delete": {
                "tags": [
                    "Shares"
                ],
                "summary": "Delete share",
                "operationId": "eaa6a19cdc3937f16f6f89b0aff9ba58",
                "parameters": [
                    {
                        "name": "share",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Share deleted"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/songs/{song}/slides": {
            "get": {
                "tags": [
                    "Slides"
                ],
                "summary": "List slides for a song",
                "operationId": "26056ff43ec7feb68706b887c6ab8ae8",
                "parameters": [
                    {
                        "name": "song",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Slides retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Slide"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Slides"
                ],
                "summary": "Create a slide for a song",
                "operationId": "18889f2051bffe8c76425187322d2b5d",
                "parameters": [
                    {
                        "name": "song",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "lyrics"
                                ],
                                "properties": {
                                    "lyrics": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    },
                                    "media_id": {
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Slide created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Slide"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/slides/{id}": {
            "put": {
                "tags": [
                    "Slides"
                ],
                "summary": "Update a slide",
                "operationId": "94a344520fbd7859f953ea40507d9eb1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "lyrics": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    },
                                    "order": {
                                        "type": "integer"
                                    },
                                    "media_id": {
                                        "type": "string",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Slide updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Slide"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Slide not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Slides"
                ],
                "summary": "Delete a slide",
                "operationId": "353bbbbb165bcc2ad96c51a0757b3fed",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Slide deleted successfully"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Slide not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/songs/{song}/slides/reorder": {
            "post": {
                "tags": [
                    "Slides"
                ],
                "summary": "Reorder slides for a song",
                "operationId": "af7f1fef71587af8d217139b1c9e11f5",
                "parameters": [
                    {
                        "name": "song",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "slides"
                                ],
                                "properties": {
                                    "slides": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "id",
                                                "order"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "order": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Slides reordered successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Slide"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/songs": {
            "get": {
                "tags": [
                    "Songs"
                ],
                "summary": "List songs",
                "description": "Returns a paginated list of songs for the authenticated user.",
                "operationId": "0751edaebbf4754eea938a020909339d",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of songs per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of songs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Song"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Songs"
                ],
                "summary": "Create song",
                "description": "Creates a new song with optional slides.",
                "operationId": "b7ea7730fabf1fb0142ca570702358b3",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreSongRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Song created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Song"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/songs/{id}": {
            "get": {
                "tags": [
                    "Songs"
                ],
                "summary": "Get song",
                "description": "Returns a single song with its slides.",
                "operationId": "a0187b84f0a6790cef394acb64b8cd1a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Song ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Song retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Song"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Songs"
                ],
                "summary": "Update song",
                "description": "Updates an existing song.",
                "operationId": "1f659d9b2498c08a3fdd8947528f21cb",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Song ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateSongRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Song updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Song"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Songs"
                ],
                "summary": "Delete song",
                "description": "Deletes a song.",
                "operationId": "3c7f1dd92626ad1f86d40cef09534b20",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Song ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/songs/{song}/duplicate": {
            "post": {
                "tags": [
                    "Songs"
                ],
                "summary": "Duplicate song",
                "description": "Creates a copy of an existing song including its slides.",
                "operationId": "f71c2f0b541e1f3b9bf7b8bc4ae414e0",
                "parameters": [
                    {
                        "name": "song",
                        "in": "path",
                        "description": "Song ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Song duplicated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Song"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Song not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/songs/import": {
            "post": {
                "tags": [
                    "Songs"
                ],
                "summary": "Import song file",
                "description": "Imports a song from an uploaded file.",
                "operationId": "2fc76c1edaac1cfaed9a1d631ca17f64",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Song file to import",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Import started successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/subscription/me": {
            "get": {
                "tags": [
                    "Subscription"
                ],
                "summary": "Get current subscription entitlement",
                "description": "Returns the current organization subscription state and a signed entitlement JWT for the desktop app.",
                "operationId": "35b609e014c5ab378be4625fc6ebaed3",
                "parameters": [
                    {
                        "name": "X-Device-Token",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Entitlement data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/organizations/{organization}/teams": {
            "get": {
                "tags": [
                    "Teams"
                ],
                "summary": "List teams",
                "description": "Returns a list of teams for the specified organization, including team members.",
                "operationId": "b3da1af963e90c051bb2345a91545da0",
                "parameters": [
                    {
                        "name": "organization",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of teams",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Team"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Teams"
                ],
                "summary": "Create team",
                "description": "Creates a new team within the specified organization.",
                "operationId": "0cae306a312efbfaac9fc59618c43216",
                "parameters": [
                    {
                        "name": "organization",
                        "in": "path",
                        "description": "Organization ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "description": "Team name",
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Team created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Team"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/teams/{id}": {
            "get": {
                "tags": [
                    "Teams"
                ],
                "summary": "Get team",
                "description": "Returns a single team with its members.",
                "operationId": "300c5d3e7f3aff536ac2a155c3c3767a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Team ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Team retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Team"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Teams"
                ],
                "summary": "Update team",
                "description": "Updates an existing team.",
                "operationId": "688a2326d23dfd794b1af94af0da9f4d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Team ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "description": "Team name",
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Team updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Team"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Teams"
                ],
                "summary": "Delete team",
                "description": "Deletes a team.",
                "operationId": "a128642a434402d560645f00156e9ba1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Team ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Team deleted successfully"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/teams/{team}/members": {
            "post": {
                "tags": [
                    "Teams"
                ],
                "summary": "Add member to team",
                "description": "Adds a user as a member to the specified team.",
                "operationId": "00309e99ae5b7aa90a51568fc5fae69e",
                "parameters": [
                    {
                        "name": "team",
                        "in": "path",
                        "description": "Team ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "user_id"
                                ],
                                "properties": {
                                    "user_id": {
                                        "description": "User ID to add",
                                        "type": "string"
                                    },
                                    "role": {
                                        "description": "Role for the member",
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Member added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Team"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/teams/{team}/members/{user}": {
            "delete": {
                "tags": [
                    "Teams"
                ],
                "summary": "Remove member from team",
                "description": "Removes a user from the specified team.",
                "operationId": "ea393bf6b43f2df603c492037ea06de9",
                "parameters": [
                    {
                        "name": "team",
                        "in": "path",
                        "description": "Team ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user",
                        "in": "path",
                        "description": "User ID to remove",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Member removed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Team"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Team or user not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/themes": {
            "get": {
                "tags": [
                    "Themes"
                ],
                "summary": "List user themes",
                "operationId": "a7d5998a8a53a77af546b684d2af80f5",
                "responses": {
                    "200": {
                        "description": "Theme list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Theme"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Themes"
                ],
                "summary": "Create theme",
                "operationId": "ac49e7c224b902ab3fd4b15acb0e9b1c",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreThemeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Theme created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Theme"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/themes/{id}": {
            "get": {
                "tags": [
                    "Themes"
                ],
                "summary": "Get theme",
                "operationId": "622ff96d0fd50302c4280bf45ac7565d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Theme retrieved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Theme"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Themes"
                ],
                "summary": "Update theme",
                "operationId": "e8982865594ef9c58e822741ada51a4c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateThemeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Theme updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Theme"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Themes"
                ],
                "summary": "Delete theme",
                "operationId": "6c10509e0834c835be800bcdfc5b01e5",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Theme deleted"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/themes/{id}/duplicate": {
            "post": {
                "tags": [
                    "Themes"
                ],
                "summary": "Duplicate theme",
                "operationId": "8f94dc55c3bdfd51958636a427dfc25c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Theme duplicated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Theme"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/user": {
            "get": {
                "tags": [
                    "Users"
                ],
                "summary": "Get current user profile",
                "description": "Returns the authenticated user's profile data.",
                "operationId": "b8843f64167688c8a3a864181066241f",
                "responses": {
                    "200": {
                        "description": "User profile retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/User"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Users"
                ],
                "summary": "Update user profile",
                "description": "Updates the authenticated user's profile information.",
                "operationId": "a0c92ee77477eed285172d751f4128a1",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateUserRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "User profile updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/User"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/user/avatar": {
            "post": {
                "tags": [
                    "Users"
                ],
                "summary": "Upload avatar image",
                "description": "Uploads a new avatar image for the authenticated user. Accepts multipart/form-data with an image file (max 5MB).",
                "operationId": "083970793bc0284464d5490601b0d6c8",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "avatar"
                                ],
                                "properties": {
                                    "avatar": {
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Avatar uploaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/User"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/libraries": {
            "get": {
                "tags": [
                    "Libraries"
                ],
                "summary": "List user libraries",
                "operationId": "c31ee9b5555c15c9afc116df728fea5b",
                "responses": {
                    "200": {
                        "description": "Libraries retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/UserLibrary"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Libraries"
                ],
                "summary": "Create library",
                "operationId": "37d09c609e4f91a11f32c16932729986",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "My Library"
                                    },
                                    "type": {
                                        "type": "string",
                                        "default": "custom",
                                        "example": "custom"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Library created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/UserLibrary"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/libraries/{id}": {
            "get": {
                "tags": [
                    "Libraries"
                ],
                "summary": "Get library with contents",
                "operationId": "5067bd8c134042a12b2ec3b2c6ce2bd4",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Library retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/UserLibrary"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Libraries"
                ],
                "summary": "Update library",
                "operationId": "363a2875f507636e0fcbab4b4d398f8c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255,
                                        "example": "My Library"
                                    },
                                    "type": {
                                        "type": "string",
                                        "example": "custom"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Library updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SuccessResponse"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/UserLibrary"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Libraries"
                ],
                "summary": "Delete library",
                "operationId": "53fa52e48299bc489efc68f600f7b0a9",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Library deleted"
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "SuccessResponse": {
                "required": [
                    "success",
                    "message"
                ],
                "properties": {
                    "success": {
                        "description": "Base API controller with OpenAPI schemas.\n\nAll reusable OA\\Schema definitions are declared as class-level attributes here,\nfollowing the waystream.io convention of centralizing schemas in the base controller.",
                        "type": "boolean",
                        "example": true
                    },
                    "message": {
                        "type": "string",
                        "example": "Success"
                    },
                    "data": {
                        "description": "Response payload"
                    }
                },
                "type": "object"
            },
            "ErrorResponse": {
                "required": [
                    "success",
                    "message"
                ],
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": false
                    },
                    "message": {
                        "type": "string",
                        "example": "Error"
                    },
                    "errors": {
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "User": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "uuid": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "username": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "role": {
                        "type": "string"
                    },
                    "avatar_url": {
                        "type": "string",
                        "nullable": true
                    },
                    "profile": {
                        "type": "object",
                        "nullable": true
                    },
                    "subscription": {
                        "type": "object",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Song": {
                "required": [
                    "id",
                    "title"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "title": {
                        "type": "string"
                    },
                    "artist": {
                        "type": "string",
                        "nullable": true
                    },
                    "category": {
                        "type": "string",
                        "nullable": true
                    },
                    "aliases": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "ccli_number": {
                        "type": "string",
                        "nullable": true
                    },
                    "metadata": {
                        "type": "object",
                        "nullable": true
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "slides": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Slide"
                        }
                    }
                },
                "type": "object"
            },
            "Slide": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "song_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "order": {
                        "type": "integer"
                    },
                    "lyrics": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "nullable": true
                    },
                    "media_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Presentation": {
                "required": [
                    "id",
                    "title"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "title": {
                        "type": "string"
                    },
                    "category": {
                        "type": "string",
                        "nullable": true
                    },
                    "settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "slides": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PresentationSlide"
                        }
                    }
                },
                "type": "object"
            },
            "PresentationSlide": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "presentation_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "order": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string",
                        "nullable": true
                    },
                    "type": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_content": {
                        "type": "string",
                        "nullable": true
                    },
                    "media_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "duration": {
                        "type": "integer",
                        "nullable": true
                    },
                    "transition": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Theme": {
                "required": [
                    "id",
                    "name"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "name": {
                        "type": "string"
                    },
                    "background": {
                        "type": "string",
                        "nullable": true
                    },
                    "font_family": {
                        "type": "string",
                        "nullable": true
                    },
                    "font_size": {
                        "type": "integer",
                        "nullable": true
                    },
                    "font_weight": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_color": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_shadow": {
                        "type": "string",
                        "nullable": true
                    },
                    "reference_font_size": {
                        "type": "integer",
                        "nullable": true
                    },
                    "reference_color": {
                        "type": "string",
                        "nullable": true
                    },
                    "reference_position": {
                        "type": "string",
                        "nullable": true
                    },
                    "scripture_style": {
                        "type": "object",
                        "nullable": true
                    },
                    "song_style": {
                        "type": "object",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Media": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "image",
                            "video",
                            "audio",
                            "document"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "path": {
                        "type": "string"
                    },
                    "thumbnail_path": {
                        "type": "string",
                        "nullable": true
                    },
                    "mime_type": {
                        "type": "string"
                    },
                    "size": {
                        "type": "integer"
                    },
                    "dimensions": {
                        "type": "object",
                        "nullable": true
                    },
                    "url": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Organization": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "owner_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Team": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "Share": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "shareable_type": {
                        "type": "string",
                        "enum": [
                            "song",
                            "presentation",
                            "theme",
                            "media"
                        ]
                    },
                    "shareable_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "shared_with_user_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "shared_with_team_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "shared_with_organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "permission": {
                        "type": "string",
                        "enum": [
                            "view",
                            "edit"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "UserLibrary": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "CustomContent": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "library_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "title": {
                        "type": "string"
                    },
                    "content": {
                        "type": "string",
                        "nullable": true
                    },
                    "content_type": {
                        "type": "string"
                    },
                    "slides": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        },
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "UserSetting": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "device_id": {
                        "type": "string"
                    },
                    "platform": {
                        "type": "string",
                        "nullable": true
                    },
                    "audio_settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "ai_settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "display_settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "active_theme_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "AiLearningData": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string"
                    },
                    "original_text": {
                        "type": "string"
                    },
                    "detected_content": {
                        "type": "string",
                        "nullable": true
                    },
                    "feedback": {
                        "type": "string",
                        "nullable": true
                    },
                    "confidence": {
                        "type": "number",
                        "format": "float"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "DetectionLog": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "transcript": {
                        "type": "string"
                    },
                    "detected_type": {
                        "type": "string",
                        "nullable": true
                    },
                    "content_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "confidence": {
                        "type": "number",
                        "format": "float"
                    },
                    "action_taken": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "BibleTranslation": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "abbreviation": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "language": {
                        "type": "string"
                    },
                    "is_default": {
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "BibleVerse": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "translation_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "book_id": {
                        "type": "integer"
                    },
                    "book_name": {
                        "type": "string"
                    },
                    "chapter": {
                        "type": "integer"
                    },
                    "verse": {
                        "type": "integer"
                    },
                    "text": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "StoreSongRequest": {
                "required": [
                    "title"
                ],
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "artist": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                    },
                    "category": {
                        "type": "string",
                        "maxLength": 100,
                        "nullable": true
                    },
                    "aliases": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "ccli_number": {
                        "type": "string",
                        "maxLength": 50,
                        "nullable": true
                    },
                    "metadata": {
                        "type": "object",
                        "nullable": true
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "slides": {
                        "type": "array",
                        "items": {
                            "required": [
                                "lyrics"
                            ],
                            "properties": {
                                "lyrics": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    }
                },
                "type": "object"
            },
            "UpdateSongRequest": {
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "artist": {
                        "type": "string",
                        "maxLength": 255,
                        "nullable": true
                    },
                    "category": {
                        "type": "string",
                        "maxLength": 100,
                        "nullable": true
                    },
                    "aliases": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "nullable": true
                    },
                    "ccli_number": {
                        "type": "string",
                        "maxLength": 50,
                        "nullable": true
                    },
                    "metadata": {
                        "type": "object",
                        "nullable": true
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "StorePresentationRequest": {
                "required": [
                    "title"
                ],
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "category": {
                        "type": "string",
                        "maxLength": 100,
                        "nullable": true
                    },
                    "settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "slides": {
                        "type": "array",
                        "items": {
                            "properties": {
                                "title": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "text_content": {
                                    "type": "string"
                                },
                                "media_id": {
                                    "type": "string",
                                    "format": "uuid",
                                    "nullable": true
                                },
                                "duration": {
                                    "type": "integer",
                                    "nullable": true
                                },
                                "transition": {
                                    "type": "string",
                                    "nullable": true
                                }
                            },
                            "type": "object"
                        }
                    }
                },
                "type": "object"
            },
            "UpdatePresentationRequest": {
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "category": {
                        "type": "string",
                        "maxLength": 100,
                        "nullable": true
                    },
                    "settings": {
                        "type": "object",
                        "nullable": true
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "StoreThemeRequest": {
                "required": [
                    "name"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "background": {
                        "type": "string",
                        "nullable": true
                    },
                    "font_family": {
                        "type": "string",
                        "nullable": true
                    },
                    "font_size": {
                        "type": "integer",
                        "nullable": true
                    },
                    "font_weight": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_color": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_shadow": {
                        "type": "string",
                        "nullable": true
                    },
                    "reference_font_size": {
                        "type": "integer",
                        "nullable": true
                    },
                    "reference_color": {
                        "type": "string",
                        "nullable": true
                    },
                    "reference_position": {
                        "type": "string",
                        "nullable": true
                    },
                    "scripture_style": {
                        "type": "object",
                        "nullable": true
                    },
                    "song_style": {
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "UpdateThemeRequest": {
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "background": {
                        "type": "string",
                        "nullable": true
                    },
                    "font_family": {
                        "type": "string",
                        "nullable": true
                    },
                    "font_size": {
                        "type": "integer",
                        "nullable": true
                    },
                    "font_weight": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_color": {
                        "type": "string",
                        "nullable": true
                    },
                    "text_shadow": {
                        "type": "string",
                        "nullable": true
                    },
                    "reference_font_size": {
                        "type": "integer",
                        "nullable": true
                    },
                    "reference_color": {
                        "type": "string",
                        "nullable": true
                    },
                    "reference_position": {
                        "type": "string",
                        "nullable": true
                    },
                    "scripture_style": {
                        "type": "object",
                        "nullable": true
                    },
                    "song_style": {
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "StoreOrganizationRequest": {
                "required": [
                    "name"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "settings": {
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "UpdateOrganizationRequest": {
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "settings": {
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "UpdateUserRequest": {
                "properties": {
                    "username": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "profile": {
                        "type": "object",
                        "nullable": true
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "description": "Use the access_token from POST /auth/sso response",
                "bearerFormat": "Sanctum Token",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "Auth",
            "description": "SSO authentication and token management"
        },
        {
            "name": "Users",
            "description": "User profile management"
        },
        {
            "name": "Organizations",
            "description": "Organization CRUD and member management"
        },
        {
            "name": "Teams",
            "description": "Team CRUD and member management"
        },
        {
            "name": "Songs",
            "description": "Song CRUD, duplicate, and import"
        },
        {
            "name": "Slides",
            "description": "Song slide CRUD and reorder"
        },
        {
            "name": "Presentations",
            "description": "Presentation CRUD and duplicate"
        },
        {
            "name": "PresentationSlides",
            "description": "Presentation slide CRUD and reorder"
        },
        {
            "name": "Themes",
            "description": "Theme CRUD and duplicate"
        },
        {
            "name": "Media",
            "description": "Media file upload, list, and delete"
        },
        {
            "name": "Bible",
            "description": "Bible translations, books, verses, and search (public)"
        },
        {
            "name": "Libraries",
            "description": "User library management"
        },
        {
            "name": "CustomContent",
            "description": "Custom content within libraries"
        },
        {
            "name": "Search",
            "description": "Full-text search across content types"
        },
        {
            "name": "Shares",
            "description": "Content sharing"
        },
        {
            "name": "Settings",
            "description": "Per-device user settings and sync"
        },
        {
            "name": "AI",
            "description": "AI learning data and detection logs"
        },
        {
            "name": "Subscription",
            "description": "Subscription entitlement and status"
        },
        {
            "name": "Billing",
            "description": "Checkout, billing portal, auto-renew, cancel"
        },
        {
            "name": "Devices",
            "description": "Device registration and management (5 per org)"
        },
        {
            "name": "AppUsageSessions",
            "description": "App usage session lifecycle (start, heartbeat, end)"
        },
        {
            "name": "Admin Analytics",
            "description": "Admin-only aggregated analytics: signups, downloads, app sessions"
        },
        {
            "name": "Analytics",
            "description": "Analytics"
        },
        {
            "name": "Admin",
            "description": "Admin"
        },
        {
            "name": "AppConfig",
            "description": "AppConfig"
        },
        {
            "name": "Downloads",
            "description": "Downloads"
        },
        {
            "name": "Feature Requests",
            "description": "Feature Requests"
        }
    ]
}