{
    "openapi": "3.0.0",
    "info": {
        "title": "SCORM Dispatch API v2 Documentation",
        "description": "Welcome to the SCORM Dispatch API v2 reference documentation. Browse endpoints, explore parameters, and test API requests directly in your browser.\n\n### Authentication (Bearer Token)\nTo access the API, you must authenticate using your **API Secret Key** as a Bearer Token in the HTTP Authorization header:\n```http\nAuthorization: Bearer <your_api_token>\n```\n\n#### How to obtain your API Key:\n1. Log in to your SCORM Dispatch dashboard.\n2. Navigate to the **Developers** page in the left sidebar.\n3. Copy your API Token and keep it securely.\n\n<p align=\"center\">\n  <img src=\"/assets/images/api_key.png\" alt=\"How to get API Key\" style=\"max-width: 100%; border-radius: 8px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); margin-top: 12px;\" />\n</p>",
        "contact": {
            "email": "support@aptitec.co.uk"
        },
        "version": "2.0.0"
    },
    "paths": {
        "/api/v2": {
            "servers": [
                {
                    "url": "https://app.scormdispatch.co.uk",
                    "description": "SCORM Dispatch API Server"
                }
            ]
        },
        "/api/v2/bundles": {
            "get": {
                "tags": [
                    "Bundles"
                ],
                "summary": "List all bundles",
                "description": "Retrieve a paginated or unpaginated list of course bundles belonging to the authenticated company.",
                "operationId": "856a479da29a5ecc5c854c93828ddd39",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by bundle title",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundles retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "example": "Induction Course Bundle"
                                                    },
                                                    "bundle_theme_id": {
                                                        "type": "integer",
                                                        "example": 2,
                                                        "nullable": true
                                                    },
                                                    "theme": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 2
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Modern Dark"
                                                            }
                                                        },
                                                        "type": "object",
                                                        "nullable": true
                                                    },
                                                    "language_selector_title": {
                                                        "type": "string",
                                                        "example": "Choose Your Language",
                                                        "nullable": true
                                                    },
                                                    "language_selector_body": {
                                                        "type": "string",
                                                        "example": "Select your preferred language",
                                                        "nullable": true
                                                    },
                                                    "titles_by_language": {
                                                        "type": "object",
                                                        "nullable": true
                                                    },
                                                    "total_courses": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "total_certificates": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2026-10-12T10:00:00.000000Z"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2026-10-12T11:00:00.000000Z"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "total": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "example": false
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Create a course bundle",
                "description": "Create a new course bundle with comprehensive configurations including courses, certificates, sequential ordering, section groups, prerequisites (completion/score), custom themes, and multilingual titles.\n\n### Item Configuration Guide:\n- **`items`**: Ordered list of courses and certificates in the bundle.\n  - `type`: `'course'` or `'certificate'`.\n  - `id`: Course ID or Certificate Template ID.\n  - `sort`: Sequence order (1, 2, 3...).\n  - `group_id` / `group_title`: Assign items into visual sections/folders (e.g. `'group_1'`, `'Module 1: Induction'`).\n  - `optional`: (boolean) Whether completing this course is optional for bundle completion.\n  - `include_average`: (boolean) Include course score in overall score calculation.\n  - `show_nav_prompt`: (boolean) Show navigation prompt upon completion.\n  - `expiry_duration` & `expiry_unit`: Retest/recertification period (`'days'`, `'months'`, `'years'`).\n  - `prerequisites`: Array of prerequisite courses:\n    - `required_course`: Prerequisite Course ID.\n    - `criteria`: `'completion'` or minimum percentage score (e.g. `80`).\n  - `min_average_score`: (For certificates) Minimum overall average score required to unlock the certificate.\n\n*Alternatively, raw structured JSON maps `courses_data` and `certificates_data` can be supplied directly.*",
                "operationId": "11c93397447e2865e9262ace4e5326f7",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Corporate Safety & Compliance Certification Program",
                                        "maxLength": 255
                                    },
                                    "bundle_theme_id": {
                                        "type": "integer",
                                        "example": 1,
                                        "nullable": true
                                    },
                                    "language_selector_title": {
                                        "type": "string",
                                        "example": "Choose Your Training Language",
                                        "nullable": true
                                    },
                                    "language_selector_body": {
                                        "type": "string",
                                        "example": "Please select your preferred language before launching the courses in this curriculum.",
                                        "nullable": true
                                    },
                                    "titles_by_language": {
                                        "type": "object",
                                        "example": {
                                            "French": "Programme de conformité et de sécurité",
                                            "Spanish": "Programa de seguridad y cumplimiento normativo"
                                        }
                                    },
                                    "items": {
                                        "description": "Ordered array containing both courses and certificates, including prerequisites, sections, and scoring",
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "example": "course",
                                                    "enum": [
                                                        "course",
                                                        "certificate"
                                                    ]
                                                },
                                                "id": {
                                                    "type": "integer",
                                                    "example": 48
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Module 1: General Workplace Safety",
                                                    "nullable": true
                                                },
                                                "sort": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "group_id": {
                                                    "type": "string",
                                                    "example": "group_onboarding",
                                                    "nullable": true
                                                },
                                                "group_title": {
                                                    "type": "string",
                                                    "example": "Part 1: Onboarding & Safety Basics",
                                                    "nullable": true
                                                },
                                                "optional": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "include_average": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "show_nav_prompt": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "expiry_duration": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "nullable": true
                                                },
                                                "expiry_unit": {
                                                    "type": "string",
                                                    "example": "years",
                                                    "enum": [
                                                        "days",
                                                        "months",
                                                        "years"
                                                    ]
                                                },
                                                "titles_by_language": {
                                                    "type": "object",
                                                    "example": {
                                                        "French": "Module 1 : Sécurité générale",
                                                        "Spanish": "Módulo 1: Seguridad general"
                                                    },
                                                    "nullable": true
                                                },
                                                "prerequisites": {
                                                    "description": "List of prerequisite courses required to unlock this item",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "required_course": {
                                                                "type": "integer",
                                                                "example": 48
                                                            },
                                                            "criteria": {
                                                                "description": "'completion' or passing score percentage like '80'",
                                                                "type": "string",
                                                                "example": "completion"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "min_average_score": {
                                                    "description": "Required overall bundle average score (certificates)",
                                                    "type": "integer",
                                                    "example": 80,
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "courses_data": {
                                        "description": "Direct structured course configurations map (alternative to items)",
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "certificates_data": {
                                        "description": "Direct structured certificate configurations map (alternative to items)",
                                        "type": "object",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "title": "Corporate Safety & Compliance Certification Program",
                                "bundle_theme_id": 1,
                                "language_selector_title": "Choose Your Training Language",
                                "language_selector_body": "Please select your preferred language before launching the courses in this curriculum.",
                                "titles_by_language": {
                                    "French": "Programme de conformité et de sécurité",
                                    "Spanish": "Programa de seguridad y cumplimiento normativo"
                                },
                                "items": [
                                    {
                                        "type": "course",
                                        "id": 48,
                                        "title": "Module 1: General Workplace Safety",
                                        "sort": 1,
                                        "group_id": "group_onboarding",
                                        "group_title": "Part 1: Onboarding & Safety Basics",
                                        "optional": false,
                                        "include_average": true,
                                        "show_nav_prompt": true,
                                        "expiry_duration": 1,
                                        "expiry_unit": "years",
                                        "titles_by_language": {
                                            "French": "Module 1 : Sécurité générale au travail",
                                            "Spanish": "Módulo 1: Seguridad general en el trabajo"
                                        },
                                        "prerequisites": []
                                    },
                                    {
                                        "type": "course",
                                        "id": 72,
                                        "title": "Module 2: Hazard Identification & Fire Prevention",
                                        "sort": 2,
                                        "group_id": "group_onboarding",
                                        "group_title": "Part 1: Onboarding & Safety Basics",
                                        "optional": false,
                                        "include_average": true,
                                        "show_nav_prompt": true,
                                        "prerequisites": [
                                            {
                                                "required_course": 48,
                                                "criteria": "completion"
                                            }
                                        ]
                                    },
                                    {
                                        "type": "course",
                                        "id": 1,
                                        "title": "Module 3: Advanced Emergency Protocols",
                                        "sort": 3,
                                        "group_id": "group_advanced",
                                        "group_title": "Part 2: Advanced Protocols & Assessment",
                                        "optional": false,
                                        "include_average": true,
                                        "show_nav_prompt": true,
                                        "prerequisites": [
                                            {
                                                "required_course": 72,
                                                "criteria": "80"
                                            }
                                        ]
                                    },
                                    {
                                        "type": "certificate",
                                        "id": 1,
                                        "title": "Official Certificate of Health & Safety Compliance",
                                        "sort": 4,
                                        "min_average_score": 80,
                                        "prerequisites": [
                                            {
                                                "required_course": 1,
                                                "criteria": "80"
                                            }
                                        ]
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Bundle created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Health & Safety Induction Bundle"
                                                },
                                                "bundle_theme_id": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "nullable": true
                                                },
                                                "total_courses": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "total_certificates": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "courses_data": {
                                                    "type": "object"
                                                },
                                                "certificates_data": {
                                                    "type": "object"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request or validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/bundles/{id}": {
            "get": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Get bundle details",
                "description": "Retrieve comprehensive bundle data including course configurations, sequence ordering, prerequisites, certificate templates, and theme settings.",
                "operationId": "d45ae6b33df3b8e76afbb5ed84c3c289",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Bundle ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundle details retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Induction Course Bundle"
                                                },
                                                "bundle_theme_id": {
                                                    "type": "integer",
                                                    "example": 2,
                                                    "nullable": true
                                                },
                                                "theme": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Modern Dark"
                                                        }
                                                    },
                                                    "type": "object",
                                                    "nullable": true
                                                },
                                                "language_selector_title": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "language_selector_body": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "titles_by_language": {
                                                    "type": "object",
                                                    "nullable": true
                                                },
                                                "total_courses": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "total_certificates": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "courses_data": {
                                                    "type": "object"
                                                },
                                                "certificates_data": {
                                                    "type": "object"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Update course bundle",
                "description": "Update bundle configurations, ordering, prerequisites, groups, and attached certificates.",
                "operationId": "b93cebdadc4d5d1ada6b26e31c3f5610",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Bundle ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Updated Bundle Title",
                                        "maxLength": 255
                                    },
                                    "bundle_theme_id": {
                                        "type": "integer",
                                        "example": 1,
                                        "nullable": true
                                    },
                                    "language_selector_title": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "language_selector_body": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "titles_by_language": {
                                        "type": "object"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "enum": [
                                                        "course",
                                                        "certificate"
                                                    ]
                                                },
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "sort": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "courses_data": {
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "certificates_data": {
                                        "type": "object",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Bundle updated successfully"
                    },
                    "400": {
                        "description": "Invalid request or validation error"
                    },
                    "404": {
                        "description": "Bundle not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Delete course bundle",
                "description": "Soft delete an existing course bundle and remove certificate associations.",
                "operationId": "b09837c6d65c3ff447c8b87fdbddec02",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Bundle ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundle deleted successfully"
                    },
                    "404": {
                        "description": "Bundle not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/bundle-themes": {
            "get": {
                "tags": [
                    "Bundle Themes"
                ],
                "summary": "List all bundle themes",
                "description": "Retrieve a paginated or unpaginated list of bundle themes belonging to the authenticated company.",
                "operationId": "7447fe5f3600dcf082b8fbdb7c260946",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by theme name",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundle themes retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "Corporate Theme"
                                                    },
                                                    "assigned_bundles_count": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "settings": {
                                                        "type": "object"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "total": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "example": false
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Bundle Themes"
                ],
                "summary": "Create a bundle theme",
                "description": "Create a new custom theme configuration for course bundles.\n\n### Available Fonts (`fontFamily`):\n- `'Inter', sans-serif` (Default)\n- `'Roboto', sans-serif`\n- `'Open Sans', sans-serif`\n- `'Lato', sans-serif`\n- `'Montserrat', sans-serif`\n- `'Poppins', sans-serif`\n- `'Raleway', sans-serif`\n- `'Ubuntu', sans-serif`\n- `'Nunito', sans-serif`\n- `'PT Sans', sans-serif`\n\n### Theme Settings Structure:\n- **Typography & Layout**: `fontFamily`, `fontSize` (px, 10-32), `fontColor` (hex), `sidebarBg` (hex), `forceSidebarOpen` ('yes'|'no'), and `borderRadius` (`topLeft`, `topRight`, `bottomLeft`, `bottomRight`).\n- **Completed Course (`completed`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n- **In Progress Course (`incompleted`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n- **Locked Course (`locked`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n- **View Results Button (`results`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n\n*If `settings` is omitted or empty, the standard default theme settings will automatically be applied.*",
                "operationId": "15ef558efd383e165e07f560efabe969",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Modern Dark Theme",
                                        "maxLength": 255
                                    },
                                    "settings": {
                                        "description": "Theme styling and colour settings. Defaults to standard theme configuration if omitted.",
                                        "properties": {
                                            "fontFamily": {
                                                "description": "Font family chosen from available fonts list",
                                                "type": "string",
                                                "example": "'Inter', sans-serif",
                                                "enum": [
                                                    "'Inter', sans-serif",
                                                    "'Roboto', sans-serif",
                                                    "'Open Sans', sans-serif",
                                                    "'Lato', sans-serif",
                                                    "'Montserrat', sans-serif",
                                                    "'Poppins', sans-serif",
                                                    "'Raleway', sans-serif",
                                                    "'Ubuntu', sans-serif",
                                                    "'Nunito', sans-serif",
                                                    "'PT Sans', sans-serif"
                                                ]
                                            },
                                            "fontColor": {
                                                "type": "string",
                                                "example": "#000000"
                                            },
                                            "fontSize": {
                                                "type": "string",
                                                "example": "16"
                                            },
                                            "sidebarBg": {
                                                "type": "string",
                                                "example": "#f8f9fa"
                                            },
                                            "forceSidebarOpen": {
                                                "type": "string",
                                                "example": "no",
                                                "enum": [
                                                    "yes",
                                                    "no"
                                                ]
                                            },
                                            "borderRadius": {
                                                "properties": {
                                                    "topLeft": {
                                                        "type": "string",
                                                        "example": "6"
                                                    },
                                                    "topRight": {
                                                        "type": "string",
                                                        "example": "6"
                                                    },
                                                    "bottomLeft": {
                                                        "type": "string",
                                                        "example": "6"
                                                    },
                                                    "bottomRight": {
                                                        "type": "string",
                                                        "example": "6"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "completed": {
                                                "description": "Completed Course styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#f0fdf4"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#14532d"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#6cde81"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "This course is completed"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "incompleted": {
                                                "description": "In Progress Course styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#eff6ff"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#1e3a8a"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#5d7fe2"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "This course is in progress"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "locked": {
                                                "description": "Locked Course styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#f5f6f7"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#a7a7a7"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#a7a7a7"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "This course is locked. Complete prerequisite courses to unlock."
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "results": {
                                                "description": "View Results Button styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#eff6ff"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#5d7fe2"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#5d7fe2"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "View your course results"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Bundle theme created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Modern Dark Theme"
                                                },
                                                "assigned_bundles_count": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "settings": {
                                                    "type": "object"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request or validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/bundle-themes/{id}": {
            "get": {
                "tags": [
                    "Bundle Themes"
                ],
                "summary": "Get bundle theme details",
                "description": "Retrieve detailed settings and information of a bundle theme by ID.",
                "operationId": "e2a318d6917f07f2c4dd138fc8f8d812",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Bundle Theme ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundle theme retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Modern Dark Theme"
                                                },
                                                "assigned_bundles_count": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "settings": {
                                                    "type": "object"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle theme not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Bundle Themes"
                ],
                "summary": "Update bundle theme",
                "description": "Update the name or configuration settings of an existing bundle theme.\n\n### Available Fonts (`fontFamily`):\n- `'Inter', sans-serif`\n- `'Roboto', sans-serif`\n- `'Open Sans', sans-serif`\n- `'Lato', sans-serif`\n- `'Montserrat', sans-serif`\n- `'Poppins', sans-serif`\n- `'Raleway', sans-serif`\n- `'Ubuntu', sans-serif`\n- `'Nunito', sans-serif`\n- `'PT Sans', sans-serif`\n\n### Theme Settings Structure:\n- **Typography & Layout**: `fontFamily`, `fontSize` (px, 10-32), `fontColor` (hex), `sidebarBg` (hex), `forceSidebarOpen` ('yes'|'no'), and `borderRadius` (`topLeft`, `topRight`, `bottomLeft`, `bottomRight`).\n- **Completed Course (`completed`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n- **In Progress Course (`incompleted`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n- **Locked Course (`locked`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`\n- **View Results Button (`results`)**: `bgColor`, `textColor`, `borderColor`, `tooltip`",
                "operationId": "fd8d2093e87e124733dc15eb49145877",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Bundle Theme ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Updated Theme Name",
                                        "maxLength": 255
                                    },
                                    "settings": {
                                        "description": "Theme styling and colour settings",
                                        "properties": {
                                            "fontFamily": {
                                                "description": "Font family chosen from available fonts list",
                                                "type": "string",
                                                "example": "'Inter', sans-serif",
                                                "enum": [
                                                    "'Inter', sans-serif",
                                                    "'Roboto', sans-serif",
                                                    "'Open Sans', sans-serif",
                                                    "'Lato', sans-serif",
                                                    "'Montserrat', sans-serif",
                                                    "'Poppins', sans-serif",
                                                    "'Raleway', sans-serif",
                                                    "'Ubuntu', sans-serif",
                                                    "'Nunito', sans-serif",
                                                    "'PT Sans', sans-serif"
                                                ]
                                            },
                                            "fontColor": {
                                                "type": "string",
                                                "example": "#000000"
                                            },
                                            "fontSize": {
                                                "type": "string",
                                                "example": "16"
                                            },
                                            "sidebarBg": {
                                                "type": "string",
                                                "example": "#f8f9fa"
                                            },
                                            "forceSidebarOpen": {
                                                "type": "string",
                                                "example": "no",
                                                "enum": [
                                                    "yes",
                                                    "no"
                                                ]
                                            },
                                            "borderRadius": {
                                                "properties": {
                                                    "topLeft": {
                                                        "type": "string",
                                                        "example": "6"
                                                    },
                                                    "topRight": {
                                                        "type": "string",
                                                        "example": "6"
                                                    },
                                                    "bottomLeft": {
                                                        "type": "string",
                                                        "example": "6"
                                                    },
                                                    "bottomRight": {
                                                        "type": "string",
                                                        "example": "6"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "completed": {
                                                "description": "Completed Course styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#f0fdf4"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#14532d"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#6cde81"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "This course is completed"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "incompleted": {
                                                "description": "In Progress Course styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#eff6ff"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#1e3a8a"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#5d7fe2"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "This course is in progress"
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "locked": {
                                                "description": "Locked Course styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#f5f6f7"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#a7a7a7"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#a7a7a7"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "This course is locked. Complete prerequisite courses to unlock."
                                                    }
                                                },
                                                "type": "object"
                                            },
                                            "results": {
                                                "description": "View Results Button styling",
                                                "properties": {
                                                    "bgColor": {
                                                        "type": "string",
                                                        "example": "#eff6ff"
                                                    },
                                                    "textColor": {
                                                        "type": "string",
                                                        "example": "#5d7fe2"
                                                    },
                                                    "borderColor": {
                                                        "type": "string",
                                                        "example": "#5d7fe2"
                                                    },
                                                    "tooltip": {
                                                        "type": "string",
                                                        "example": "View your course results"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Bundle theme updated successfully"
                    },
                    "400": {
                        "description": "Invalid request or validation error"
                    },
                    "404": {
                        "description": "Bundle theme not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Bundle Themes"
                ],
                "summary": "Delete bundle theme",
                "description": "Delete an existing bundle theme belonging to the authenticated company.",
                "operationId": "5b1420086d534c71e25168ee4e083f6f",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Bundle Theme ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundle theme deleted successfully"
                    },
                    "404": {
                        "description": "Bundle theme not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/certificates": {
            "get": {
                "tags": [
                    "Certificates"
                ],
                "summary": "List all certificates",
                "description": "Retrieve a paginated or unpaginated list of certificate templates belonging to the authenticated company.",
                "operationId": "18286535456fca81ebe03b2703e569bb",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by certificate title",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Certificates retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "example": "Default Certificate of Completion"
                                                    },
                                                    "assigned_bundles_count": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "design": {
                                                        "type": "object",
                                                        "nullable": true
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2026-10-13T09:00:00.000000Z"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2026-10-13T09:30:00.000000Z"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "total": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "example": false
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Certificates"
                ],
                "summary": "Create a certificate template",
                "description": "Create a new certificate template. If design JSON is omitted or empty, the default certificate design template is automatically applied.",
                "operationId": "afa627a894a4387c561c80a401d1fb9e",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Default Certificate",
                                        "maxLength": 191
                                    },
                                    "design": {
                                        "description": "Certificate layout schema (JSON object or JSON string). Defaults to standard certificate template if left null.",
                                        "type": "object",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Certificate created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Default Certificate"
                                                },
                                                "assigned_bundles_count": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "design": {
                                                    "type": "object"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request or validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/certificates/{id}": {
            "get": {
                "tags": [
                    "Certificates"
                ],
                "summary": "Get certificate details",
                "description": "Retrieve detailed certificate template information, design layout, and a ready-to-use `embed_url` for iframe embedding.\n\n### Iframe Embedding:\nYou can embed the interactive visual certificate designer inside your application's dashboard using the returned `embed_url`:\n```html\n<iframe src=\"{embed_url}\" width=\"100%\" height=\"850px\" frameborder=\"0\" allowfullscreen></iframe>\n```\n\n**Features inside the embedded designer:**\n- Full visual drag-and-drop editor.\n- **Copy JSON Button**: copies the clean certificate design schema to the user's clipboard.\n- **Window postMessage**: sends a `CERTIFICATE_DESIGN_COPIED` or `CERTIFICATE_DESIGN_SAVED` event directly to the parent page whenever saved or copied.",
                "operationId": "77daa649fa07b11767025230754aa524",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Certificate ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Certificate retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Default Certificate"
                                                },
                                                "assigned_bundles_count": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "design": {
                                                    "type": "object"
                                                },
                                                "embed_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/certificates/1/embed?token=your_api_token"
                                                },
                                                "preview_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/verify/1"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Certificate not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Certificates"
                ],
                "summary": "Update certificate template",
                "description": "Update the title or design configuration of an existing certificate template.",
                "operationId": "a825194aac95eff87101090c99e5b50c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Certificate ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Updated Certificate Title",
                                        "maxLength": 191
                                    },
                                    "design": {
                                        "description": "Certificate layout schema (JSON object or JSON string)",
                                        "type": "object",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Certificate updated successfully"
                    },
                    "400": {
                        "description": "Invalid request or validation error"
                    },
                    "404": {
                        "description": "Certificate not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Certificates"
                ],
                "summary": "Delete certificate template",
                "description": "Delete an existing certificate template if authorized.",
                "operationId": "1cdc02cb16d816787dde66fe5939de69",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Certificate ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Certificate deleted successfully"
                    },
                    "404": {
                        "description": "Certificate not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/certificates/{id}/builder-url": {
            "get": {
                "tags": [
                    "Certificates"
                ],
                "summary": "Get embedded builder page and preview URL",
                "description": "Retrieve ready-to-use URLs for the visual drag-and-drop certificate designer (`builder_url`) and the public/learner verification preview (`preview_url`).\n\n### Iframe Embedding:\nEmbed the visual designer into an iframe:\n```html\n<iframe src=\"{builder_url}\" width=\"100%\" height=\"850px\" frameborder=\"0\" allowfullscreen></iframe>\n```",
                "operationId": "479db075c48a72b2485d8385ce70dc46",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Certificate ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Builder and preview URLs retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Default Certificate"
                                                },
                                                "builder_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/certificates/1/embed?token=bearer_token"
                                                },
                                                "embed_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/certificates/1/embed?token=bearer_token"
                                                },
                                                "preview_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/verify/1"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Certificate not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients": {
            "get": {
                "tags": [
                    "Clients"
                ],
                "summary": "List all clients",
                "description": "Retrieve a paginated or full list of clients, including their tags, licence configurations, quotas, and expiry dates.\n\n> **Additional Information - Duplicate Prevention (Idempotency):**\n> Before creating a new client, call `GET /api/v2/clients?search={name_or_identifier}` to verify whether the client already exists to prevent duplicate client creation.",
                "operationId": "1ee4a047a240a09e97f20ca20e1329da",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by client name",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag",
                        "in": "query",
                        "description": "Filter clients by specific tag name",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Clients retrieved successfully"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Clients"
                ],
                "summary": "Create a client",
                "description": "Create a new client with complete licence, access quota, domain restriction, expiry date, active status, and client tags.\n\n### Additional Information:\n- **Single Purchaser Restriction:** To allow a single purchaser to access the course repeatedly without letting other learners share the link, set `licence_type` to `'Limit by Dispatch'` (or `'Limit by Client'`).\n- **Lifetime Access (No Expiry Date):** By default, clients have no expiry date. Simply omit `expiry` or set `expiry='No'`.\n- **Domain Restrictions (`allowed_hosts`):** When delivering courses via direct external links directly to individual purchasers, **leave `allowed_hosts` empty**. Direct browser tabs may not send a domain `Referer` header and would otherwise be blocked with an 'Invalid Host' error.\n- **Client Tags (`tags`):** Categorise and organise clients by passing an array of tags (e.g. `[\"Corporate\", \"Enterprise\"]`) or a comma-separated string (`\"Corporate, Enterprise\"`).",
                "operationId": "ab50c2f876bc3f681c1bd86e40cc4393",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Acme Corporation Ltd",
                                        "maxLength": 191
                                    },
                                    "licence_type": {
                                        "description": "Licence type: 'Unlimited', 'Limit by Client', or 'Limit by Dispatch'",
                                        "type": "string",
                                        "example": "Limit by Client",
                                        "enum": [
                                            "Unlimited",
                                            "Limit by Client",
                                            "Limit by Dispatch"
                                        ]
                                    },
                                    "access_limit": {
                                        "description": "Quota for 'Limit by Client'. Set 0 if using Limit by Dispatch or Unlimited.",
                                        "type": "integer",
                                        "example": 100
                                    },
                                    "allowed_hosts": {
                                        "description": "Comma-separated domain list allowed to embed content. Leave blank to allow any host / direct links.",
                                        "type": "string",
                                        "example": "lms.acme.com, portal.acme.com"
                                    },
                                    "active": {
                                        "description": "Active status ('Yes' or 'No', defaults to 'Yes').",
                                        "type": "string",
                                        "example": "Yes",
                                        "enum": [
                                            "Yes",
                                            "No"
                                        ]
                                    },
                                    "expiry": {
                                        "description": "Whether an expiry date is enforced ('Yes' or 'No', default is 'No').",
                                        "type": "string",
                                        "example": "Yes",
                                        "enum": [
                                            "Yes",
                                            "No"
                                        ]
                                    },
                                    "expiry_date": {
                                        "description": "Expiry date in YYYY-MM-DD. Mandatory when expiry is 'Yes'.",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2027-12-31"
                                    },
                                    "tags": {
                                        "description": "Tags for categorising this client. Accepts an array of tag strings or a comma-separated string.",
                                        "example": [
                                            "Tier 1",
                                            "Healthcare",
                                            "Compliance"
                                        ],
                                        "oneOf": [
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            },
                                            {
                                                "type": "string"
                                            }
                                        ]
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Client created successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{id}": {
            "get": {
                "tags": [
                    "Clients"
                ],
                "summary": "Retrieve a client",
                "description": "Display the specified resource.",
                "operationId": "c5722dafec8d3928a0ab27b843393700",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Client details retrieved"
                    },
                    "404": {
                        "description": "Client not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Clients"
                ],
                "summary": "Update a client",
                "description": "Update client details including tags, quota limits, domain restrictions, and expiry dates.",
                "operationId": "c20a9ee0ad45841e1c2c89ba7d5b8f0a",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Acme Corporation Global",
                                        "maxLength": 191
                                    },
                                    "licence_type": {
                                        "type": "string",
                                        "example": "Limit by Client",
                                        "enum": [
                                            "Unlimited",
                                            "Limit by Client",
                                            "Limit by Dispatch"
                                        ]
                                    },
                                    "access_limit": {
                                        "type": "integer",
                                        "example": 150
                                    },
                                    "allowed_hosts": {
                                        "type": "string",
                                        "example": "portal.acme.com"
                                    },
                                    "active": {
                                        "type": "string",
                                        "example": "Yes",
                                        "enum": [
                                            "Yes",
                                            "No"
                                        ]
                                    },
                                    "expiry": {
                                        "type": "string",
                                        "example": "Yes",
                                        "enum": [
                                            "Yes",
                                            "No"
                                        ]
                                    },
                                    "expiry_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2028-06-30"
                                    },
                                    "tags": {
                                        "description": "Tags for categorising this client.",
                                        "example": [
                                            "Tier 1",
                                            "Global",
                                            "Enterprise"
                                        ],
                                        "oneOf": [
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            },
                                            {
                                                "type": "string"
                                            }
                                        ]
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Client updated successfully"
                    },
                    "404": {
                        "description": "Client not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Clients"
                ],
                "summary": "Delete a client",
                "description": "Remove the specified resource from storage.",
                "operationId": "cc02ad97bcb137790e4c82d1d1a98fe9",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Client deleted successfully"
                    },
                    "404": {
                        "description": "Client not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses": {
            "get": {
                "tags": [
                    "Courses"
                ],
                "summary": "List all courses",
                "description": "Display a listing of the resource.",
                "operationId": "89a0f737a3ed249a5fd98797aee22ffd",
                "parameters": [
                    {
                        "name": "folder_id",
                        "in": "query",
                        "description": "Filter by folder ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "content_type",
                        "in": "query",
                        "description": "Filter by content type ('package', 'video', 'lti_13')",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "package",
                                "video",
                                "lti_13"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by course title",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Courses retrieved successfully"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Courses"
                ],
                "summary": "Create SCORM Course",
                "description": "Creates a new SCORM course by providing a public URL to an uploaded SCORM .zip package, or attaches a new language package to an existing course.",
                "operationId": "ddc796bfba1ce94c070cf97a14cd3359",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "language"
                                ],
                                "properties": {
                                    "id": {
                                        "description": "Course ID (if adding another language package to an existing course)",
                                        "type": "integer",
                                        "example": null
                                    },
                                    "title": {
                                        "type": "string",
                                        "example": "Health & Safety Induction 2026"
                                    },
                                    "language": {
                                        "type": "string",
                                        "example": "English"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Comprehensive workplace health and safety SCORM module"
                                    },
                                    "folder_id": {
                                        "type": "integer",
                                        "example": null
                                    },
                                    "scorm_file_url": {
                                        "description": "Public URL of the uploaded SCORM package",
                                        "type": "string",
                                        "example": "https://scormdispatch.co.uk/external/courses/2026/01/01/sample.zip"
                                    },
                                    "changelog": {
                                        "type": "string",
                                        "example": "Initial upload"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Course stored and processed successfully"
                    },
                    "400": {
                        "description": "Invalid SCORM package / Unauthorized"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/upload": {
            "post": {
                "tags": [
                    "Courses"
                ],
                "summary": "Get Presigned S3/Spaces Upload URL",
                "description": "Uploads a SCORM ZIP package to generate a presigned S3 upload URL and public file URL for the package.",
                "operationId": "6f5db833b2a6020ad4919b86484db808",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "SCORM ZIP package file",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Presigned URL generated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "upload_url": {
                                            "description": "S3 pre-signed upload URL",
                                            "type": "string"
                                        },
                                        "file_url": {
                                            "description": "Public URL of the uploaded file",
                                            "type": "string"
                                        },
                                        "file_name": {
                                            "type": "string"
                                        },
                                        "key": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error / File too large"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/video": {
            "post": {
                "tags": [
                    "Courses"
                ],
                "summary": "Create Video Course",
                "description": "Creates an interactive video course from a YouTube, Vimeo, or direct MP4 URL and packages it automatically into a TinCan/xAPI-compliant SCORM wrapper.",
                "operationId": "1ec4bbfc58f3ea38e3af76239cf06106",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "video_url"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Emergency Evacuation Video Training"
                                    },
                                    "video_url": {
                                        "description": "YouTube/Vimeo link or direct video file URL",
                                        "type": "string",
                                        "example": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
                                    },
                                    "video_source": {
                                        "description": "Video provider ('youtube', 'vimeo', 'local'). Auto-detected if omitted.",
                                        "type": "string",
                                        "example": "youtube",
                                        "enum": [
                                            "youtube",
                                            "vimeo",
                                            "local"
                                        ]
                                    },
                                    "language": {
                                        "type": "string",
                                        "example": "English"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Comprehensive interactive video instruction"
                                    },
                                    "folder_id": {
                                        "type": "integer",
                                        "example": null
                                    },
                                    "video_poster_url": {
                                        "description": "Cover image / poster for video player",
                                        "type": "string",
                                        "example": "https://images.unsplash.com/photo-1516321318423-f06f85e504b3"
                                    },
                                    "completion_percentage": {
                                        "description": "Video watch percentage required to trigger completion (default: 80)",
                                        "type": "integer",
                                        "example": 80
                                    },
                                    "allow_seeking": {
                                        "description": "Video scrubbing restriction policy",
                                        "type": "string",
                                        "example": "only_watched",
                                        "enum": [
                                            "only_watched",
                                            "anywhere",
                                            "not_allowed"
                                        ]
                                    },
                                    "subtitles": {
                                        "description": "Optional subtitles/captions configuration",
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "language": {
                                                    "type": "string",
                                                    "example": "en"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "English"
                                                },
                                                "url": {
                                                    "type": "string",
                                                    "example": "https://example.com/subtitles/en.vtt"
                                                },
                                                "is_default": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Video Course created and packaged successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "500": {
                        "description": "Packaging error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/lti/existing-tools": {
            "get": {
                "tags": [
                    "Courses"
                ],
                "summary": "Get existing LTI 1.3 Tools",
                "description": "Retrieves a unique list of existing LTI 1.3 tools previously configured within the authenticated company to easily reuse credentials when creating a new course.",
                "operationId": "c874ac12ec72c487c587db2892b7fe2b",
                "responses": {
                    "200": {
                        "description": "List of existing LTI 1.3 Tools",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "tool_name": {
                                                        "type": "string",
                                                        "example": "CyberSecurity External Lab"
                                                    },
                                                    "launch_url": {
                                                        "type": "string",
                                                        "example": "https://tool.example.com/lti/launch"
                                                    },
                                                    "oidc_initiation_url": {
                                                        "type": "string",
                                                        "example": "https://tool.example.com/lti/login_initiations"
                                                    },
                                                    "jwks_url": {
                                                        "type": "string",
                                                        "example": "https://tool.example.com/.well-known/jwks.json"
                                                    },
                                                    "client_id": {
                                                        "type": "string",
                                                        "example": "tool-client-xyz"
                                                    },
                                                    "deployment_id": {
                                                        "type": "string",
                                                        "example": "deploy_001"
                                                    },
                                                    "privacy_level": {
                                                        "type": "string",
                                                        "example": "anonymous"
                                                    },
                                                    "enable_ags": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "passing_score": {
                                                        "type": "integer",
                                                        "example": 80
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/lti": {
            "post": {
                "tags": [
                    "Courses"
                ],
                "summary": "Create LTI 1.3 Tool Course",
                "description": "Creates a new external course configured as an LTI 1.3 Tool.\n\n### ℹ️ SCORMDispatch Platform Credentials\nCopy these default credentials into your external LTI 1.3 Tool Provider configuration:\n- **Platform / Issuer (ISS):** `https://app.scormdispatch.co.uk`\n- **OIDC Authentication URL:** `https://app.scormdispatch.co.uk/lti/1.3/auth`\n- **Public Keyset URL (JWKS):** `https://app.scormdispatch.co.uk/lti/1.3/jwks`\n- **Access Token URL (OAuth2):** `https://app.scormdispatch.co.uk/lti/1.3/token`\n- **Redirection URI(s) / Launch URL:** `https://app.scormdispatch.co.uk/lti/1.3/launch`",
                "operationId": "2dcb21a3c30b3b16671b78d27c54f7a0",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "launch_url",
                                    "oidc_initiation_url",
                                    "client_id"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Advanced Cyber Security Lab (LTI 1.3)"
                                    },
                                    "launch_url": {
                                        "description": "Target Link URI / Launch URL",
                                        "type": "string",
                                        "example": "https://tool.example.com/lti/launch"
                                    },
                                    "oidc_initiation_url": {
                                        "description": "OpenID Connect login initiation endpoint",
                                        "type": "string",
                                        "example": "https://tool.example.com/lti/login_initiations"
                                    },
                                    "client_id": {
                                        "description": "LTI 1.3 Tool / Client ID",
                                        "type": "string",
                                        "example": "tool-client-xyz-12345"
                                    },
                                    "deployment_id": {
                                        "description": "LTI 1.3 Deployment ID (optional, auto-generated if omitted)",
                                        "type": "string",
                                        "example": "deploy_001"
                                    },
                                    "jwks_url": {
                                        "description": "Public Keyset / JWKS URL",
                                        "type": "string",
                                        "example": "https://tool.example.com/.well-known/jwks.json"
                                    },
                                    "public_key": {
                                        "description": "RSA Public Key PEM (optional if JWKS URL provided)",
                                        "type": "string",
                                        "example": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
                                    },
                                    "tool_name": {
                                        "description": "Descriptive name of the external tool",
                                        "type": "string",
                                        "example": "CyberSecurity External Lab"
                                    },
                                    "language": {
                                        "type": "string",
                                        "example": "English"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Interactive external cyber security lab delivered via LTI 1.3"
                                    },
                                    "folder_id": {
                                        "type": "integer",
                                        "example": null
                                    },
                                    "custom_parameters": {
                                        "description": "Custom parameters (key=value per line or JSON string)",
                                        "type": "string",
                                        "example": "module_id=42\nenvironment=sandbox"
                                    },
                                    "privacy_level": {
                                        "description": "User identity information shared with the tool",
                                        "type": "string",
                                        "example": "anonymous",
                                        "enum": [
                                            "anonymous",
                                            "name_only",
                                            "email_and_name"
                                        ]
                                    },
                                    "enable_ags": {
                                        "description": "Enable Assignment and Grade Services (AGS)",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "passing_score": {
                                        "description": "Passing score threshold (1-100)",
                                        "type": "integer",
                                        "example": 80
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "LTI 1.3 Course created successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "500": {
                        "description": "Server error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/{id}": {
            "get": {
                "tags": [
                    "Courses"
                ],
                "summary": "Retrieve a course",
                "description": "Display the specified resource.",
                "operationId": "8ca050d9fc6dfc2eb0989e698780dbb8",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Course ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Course retrieved successfully"
                    },
                    "404": {
                        "description": "Course not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Courses"
                ],
                "summary": "Update course details",
                "description": "Updates standard course properties, video-specific configurations (video source, video URL, poster, completion percentage, scrubbing settings, and subtitles), or LTI 1.3 tool properties (launch URL, OIDC initiation URL, JWKS/public key, client ID, deployment ID, custom parameters, privacy level, and AGS).",
                "operationId": "c91a103315f486b7c5101f22f62cfe0b",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Course ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Updated Course Title"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Updated course description"
                                    },
                                    "folder_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "video_source": {
                                        "type": "string",
                                        "example": "youtube",
                                        "enum": [
                                            "youtube",
                                            "vimeo",
                                            "local"
                                        ]
                                    },
                                    "video_url": {
                                        "type": "string",
                                        "example": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
                                    },
                                    "video_poster_url": {
                                        "type": "string",
                                        "example": "https://example.com/poster.jpg"
                                    },
                                    "completion_percentage": {
                                        "type": "integer",
                                        "example": 85
                                    },
                                    "allow_seeking": {
                                        "type": "string",
                                        "example": "only_watched",
                                        "enum": [
                                            "only_watched",
                                            "anywhere",
                                            "not_allowed"
                                        ]
                                    },
                                    "subtitles": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "language": {
                                                    "type": "string",
                                                    "example": "fr"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "French"
                                                },
                                                "url": {
                                                    "type": "string",
                                                    "example": "https://example.com/subtitles/fr.vtt"
                                                },
                                                "is_default": {
                                                    "type": "boolean",
                                                    "example": false
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "launch_url": {
                                        "type": "string",
                                        "example": "https://tool.example.com/lti/launch"
                                    },
                                    "oidc_initiation_url": {
                                        "type": "string",
                                        "example": "https://tool.example.com/lti/login_initiations"
                                    },
                                    "client_id": {
                                        "type": "string",
                                        "example": "tool-client-xyz"
                                    },
                                    "deployment_id": {
                                        "type": "string",
                                        "example": "deploy_001"
                                    },
                                    "jwks_url": {
                                        "type": "string",
                                        "example": "https://tool.example.com/jwks.json"
                                    },
                                    "public_key": {
                                        "type": "string",
                                        "example": null
                                    },
                                    "tool_name": {
                                        "type": "string",
                                        "example": "CyberSecurity External Lab"
                                    },
                                    "custom_parameters": {
                                        "type": "string",
                                        "example": "module=1"
                                    },
                                    "privacy_level": {
                                        "type": "string",
                                        "example": "anonymous",
                                        "enum": [
                                            "anonymous",
                                            "name_only",
                                            "email_and_name"
                                        ]
                                    },
                                    "enable_ags": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "passing_score": {
                                        "type": "integer",
                                        "example": 80
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Course updated successfully"
                    },
                    "404": {
                        "description": "Course not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Courses"
                ],
                "summary": "Delete a course",
                "description": "Remove the specified resource from storage.",
                "operationId": "a8a57274ff9fedc78cc5201df49721b7",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Course ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Course deleted successfully"
                    },
                    "404": {
                        "description": "Course not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/{id}/download": {
            "get": {
                "tags": [
                    "Courses"
                ],
                "summary": "Download original SCORM file",
                "description": "Get download link for original uploaded SCORM package.",
                "operationId": "a0ae805cc9af0fe14662915a81793d4c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Course ID or UUID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "scorm_id",
                        "in": "query",
                        "description": "Specific SCORM version ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "description": "Language code (e.g. 'en')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Download URL retrieved successfully"
                    },
                    "404": {
                        "description": "Course or SCORM file not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/courses/{id}/download-wrapper": {
            "get": {
                "tags": [
                    "Courses"
                ],
                "summary": "Download Video Course xAPI Wrapper",
                "description": "Retrieves the download URL or directly streams the generated TinCan/xAPI zip wrapper package for a Video Course.",
                "operationId": "9803586e516bf3fedeb78c7a258338de",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Course ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "direct",
                        "in": "query",
                        "description": "If true, streams binary zip directly instead of JSON URL response",
                        "required": false,
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Wrapper package link retrieved or zip file downloaded"
                    },
                    "400": {
                        "description": "Course is not a Video Course"
                    },
                    "404": {
                        "description": "Course or Wrapper file not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/custom-alerts": {
            "get": {
                "tags": [
                    "Custom Alerts"
                ],
                "summary": "List custom alerts",
                "description": "Retrieves all custom alert configurations created for the authenticated company.",
                "operationId": "35ff4288207999b3d015fbd3423008f2",
                "parameters": [
                    {
                        "name": "alert_type",
                        "in": "query",
                        "description": "Filter by alert type ('access-limit', 'active-user', 'client-expiry', 'course-completion')",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "access-limit",
                                "active-user",
                                "client-expiry",
                                "course-completion"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by alert title",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of custom alerts",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Custom Alerts"
                ],
                "summary": "Create custom alert",
                "description": "Creates an automated alert rule for client expiry, access limit exhaustion, active user usage, or course completion.",
                "operationId": "d27b34b9e63be21ebabd8d0a758b4253",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "alert_type",
                                    "client_type",
                                    "emails"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Client Expiry 7 Days Warning"
                                    },
                                    "alert_type": {
                                        "type": "string",
                                        "example": "client-expiry",
                                        "enum": [
                                            "access-limit",
                                            "active-user",
                                            "client-expiry",
                                            "course-completion"
                                        ]
                                    },
                                    "client_type": {
                                        "type": "string",
                                        "example": "all",
                                        "enum": [
                                            "all",
                                            "selected"
                                        ]
                                    },
                                    "client_ids": {
                                        "description": "List of client IDs (required if client_type=selected)",
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        },
                                        "example": [
                                            1,
                                            2
                                        ]
                                    },
                                    "emails": {
                                        "description": "Target recipient emails (semicolon-separated string or array)",
                                        "type": "string",
                                        "example": "admin@example.com;manager@example.com"
                                    },
                                    "frequency": {
                                        "type": "string",
                                        "example": "daily",
                                        "enum": [
                                            "once",
                                            "daily",
                                            "3_days",
                                            "weekly",
                                            "monthly",
                                            "annual"
                                        ]
                                    },
                                    "days_before_expiry": {
                                        "description": "Days before expiry threshold (for alert_type=client-expiry)",
                                        "type": "integer",
                                        "example": 7
                                    },
                                    "rule_type": {
                                        "description": "Rule calculation mode (for alert_type=access-limit)",
                                        "type": "string",
                                        "example": "value",
                                        "enum": [
                                            "value",
                                            "percent"
                                        ]
                                    },
                                    "rule_value": {
                                        "description": "Remaining license threshold (value or percent, for alert_type=access-limit)",
                                        "type": "number",
                                        "example": 10
                                    },
                                    "count_users": {
                                        "description": "Active users threshold triggering alert (for alert_type=active-user)",
                                        "type": "integer",
                                        "example": 1000
                                    },
                                    "alert_limit": {
                                        "description": "Maximum number of times this alert can trigger (for alert_type=active-user)",
                                        "type": "integer",
                                        "example": 10
                                    },
                                    "completion_status": {
                                        "description": "Status to monitor (for alert_type=course-completion)",
                                        "type": "string",
                                        "example": "complete",
                                        "enum": [
                                            "complete",
                                            "incomplete",
                                            "passed",
                                            "failed"
                                        ]
                                    },
                                    "completion_rules": {
                                        "description": "Comparison operator (for alert_type=course-completion)",
                                        "type": "string",
                                        "example": "greater_than",
                                        "enum": [
                                            "greater_than",
                                            "less_than",
                                            "equal_too"
                                        ]
                                    },
                                    "completion_value": {
                                        "description": "Completion score/percentage threshold (for alert_type=course-completion)",
                                        "type": "number",
                                        "example": 80
                                    },
                                    "body_text": {
                                        "description": "Custom HTML email body text with placeholders",
                                        "type": "string",
                                        "example": "Hello [USER_NAME], client [CLIENT_NAME] will expire on [EXPIRY]."
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Custom alert created successfully"
                    },
                    "400": {
                        "description": "Validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/custom-alerts/{id}": {
            "get": {
                "tags": [
                    "Custom Alerts"
                ],
                "summary": "Get custom alert details",
                "description": "Retrieves details of a specific custom alert configuration.",
                "operationId": "ef1fed09ef8608f098dd797d37a58ab2",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Alert ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Alert details retrieved"
                    },
                    "404": {
                        "description": "Alert not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Custom Alerts"
                ],
                "summary": "Update custom alert",
                "description": "Updates an existing custom alert configuration.",
                "operationId": "9e013a3827bf7141917db33e9c29aca3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Alert ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Updated Expiry Alert Title"
                                    },
                                    "alert_type": {
                                        "type": "string",
                                        "enum": [
                                            "access-limit",
                                            "active-user",
                                            "client-expiry",
                                            "course-completion"
                                        ]
                                    },
                                    "client_type": {
                                        "type": "string",
                                        "enum": [
                                            "all",
                                            "selected"
                                        ]
                                    },
                                    "client_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        }
                                    },
                                    "emails": {
                                        "type": "string",
                                        "example": "ops@example.com"
                                    },
                                    "frequency": {
                                        "type": "string",
                                        "enum": [
                                            "once",
                                            "daily",
                                            "3_days",
                                            "weekly",
                                            "monthly",
                                            "annual"
                                        ]
                                    },
                                    "days_before_expiry": {
                                        "type": "integer",
                                        "example": 14
                                    },
                                    "rule_type": {
                                        "type": "string",
                                        "enum": [
                                            "value",
                                            "percent"
                                        ]
                                    },
                                    "rule_value": {
                                        "type": "number",
                                        "example": 20
                                    },
                                    "count_users": {
                                        "type": "integer"
                                    },
                                    "alert_limit": {
                                        "type": "integer"
                                    },
                                    "completion_status": {
                                        "type": "string",
                                        "enum": [
                                            "complete",
                                            "incomplete",
                                            "passed",
                                            "failed"
                                        ]
                                    },
                                    "completion_rules": {
                                        "type": "string",
                                        "enum": [
                                            "greater_than",
                                            "less_than",
                                            "equal_too"
                                        ]
                                    },
                                    "completion_value": {
                                        "type": "number"
                                    },
                                    "body_text": {
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Custom alert updated successfully"
                    },
                    "404": {
                        "description": "Alert not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Custom Alerts"
                ],
                "summary": "Delete custom alert",
                "description": "Deletes a custom alert configuration.",
                "operationId": "c4820b82e271f89e240e1ea7ea79c5ed",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Alert ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Custom alert deleted successfully"
                    },
                    "404": {
                        "description": "Alert not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/dispatches": {
            "get": {
                "tags": [
                    "Publish as Dispatch"
                ],
                "summary": "List all client dispatches",
                "description": "Retrieve a paginated or full list of dispatches assigned to a client.\n\n> **Additional Information - Duplicate Prevention (Idempotency):**\n> Before creating a new dispatch, call `GET /api/v2/clients/{client_id}/dispatches?search={course_or_dispatch_name}` to verify whether the dispatch already exists.",
                "operationId": "e531980b0695b93c01032491826ed664",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by dispatch name",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Dispatches retrieved successfully"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Publish as Dispatch"
                ],
                "summary": "Create a client dispatch",
                "description": "Assign a single course or a multi-course bundle to a client with tracking, selected language filtering, and flexible expiry configurations.\n\n### Content Selection (Course vs Bundle):\n- **Course Dispatch:** Provide `course_id` (e.g. `3279`) or set `item_type=\"course\"` and `course_id=3279`.\n- **Bundle Dispatch:** Provide `bundle_id` (e.g. `12`) or set `item_type=\"bundle\"` and `bundle_id=12` (or set `course_id=\"bundle12\"`).\n\n### Language Selection (`selected_languages`):\n- Filter which languages learners can access for this dispatch (e.g. `[\"English\", \"French\"]` or `\"English, French\"`).\n- Languages must be supported by the selected course or bundle. Omit or leave empty to allow all available course languages.\n\n### Expiry Configuration (`expiry` & `expiry_type`):\n- **Lifetime Access:** Set `expiry=\"No\"` (or leave empty).\n- **Fixed Date Expiry:** Set `expiry=\"Yes\"`, `expiry_type=\"fixed_date\"`, and `course_expire_date=\"YYYY-MM-DD\"`.\n- **After First Launch Expiry:** Set `expiry=\"Yes\"`, `expiry_type=\"after_first_launch\"`, and specify duration via `expire_days`, `expire_months`, and/or `expire_years`.",
                "operationId": "061c86b5b3cc2ca85fc072089bc9c315",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Leadership & Safety Induction - Client A",
                                        "maxLength": 191
                                    },
                                    "item_type": {
                                        "description": "Target content type: 'course' or 'bundle'",
                                        "type": "string",
                                        "example": "bundle",
                                        "enum": [
                                            "course",
                                            "bundle"
                                        ]
                                    },
                                    "course_id": {
                                        "description": "Target Course ID (required if item_type is 'course' or bundle_id is omitted)",
                                        "type": "integer",
                                        "example": null
                                    },
                                    "bundle_id": {
                                        "description": "Target Bundle ID (required if item_type is 'bundle' or course_id is omitted)",
                                        "type": "integer",
                                        "example": 12
                                    },
                                    "selected_languages": {
                                        "description": "List of allowed languages for this dispatch (array of strings or comma-separated string). Leave empty to allow all languages.",
                                        "example": [
                                            "English",
                                            "French"
                                        ],
                                        "oneOf": [
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            },
                                            {
                                                "type": "string"
                                            }
                                        ]
                                    },
                                    "access_limit": {
                                        "description": "Registration quota (e.g. 1 for single purchaser access, 0 for unlimited)",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "hash_user_name": {
                                        "description": "Set 'no' to identify learner by email and retain progress",
                                        "type": "string",
                                        "example": "no",
                                        "enum": [
                                            "yes",
                                            "no"
                                        ]
                                    },
                                    "expiry": {
                                        "description": "Whether an expiry rule is enforced ('Yes' or 'No', default: 'No')",
                                        "type": "string",
                                        "example": "Yes",
                                        "enum": [
                                            "Yes",
                                            "No"
                                        ]
                                    },
                                    "expiry_type": {
                                        "description": "Expiry model: 'fixed_date' (calendar date) or 'after_first_launch' (relative duration)",
                                        "type": "string",
                                        "example": "after_first_launch",
                                        "enum": [
                                            "fixed_date",
                                            "after_first_launch"
                                        ]
                                    },
                                    "course_expire_date": {
                                        "description": "Expiry calendar date (YYYY-MM-DD) for 'fixed_date'",
                                        "type": "string",
                                        "format": "date",
                                        "example": null
                                    },
                                    "expire_days": {
                                        "description": "Days to expire after first launch (for 'after_first_launch')",
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "expire_months": {
                                        "description": "Months to expire after first launch (for 'after_first_launch')",
                                        "type": "integer",
                                        "example": 6
                                    },
                                    "expire_years": {
                                        "description": "Years to expire after first launch (for 'after_first_launch')",
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "email_days_before_expiry": {
                                        "type": "integer",
                                        "example": 14
                                    },
                                    "number_of_emails_expiry": {
                                        "type": "string",
                                        "example": "weekly",
                                        "enum": [
                                            "none",
                                            "daily",
                                            "weekly",
                                            "biweekly",
                                            "monthly"
                                        ]
                                    },
                                    "email_expiry_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": null
                                    },
                                    "auto_renew": {
                                        "type": "string",
                                        "example": "no",
                                        "enum": [
                                            "yes",
                                            "no"
                                        ]
                                    },
                                    "auto_renewal_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": null
                                    },
                                    "email_days_before_auto_renewal": {
                                        "type": "integer",
                                        "example": 14
                                    },
                                    "number_of_emails_auto_renewal": {
                                        "type": "string",
                                        "example": "none",
                                        "enum": [
                                            "none",
                                            "daily",
                                            "weekly",
                                            "biweekly",
                                            "monthly"
                                        ]
                                    },
                                    "email_auto_renewal_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": null
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Dispatch created successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "404": {
                        "description": "Client, Course, or Bundle not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/dispatches/{id}": {
            "get": {
                "tags": [
                    "Publish as Dispatch"
                ],
                "summary": "Retrieve a client dispatch",
                "description": "Display the specified resource.",
                "operationId": "62e1987e735a1296f2a4131d17d3dd06",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Dispatch ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Dispatch details retrieved"
                    },
                    "404": {
                        "description": "Dispatch not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Publish as Dispatch"
                ],
                "summary": "Update a client dispatch",
                "description": "Update client dispatch settings, target course/bundle, allowed languages, and expiry configuration.",
                "operationId": "91e7c8e4447f1a4f473c3608342da030",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Dispatch ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Updated Dispatch Name",
                                        "maxLength": 191
                                    },
                                    "item_type": {
                                        "type": "string",
                                        "example": "bundle",
                                        "enum": [
                                            "course",
                                            "bundle"
                                        ]
                                    },
                                    "course_id": {
                                        "type": "integer",
                                        "example": null
                                    },
                                    "bundle_id": {
                                        "type": "integer",
                                        "example": 12
                                    },
                                    "selected_languages": {
                                        "example": [
                                            "English",
                                            "French"
                                        ],
                                        "oneOf": [
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            },
                                            {
                                                "type": "string"
                                            }
                                        ]
                                    },
                                    "access_limit": {
                                        "type": "integer",
                                        "example": 10
                                    },
                                    "hash_user_name": {
                                        "type": "string",
                                        "example": "no",
                                        "enum": [
                                            "yes",
                                            "no"
                                        ]
                                    },
                                    "expiry": {
                                        "type": "string",
                                        "example": "Yes",
                                        "enum": [
                                            "Yes",
                                            "No"
                                        ]
                                    },
                                    "expiry_type": {
                                        "type": "string",
                                        "example": "after_first_launch",
                                        "enum": [
                                            "fixed_date",
                                            "after_first_launch"
                                        ]
                                    },
                                    "course_expire_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": null
                                    },
                                    "expire_days": {
                                        "type": "integer",
                                        "example": 30
                                    },
                                    "expire_months": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "expire_years": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Dispatch updated successfully"
                    },
                    "404": {
                        "description": "Dispatch not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Publish as Dispatch"
                ],
                "summary": "Delete a client dispatch",
                "description": "Remove the specified resource from storage.",
                "operationId": "3432086c8149c481372d2b736b5e7da3",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Dispatch ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Dispatch deleted successfully"
                    },
                    "404": {
                        "description": "Dispatch not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/dispatches/download": {
            "post": {
                "tags": [
                    "Publish as Dispatch"
                ],
                "summary": "Download a dispatch package or generate direct web link",
                "description": "Generates either a SCORM dispatch ZIP file or a direct launch web URL (`learning_standard=link`).\n\n### Additional Information:\n#### 1. Delivering Courses via External Link (`learning_standard=link`)\nWhen downloading a dispatch with `learning_standard=link`, the API generates a direct standalone web player link. The launch URL is returned in the `url` field:\n```json\n{\n  \"url\": \"https://scormdispatch.co.uk/link/{dispatch_id}/{uuid}/{token}\"\n}\n```\nLearners can open this URL directly in modern browsers without needing an LMS.\n\n#### 2. Lifetime Access (No Expiry Date)\nBy default, the generated link/download package has no expiry date. Simply omit `expired_at` or leave it empty/null.",
                "operationId": "2a9ada7a783a5ca0b15a68081ef7a020",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dispatch_ids",
                        "in": "query",
                        "description": "Comma-separated dispatch IDs (e.g. '32')",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "32"
                        }
                    },
                    {
                        "name": "learning_standard",
                        "in": "query",
                        "description": "Standards: 'scorm_12', 'scorm_13' (2004 3rd), 'scorm_2004_4th', 'cmi5', 'aicc', or 'link' (direct browser link). Default: 'scorm_12'",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "scorm_12",
                            "enum": [
                                "scorm_12",
                                "scorm_13",
                                "scorm_2004_4th",
                                "cmi5",
                                "aicc",
                                "link"
                            ]
                        }
                    },
                    {
                        "name": "expired_at",
                        "in": "query",
                        "description": "Optional expiration date (YYYY-MM-DD). Omit or leave empty for no expiry.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": null
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Link or package download URL generated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "url": {
                                            "description": "Direct course launch URL (when learning_standard=link) or ZIP download URL",
                                            "type": "string",
                                            "example": "https://scormdispatch.co.uk/link/32/a1b2c3d4-e5f6-7890-abcd-ef0123456789/MTcyODc0MjQwMA=="
                                        },
                                        "expired_date": {
                                            "description": "Formatted expiry date or null",
                                            "type": "string",
                                            "example": null
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/dispatches/external-link": {
            "post": {
                "tags": [
                    "Publish as External Link"
                ],
                "summary": "Download as External Link",
                "description": "Generates a direct standalone web player launch URL (`learning_standard=link`) for delivering courses/bundles directly in any browser without needing an LMS.\n\n### How External Link Delivery Works:\n- Automatically creates a dispatch publish record with `org_version=link` and `target_version=link`.\n- Generates a secure direct launch URL in the format:\n  ```\n  https://{APP_URL}/link/{dispatch_id}/{uuid}/{secret}\n  ```\n- Learners can open this link directly on desktop, tablet, or mobile browsers.\n\n### Lifetime Access:\n- By default, links have lifetime access. If `expired_at` (YYYY-MM-DD) is provided, the dispatch access is bounded accordingly.",
                "operationId": "47836441fc1f2edca0898f534ac13fba",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dispatch_ids",
                        "in": "query",
                        "description": "Comma-separated dispatch IDs (e.g. '32' or '32,35')",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "32"
                        }
                    },
                    {
                        "name": "expired_at",
                        "in": "query",
                        "description": "Optional expiration date (YYYY-MM-DD). Omit or leave empty for lifetime access.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": null
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Direct web link generated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "External link generated successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "url": {
                                                    "description": "Primary direct course launch URL",
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/link/32/a1b2c3d4-e5f6-7890-abcd-ef0123456789/MTcyODc0MjQwMA=="
                                                },
                                                "dispatch_id": {
                                                    "type": "integer",
                                                    "example": 32
                                                },
                                                "learning_standard": {
                                                    "type": "string",
                                                    "example": "link"
                                                },
                                                "expired_at": {
                                                    "type": "string",
                                                    "example": null
                                                },
                                                "links": {
                                                    "description": "All generated links if multiple dispatch IDs were passed",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "dispatch_id": {
                                                                "type": "integer",
                                                                "example": 32
                                                            },
                                                            "url": {
                                                                "type": "string",
                                                                "example": "https://scormdispatch.co.uk/link/32/a1b2c3d4-e5f6-7890-abcd-ef0123456789/MTcyODc0MjQwMA=="
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid dispatch IDs"
                    },
                    "404": {
                        "description": "Client or Dispatch not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/folders": {
            "get": {
                "tags": [
                    "Folders"
                ],
                "summary": "List all folders",
                "description": "Display a listing of the resource.",
                "operationId": "c7ddc860eda2399d4b51c5fabeec4b1b",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by folder name",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Folders retrieved successfully"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Folders"
                ],
                "summary": "Create a new folder",
                "description": "Store a newly created resource in storage.",
                "operationId": "5ce32b3530bb6237305510cdbb4acdb2",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "folder_name"
                                ],
                                "properties": {
                                    "folder_name": {
                                        "type": "string",
                                        "example": "Compliance Training",
                                        "maxLength": 191
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Folder created successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/folders/{id}": {
            "get": {
                "tags": [
                    "Folders"
                ],
                "summary": "Get folder details by ID",
                "description": "Display the specified resource.",
                "operationId": "8cb86631f72181cfcfff8174a6320fea",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Folder ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Folder details retrieved"
                    },
                    "404": {
                        "description": "Folder not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Folders"
                ],
                "summary": "Update folder",
                "description": "Update the specified resource in storage.",
                "operationId": "5ed55303afea33192a078238590750e3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Folder ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "folder_name"
                                ],
                                "properties": {
                                    "folder_name": {
                                        "type": "string",
                                        "example": "Updated Folder Name",
                                        "maxLength": 191
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Folder updated successfully"
                    },
                    "404": {
                        "description": "Folder not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Folders"
                ],
                "summary": "Delete folder",
                "description": "Remove the specified resource from storage.",
                "operationId": "6f7197c12906d01689b36a0a1bfaeb58",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Folder ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Folder deleted successfully"
                    },
                    "404": {
                        "description": "Folder not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/languages": {
            "get": {
                "tags": [
                    "Languages"
                ],
                "summary": "List company languages",
                "description": "Returns a list of languages configured for the authenticated company, ordered by default first. Auto-initialises English if no languages exist.",
                "operationId": "b0476ff9e5acb70f31c7707e76a69cce",
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Pass 'all' to fetch all records without pagination",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Number of records per page (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of company languages retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "user_id": {
                                                        "type": "integer",
                                                        "example": 42
                                                    },
                                                    "language": {
                                                        "type": "string",
                                                        "example": "English"
                                                    },
                                                    "tag": {
                                                        "type": "string",
                                                        "example": "En"
                                                    },
                                                    "subtitle": {
                                                        "type": "string",
                                                        "example": "English"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "Start Course"
                                                    },
                                                    "default": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "is_custom": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "active": {
                                                        "type": "boolean",
                                                        "example": true
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Languages"
                ],
                "summary": "Add or enable a language",
                "description": "Enables a preset language from the platform catalogue or registers a custom language with tailored code, subtitle, and start button label.",
                "operationId": "063f55693ebcdbd749b3a47774b57551",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "language"
                                ],
                                "properties": {
                                    "language": {
                                        "description": "Standard language name (e.g. 'French', 'German') or 'custom' for custom language entries",
                                        "type": "string",
                                        "example": "French"
                                    },
                                    "custom_language": {
                                        "description": "Name of the language (mandatory if language is 'custom')",
                                        "type": "string",
                                        "example": "Javanese"
                                    },
                                    "custom_code": {
                                        "description": "ISO language code tag (e.g. 'Jv')",
                                        "type": "string",
                                        "example": "Jv"
                                    },
                                    "custom_subtitle": {
                                        "description": "Native label or subtitle shown in language pickers",
                                        "type": "string",
                                        "example": "Basa Jawa"
                                    },
                                    "custom_label": {
                                        "description": "Action button label for course launching",
                                        "type": "string",
                                        "example": "Mulai Pasinaon"
                                    },
                                    "default": {
                                        "description": "Whether to set this language as the company default",
                                        "type": "boolean",
                                        "example": false
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Language configured successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Language created successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 42
                                                },
                                                "language": {
                                                    "type": "string",
                                                    "example": "French"
                                                },
                                                "tag": {
                                                    "type": "string",
                                                    "example": "Fr"
                                                },
                                                "subtitle": {
                                                    "type": "string",
                                                    "example": "Français"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Commencer le cours"
                                                },
                                                "default": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "is_custom": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "active": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/languages/presets": {
            "get": {
                "tags": [
                    "Languages"
                ],
                "summary": "List supported preset languages",
                "description": "Returns all supported system languages configured in the platform catalogue with ISO code tags, subtitles, and labels.",
                "operationId": "36be9216d0de084cce50103623e383f9",
                "responses": {
                    "200": {
                        "description": "Preset languages catalogue",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Available preset languages retrieved successfully"
                                        },
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "properties": {
                                                    "code": {
                                                        "type": "string",
                                                        "example": "Fr"
                                                    },
                                                    "subtitle": {
                                                        "type": "string",
                                                        "example": "Français"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "Commencer le cours"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/languages/course-languages": {
            "get": {
                "tags": [
                    "Languages"
                ],
                "summary": "List languages present in courses",
                "description": "Returns the distinct languages detected in the company's uploaded SCORM packages or LTI courses. Optionally filters by a specific course_id.",
                "operationId": "4ec4f592d9cc2d0a0fdffbef3dd69a82",
                "parameters": [
                    {
                        "name": "course_id",
                        "in": "query",
                        "description": "Filter languages for a specific course ID",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of course languages",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Course languages retrieved successfully"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "English"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/languages/{id}": {
            "get": {
                "tags": [
                    "Languages"
                ],
                "summary": "Get language details",
                "description": "Returns details of a configured language belonging to the authenticated company.",
                "operationId": "6440b33359a2bbcbee83f772b179f066",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Language ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Language retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 42
                                                },
                                                "language": {
                                                    "type": "string",
                                                    "example": "English"
                                                },
                                                "tag": {
                                                    "type": "string",
                                                    "example": "En"
                                                },
                                                "subtitle": {
                                                    "type": "string",
                                                    "example": "English"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Start Course"
                                                },
                                                "default": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "is_custom": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "active": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Language not found"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Languages"
                ],
                "summary": "Update language configuration",
                "description": "Updates tag, subtitle, label, or default status for a company language.",
                "operationId": "1d2a12ab8362f5f2d9c6e0bd06b6fe8e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Language ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "tag": {
                                        "type": "string",
                                        "example": "Fr-CA"
                                    },
                                    "subtitle": {
                                        "type": "string",
                                        "example": "Français (Canada)"
                                    },
                                    "label": {
                                        "type": "string",
                                        "example": "Démarrer le cours"
                                    },
                                    "default": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Language updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Language updated successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 42
                                                },
                                                "language": {
                                                    "type": "string",
                                                    "example": "French"
                                                },
                                                "tag": {
                                                    "type": "string",
                                                    "example": "Fr-CA"
                                                },
                                                "subtitle": {
                                                    "type": "string",
                                                    "example": "Français (Canada)"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Démarrer le cours"
                                                },
                                                "default": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "is_custom": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "active": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Language not found"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Languages"
                ],
                "summary": "Delete a language",
                "description": "Removes a configured language for the company. English default language cannot be removed.",
                "operationId": "088262cb3d1fb4875c057bf481e92958",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Language ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Language deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Language deleted successfully"
                                        },
                                        "data": {
                                            "type": "null"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Cannot delete default English language"
                    },
                    "404": {
                        "description": "Language not found"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/languages/{id}/set-default": {
            "post": {
                "tags": [
                    "Languages"
                ],
                "summary": "Set language as default",
                "description": "Sets the specified language as default and unsets any previous default language for this company.",
                "operationId": "1dc48575cc9387965fb4e5110fdb4816",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Language ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Default language updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Default language set successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 42
                                                },
                                                "language": {
                                                    "type": "string",
                                                    "example": "French"
                                                },
                                                "tag": {
                                                    "type": "string",
                                                    "example": "Fr"
                                                },
                                                "subtitle": {
                                                    "type": "string",
                                                    "example": "Français"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "Commencer le cours"
                                                },
                                                "default": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "is_custom": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "active": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Language not found"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/lti/tool-config": {
            "get": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "Get LTI 1.3 tool registration configuration",
                "description": "Returns the SCORM Dispatch tool endpoints (Login Initiation URL, Redirection/Launch URI, Keyset URL, and RSA Public Key) needed to configure external tools in LMS platforms (e.g. Moodle, Canvas, Blackboard).",
                "operationId": "2d8a18ad68033067feaf7341422345c1",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Tool registration configuration details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "LTI tool configuration retrieved successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "login_initiate_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/lti/tool/login"
                                                },
                                                "target_link_uri": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/lti/tool/launch"
                                                },
                                                "public_keyset_url": {
                                                    "type": "string",
                                                    "example": "https://scormdispatch.co.uk/lti/tool/jwks"
                                                },
                                                "public_key_pem": {
                                                    "type": "string",
                                                    "example": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Client not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/lti/connections": {
            "get": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "List LTI 1.3 LMS platform connections",
                "description": "Returns all saved LMS platform connections (e.g. Moodle, Canvas instances) for this client.",
                "operationId": "40f54fe6053e07e357811a556a29edd0",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of LTI connections",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Client not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/lti/links": {
            "get": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "List all LTI 1.3 links",
                "description": "Returns a paginated or full list of LTI 1.3 links assigned to a client.",
                "operationId": "fefa53af5466a11bc586a0a0c7e93f44",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by course/bundle/link name",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit (default: 10)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of LTI links",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Client not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/lti/create": {
            "post": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "Create LTI 1.3 links",
                "description": "Creates LTI 1.3 launch links and underlying dispatches for single or multiple courses/bundles.\n\n### LMS Connection Handling:\n- Pass existing `lti_connection_id` to attach to a previously saved LMS platform,\n- OR supply platform parameters (`connection_name`, `issuer`, `platform_client_id`, `auth_login_url`, `auth_token_url`, `jwks_url`, and optional `deployment_id`) to automatically create and bind a new connection.\n\n### Content Specification (`content_keys`):\n- Specify an array of targets or a single target, e.g. `[\"3279\", \"bundle12\"]`.",
                "operationId": "5e1d9dfd8270a49992e41cb115bbc101",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "content_keys"
                                ],
                                "properties": {
                                    "content_keys": {
                                        "description": "Course or Bundle IDs to create LTI links for (e.g. [\"3279\", \"bundle12\"] or \"3279, bundle12\")",
                                        "example": [
                                            "3279",
                                            "bundle12"
                                        ],
                                        "oneOf": [
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            },
                                            {
                                                "type": "string"
                                            }
                                        ]
                                    },
                                    "access_limit": {
                                        "description": "Registration quota applied per content item (mandatory if client license is Limit by Dispatch)",
                                        "type": "integer",
                                        "example": 100
                                    },
                                    "lti_connection_id": {
                                        "description": "Existing LMS connection ID. Omit if registering a new connection.",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "connection_name": {
                                        "description": "LMS connection name (required if creating a new connection)",
                                        "type": "string",
                                        "example": "Acme Moodle Production"
                                    },
                                    "issuer": {
                                        "description": "LMS Platform ID / Issuer URL",
                                        "type": "string",
                                        "example": "https://moodle.example.com"
                                    },
                                    "platform_client_id": {
                                        "description": "Client ID generated by the LMS platform",
                                        "type": "string",
                                        "example": "a8e74f1b2c9d"
                                    },
                                    "deployment_id": {
                                        "description": "Deployment ID from LMS",
                                        "type": "string",
                                        "example": "1"
                                    },
                                    "auth_login_url": {
                                        "description": "OIDC Authentication URL",
                                        "type": "string",
                                        "example": "https://moodle.example.com/mod/lti/auth.php"
                                    },
                                    "auth_token_url": {
                                        "description": "Access Token URL",
                                        "type": "string",
                                        "example": "https://moodle.example.com/mod/lti/token.php"
                                    },
                                    "jwks_url": {
                                        "description": "Platform Keyset JWKS URL",
                                        "type": "string",
                                        "example": "https://moodle.example.com/mod/lti/certs.php"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "LTI links created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "LTI 1.3 links created successfully"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "404": {
                        "description": "Client or Content not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/clients/{client_id}/lti/links/{id}": {
            "get": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "Get LTI 1.3 link details",
                "description": "Returns details of an LTI 1.3 link, custom parameters for LMS activity setup, and registration info.",
                "operationId": "de3c2fdd66e42b3670565e91613aafc0",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "LTI Link ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "LTI link details retrieved"
                    },
                    "404": {
                        "description": "LTI link not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "Update an LTI 1.3 link",
                "description": "Update an LTI link and optionally its platform connection.",
                "operationId": "0a950fad39fe24539d9b47c19a3ff9c0",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "LTI Link ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "Updated LTI Course Link"
                                    },
                                    "access_limit": {
                                        "type": "integer",
                                        "example": 150
                                    },
                                    "connection_name": {
                                        "type": "string",
                                        "example": "Updated Moodle"
                                    },
                                    "issuer": {
                                        "type": "string",
                                        "example": "https://moodle.example.com"
                                    },
                                    "platform_client_id": {
                                        "type": "string",
                                        "example": "client_123"
                                    },
                                    "deployment_id": {
                                        "type": "string",
                                        "example": "1"
                                    },
                                    "auth_login_url": {
                                        "type": "string",
                                        "example": "https://moodle.example.com/mod/lti/auth.php"
                                    },
                                    "auth_token_url": {
                                        "type": "string",
                                        "example": "https://moodle.example.com/mod/lti/token.php"
                                    },
                                    "jwks_url": {
                                        "type": "string",
                                        "example": "https://moodle.example.com/mod/lti/certs.php"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "LTI link updated successfully"
                    },
                    "404": {
                        "description": "LTI link not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Publish as LTI 1.3"
                ],
                "summary": "Delete an LTI 1.3 link",
                "description": "Delete an LTI 1.3 link.",
                "operationId": "befe016c0ea8cb9c0072b47c96660b27",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "path",
                        "description": "Client ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "LTI Link ID",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "LTI link deleted successfully"
                    },
                    "404": {
                        "description": "LTI link not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/usages": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Daily & hourly launch charts",
                "description": "Returns aggregated daily launches for the current month and hourly breakdown for today.",
                "operationId": "fe8a4dc49203c479fbbcfae90ef5d078",
                "responses": {
                    "200": {
                        "description": "Usages chart data"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/clients": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Client overview and usage report",
                "operationId": "25f17fc304fedb5232c0ece8c0e9872a",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Filter by Client ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "active",
                        "in": "query",
                        "description": "'Yes', 'No', or 'all'",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "Yes",
                                "No"
                            ]
                        }
                    },
                    {
                        "name": "created_sdate",
                        "in": "query",
                        "description": "Created start date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "created_edate",
                        "in": "query",
                        "description": "Created end date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "expiry_sdate",
                        "in": "query",
                        "description": "Expiry start date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "expiry_edate",
                        "in": "query",
                        "description": "Expiry end date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Client reports data"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/dispatches": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Dispatch overview and usage report",
                "operationId": "f147133ac7b581504eda0811fe908c33",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Filter by Client ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dispatch_id",
                        "in": "query",
                        "description": "Filter by Dispatch ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_sdate",
                        "in": "query",
                        "description": "Created start date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "created_edate",
                        "in": "query",
                        "description": "Created end date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "expiry_sdate",
                        "in": "query",
                        "description": "Expiry start date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "expiry_edate",
                        "in": "query",
                        "description": "Expiry end date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Dispatch reports data"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/dispatchusages": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "30-Day Launch, completion & success statistics",
                "description": "Returns aggregated completions, pass rates, average attempts, and a 30-day timeline chart.",
                "operationId": "2694987daef5ce18948c03dc25154d3d",
                "responses": {
                    "200": {
                        "description": "Dispatch analytics data"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/results": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Learner results data table",
                "description": "Returns individual learner attempt results, scores, completion status, and time spent. Each result item includes `has_interactions` (boolean) and `interactions_url` (API endpoint URL to fetch detailed interactions/statements if available).",
                "operationId": "e1d59f313b239cb82f99d738da4968ee",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Filter by Client ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dispatch_id",
                        "in": "query",
                        "description": "Filter by Dispatch ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "course_id",
                        "in": "query",
                        "description": "Filter by Course ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "description": "Language code (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sdate",
                        "in": "query",
                        "description": "Start date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "edate",
                        "in": "query",
                        "description": "End date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Learner results data with interactions link",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "current_page": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 101
                                                    },
                                                    "user": {
                                                        "type": "string",
                                                        "example": "learner@example.com"
                                                    },
                                                    "learner": {
                                                        "type": "string",
                                                        "example": "John Doe"
                                                    },
                                                    "course": {
                                                        "type": "integer",
                                                        "example": 12
                                                    },
                                                    "language": {
                                                        "type": "string",
                                                        "example": "English"
                                                    },
                                                    "complete_status": {
                                                        "type": "string",
                                                        "example": "completed"
                                                    },
                                                    "satisfied_status": {
                                                        "type": "string",
                                                        "example": "passed"
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 100
                                                    },
                                                    "total_time": {
                                                        "type": "string",
                                                        "example": "00:15:30"
                                                    },
                                                    "attempt": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "has_interactions": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "interaction_type": {
                                                        "type": "string",
                                                        "example": "scorm",
                                                        "enum": [
                                                            "scorm",
                                                            "xapi",
                                                            "none"
                                                        ]
                                                    },
                                                    "interactions_url": {
                                                        "type": "string",
                                                        "example": "https://scormdispatch.co.uk/api/v2/reports/results/101/interactions",
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "total": {
                                            "type": "integer",
                                            "example": 25
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/results/{id}/interactions": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Get learner interactions or statements for a report record",
                "description": "Retrieves granular interaction details (e.g. question answers, choices, scores, timestamps) or xAPI/cmi5 LRS statements for a specific dispatch report entry.",
                "operationId": "a0249da29dca3f7fe8c4524dbe635dac",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "SCORM Report ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Interactions or statements retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "report_id": {
                                            "type": "integer",
                                            "example": 101
                                        },
                                        "learner": {
                                            "type": "string",
                                            "example": "John Doe"
                                        },
                                        "type": {
                                            "type": "string",
                                            "example": "scorm",
                                            "enum": [
                                                "scorm",
                                                "xapi"
                                            ]
                                        },
                                        "total_interactions": {
                                            "type": "integer",
                                            "example": 3
                                        },
                                        "interactions": {
                                            "description": "List of interaction questions/responses or statements",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "example": "Question_1"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "example": "choice"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "What is the primary emergency procedure?"
                                                    },
                                                    "learner_response": {
                                                        "type": "string",
                                                        "example": "Evacuate immediately"
                                                    },
                                                    "result": {
                                                        "type": "string",
                                                        "example": "correct"
                                                    },
                                                    "latency": {
                                                        "type": "string",
                                                        "example": "00:00:15"
                                                    },
                                                    "timestamp": {
                                                        "type": "string",
                                                        "example": "2026-10-13 14:20:00"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Report record or interactions not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/statements/{reportId}": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Get xAPI statements for an attempt",
                "description": "Retrieves raw and processed xAPI statements directly from Trax LRS for a specific learner attempt (`xapi` or `cmi5` packages). Matches `/reports/statements/{reportId}` in web UI.",
                "operationId": "55a87cb7dd870a0cb72bca2495883305",
                "parameters": [
                    {
                        "name": "reportId",
                        "in": "path",
                        "description": "SCORM Report ID (e.g. 25)",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "scorm_id",
                        "in": "query",
                        "description": "Optional SCORM package ID filter (useful for bundle multi-module dispatches)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "xAPI statements retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "sessionUuid": {
                                            "type": "string",
                                            "example": "43764836-e069-42b7-9556-9be8f946e3be"
                                        },
                                        "learnerName": {
                                            "type": "string",
                                            "example": "Rendi Pratama"
                                        },
                                        "mbox": {
                                            "type": "string",
                                            "example": "mailto:rendi@example.com"
                                        },
                                        "infoText": {
                                            "type": "string",
                                            "example": "Latest interaction at 2026-10-13 15:30"
                                        },
                                        "statements": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "timestamp": {
                                                        "type": "string",
                                                        "example": "2026-10-13T08:30:15.000Z"
                                                    },
                                                    "verb": {
                                                        "type": "string",
                                                        "example": "experienced"
                                                    },
                                                    "object": {
                                                        "type": "string",
                                                        "example": "Safety In Action - Slide 1"
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "response": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "is_hash": {
                                                        "type": "boolean",
                                                        "example": false
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Report record or LRS session not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/renew": {
            "post": {
                "tags": [
                    "Reports"
                ],
                "summary": "Renew dispatch usage entries",
                "description": "Manually renews learner usage records for dispatches under the authenticated company. Archiving previous attempts and clearing active SCORM tracking allows learners to restart the dispatch cleanly.\n\n### Renewal Modes (`renew_by`):\n- `all`: Renews all active (unrenewed) records belonging to the company's dispatches.\n- `date`: Renews active records updated between `sdate` and `edate` (inclusive).\n- `checked`: Renews specific report IDs passed in `selected_ids`.",
                "operationId": "8f85b9d22fe4339c80d0510b50718b26",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "renew_by"
                                ],
                                "properties": {
                                    "renew_by": {
                                        "description": "Renewal scope: 'all' (all unrenewed entries), 'date' (entries within date range), or 'checked' (specific report IDs)",
                                        "type": "string",
                                        "example": "date",
                                        "enum": [
                                            "all",
                                            "date",
                                            "checked"
                                        ]
                                    },
                                    "dispatch_id": {
                                        "description": "Optional dispatch ID to constrain renewal to a single dispatch. Omit or null to renew across all company dispatches.",
                                        "type": "integer",
                                        "example": 32,
                                        "nullable": true
                                    },
                                    "sdate": {
                                        "description": "Start date (YYYY-MM-DD). Required when renew_by is 'date'.",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2026-01-01",
                                        "nullable": true
                                    },
                                    "edate": {
                                        "description": "End date (YYYY-MM-DD). Required when renew_by is 'date'.",
                                        "type": "string",
                                        "format": "date",
                                        "example": "2026-10-13",
                                        "nullable": true
                                    },
                                    "selected_ids": {
                                        "description": "Array of SCORM report record IDs to renew. Required when renew_by is 'checked'.",
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        },
                                        "example": [
                                            101,
                                            102,
                                            103
                                        ],
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Renew action completed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Successfully renewed 5 usage records."
                                        },
                                        "data": {
                                            "properties": {
                                                "renewed_count": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "renew_by": {
                                                    "type": "string",
                                                    "example": "date"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/active-licenses-usages/stats": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Active licenses usage statistics",
                "description": "Returns aggregated active license counts for the current billing period (month) and today.",
                "operationId": "fcf9994bd4846f7071b0f873bbe083b1",
                "parameters": [
                    {
                        "name": "start",
                        "in": "query",
                        "description": "Start period date (YYYY-MM-DD). Defaults to company's usage_period_start.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "end",
                        "in": "query",
                        "description": "End period date (YYYY-MM-DD). Defaults to company's usage_period_end.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Active licenses usage statistics",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "properties": {
                                                "usage_month": {
                                                    "description": "Total active license usages in the current period",
                                                    "type": "integer",
                                                    "example": 42
                                                },
                                                "usage_today": {
                                                    "description": "Total active license usages recorded today",
                                                    "type": "integer",
                                                    "example": 7
                                                },
                                                "period_start": {
                                                    "type": "string",
                                                    "example": "2026-10-01"
                                                },
                                                "period_end": {
                                                    "type": "string",
                                                    "example": "2026-10-31"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/active-licenses-usages": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Active licenses launches report list",
                "description": "Returns paginated active license learner launches with latest attempt, course, dispatch, and timestamp details.",
                "operationId": "97ab6c0779ffaaa2cfd159a5b12e1fde",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "query",
                        "description": "Filter by Client ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "course_id",
                        "in": "query",
                        "description": "Filter by Course ID (or 'all')",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sdate",
                        "in": "query",
                        "description": "Start date filter (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "edate",
                        "in": "query",
                        "description": "End date filter (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Active license launch records",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "current_page": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 512
                                                    },
                                                    "user_origin": {
                                                        "type": "string",
                                                        "example": "learner_01"
                                                    },
                                                    "user": {
                                                        "type": "string",
                                                        "example": "learner@example.com"
                                                    },
                                                    "course_id": {
                                                        "type": "integer",
                                                        "example": 12
                                                    },
                                                    "course_title": {
                                                        "type": "string",
                                                        "example": "Health & Safety Induction - v1"
                                                    },
                                                    "dispatch_id": {
                                                        "type": "integer",
                                                        "example": 32
                                                    },
                                                    "dispatch_name": {
                                                        "type": "string",
                                                        "example": "Acme Corp Safety Package"
                                                    },
                                                    "scorm_language": {
                                                        "type": "string",
                                                        "example": "English"
                                                    },
                                                    "attempt": {
                                                        "type": "integer",
                                                        "example": 2
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 85
                                                    },
                                                    "complete_status": {
                                                        "type": "string",
                                                        "example": "completed"
                                                    },
                                                    "satisfied_status": {
                                                        "type": "string",
                                                        "example": "passed"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "total": {
                                            "type": "integer",
                                            "example": 50
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/bundles": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Bundle report learner progress table",
                "description": "Returns paginated learner progress records for a specified course bundle. Each entry includes completion counts, percentage, score, total time spent, status, and a direct `details_url` for a course-by-course breakdown.",
                "operationId": "185cd1eb6866c29ee269908932867314",
                "parameters": [
                    {
                        "name": "bundle_id",
                        "in": "query",
                        "description": "Bundle ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Set to 'all' to retrieve unpaginated results",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Pagination limit",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Bundle learner progress report records",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "current_page": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "report_id": {
                                                        "type": "integer",
                                                        "example": 1001
                                                    },
                                                    "learner_id": {
                                                        "type": "string",
                                                        "example": "learner_01"
                                                    },
                                                    "total_courses_in_bundle": {
                                                        "type": "integer",
                                                        "example": 4
                                                    },
                                                    "completed_count": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "progress_percent": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 75
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "in_progress",
                                                        "enum": [
                                                            "completed",
                                                            "in_progress"
                                                        ]
                                                    },
                                                    "avg_score": {
                                                        "type": "string",
                                                        "example": "88.50"
                                                    },
                                                    "total_time_spent": {
                                                        "type": "string",
                                                        "example": "01:25:30"
                                                    },
                                                    "first_activity": {
                                                        "type": "string",
                                                        "example": "2026-10-10 09:00"
                                                    },
                                                    "last_activity": {
                                                        "type": "string",
                                                        "example": "2026-10-13 14:15"
                                                    },
                                                    "details_url": {
                                                        "type": "string",
                                                        "example": "https://scormdispatch.co.uk/api/v2/reports/bundles/learner?report_id=1001&bundle_id=1"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "summary": {
                                            "properties": {
                                                "total_learner": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "total_completed": {
                                                    "type": "integer",
                                                    "example": 6
                                                },
                                                "average_progress": {
                                                    "type": "string",
                                                    "example": "82.50"
                                                },
                                                "total_completed_course": {
                                                    "type": "integer",
                                                    "example": 33
                                                },
                                                "average_completed_ratio": {
                                                    "type": "string",
                                                    "example": "3.30 / 4"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "total": {
                                            "type": "integer",
                                            "example": 10
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v2/reports/bundles/learner": {
            "get": {
                "tags": [
                    "Reports"
                ],
                "summary": "Bundle report details (course-by-course breakdown)",
                "description": "Returns course-by-course progress breakdown for a learner in a bundle. Each course module includes status, score, time spent, format (`scorm`, `aicc`, `xapi`, `cmi5`), interaction payload (for SCORM/AICC), and direct links to statements (`statements_url`) or interactions (`interactions_url`).",
                "operationId": "2045e1fdc4ed3c87e1c13963bf20b71e",
                "parameters": [
                    {
                        "name": "report_id",
                        "in": "query",
                        "description": "SCORM Report ID (e.g. 1001)",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "bundle_id",
                        "in": "query",
                        "description": "Bundle ID (e.g. 1)",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Course breakdown retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "report_id": {
                                            "type": "integer",
                                            "example": 1001
                                        },
                                        "bundle_id": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "learner": {
                                            "type": "string",
                                            "example": "John Doe"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "course_id": {
                                                        "type": "integer",
                                                        "example": 10
                                                    },
                                                    "course_title": {
                                                        "type": "string",
                                                        "example": "Cyber Security Fundamentals"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "completed"
                                                    },
                                                    "score": {
                                                        "type": "string",
                                                        "example": "95.00"
                                                    },
                                                    "total_time": {
                                                        "type": "string",
                                                        "example": "00:22:15"
                                                    },
                                                    "first_activity": {
                                                        "type": "string",
                                                        "example": "2026-10-11 10:00"
                                                    },
                                                    "last_activity": {
                                                        "type": "string",
                                                        "example": "2026-10-11 10:22"
                                                    },
                                                    "report_id": {
                                                        "type": "integer",
                                                        "example": 1001
                                                    },
                                                    "scorm_id": {
                                                        "type": "integer",
                                                        "example": 55,
                                                        "nullable": true
                                                    },
                                                    "format": {
                                                        "type": "string",
                                                        "example": "scorm",
                                                        "enum": [
                                                            "scorm",
                                                            "aicc",
                                                            "xapi",
                                                            "cmi5"
                                                        ]
                                                    },
                                                    "has_interactions": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "interactions_url": {
                                                        "type": "string",
                                                        "example": "https://scormdispatch.co.uk/api/v2/reports/results/1001/interactions",
                                                        "nullable": true
                                                    },
                                                    "statements_url": {
                                                        "type": "string",
                                                        "example": null,
                                                        "nullable": true
                                                    },
                                                    "payload": {
                                                        "description": "Base64-encoded JSON interactions payload (for SCORM/AICC)",
                                                        "type": "string",
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle or report not found"
                    },
                    "403": {
                        "description": "Invalid Token Access"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "description": "Enter your API token here (Bearer {token})",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "Courses",
            "description": "Course catalogue and SCORM package management API"
        },
        {
            "name": "Bundles",
            "description": "Course bundle catalogue and multi-course configuration API"
        },
        {
            "name": "Bundle Themes",
            "description": "Bundle theme customisation and design configuration API"
        },
        {
            "name": "Certificates",
            "description": "Certificate template manager and designer configuration API"
        },
        {
            "name": "Languages",
            "description": "Company language configuration, preset catalogues, and course language discovery API"
        },
        {
            "name": "Folders",
            "description": "Course folder management API"
        },
        {
            "name": "Clients",
            "description": "Client organization management API, including licence and access configurations"
        },
        {
            "name": "Publish as Dispatch",
            "description": "Manage dispatches assigned to clients, generate packages (SCORM 1.2/2004, cmi5, AICC), and generate direct launch web links"
        },
        {
            "name": "Publish as External Link",
            "description": "Generate direct standalone web player links for delivering courses via external link without needing an LMS"
        },
        {
            "name": "Publish as LTI 1.3",
            "description": "LTI 1.3 Advantage integration API for external LMS platforms (Moodle, Canvas, Blackboard)"
        },
        {
            "name": "Custom Alerts",
            "description": "Custom notifications and automated alert rules manager (access limit, active users, client expiry, course completion)"
        },
        {
            "name": "Reports",
            "description": "Analytics and reporting API for course launches, completion rates, and client/dispatch usages"
        }
    ]
}