> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learnway.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Swagger OpenAPI Documentation

> How to access and use the interactive Swagger documentation for both User and Admin API surfaces.

# Swagger OpenAPI Documentation

LearnWay features dual Swagger endpoints generated automatically via `@nestjs/swagger`.

***

## 1. User API Documentation

* **Live URL**: `https://learnway-backend-dev.up.railway.app/api/v2/docs#/`
* **Local Dev URL**: `http://localhost:3000/api/v2/docs`
* **Scope**: Contains all public and student-facing endpoints: Auth, Courses, Lessons, Quizzes, Battles, Leaderboards, Subscriptions, AI Tutor, and Payments.
* **Authorization**: Click the **Authorize** button at the top right and enter `Bearer <your_access_token>`.

***

## 2. Admin API Documentation

* **Live URL**: `https://api.learnway.app/api/v2/admin-docs#`
* **Local Dev URL**: `http://localhost:3000/api/v2/admin-docs`
* **Scope**: Contains administrative endpoints: Course & Question authoring, Translation management, Media uploads, App Version controls, Promotional campaigns, and User management.
* **Authorization**: Requires a JWT token for a user with role `ADMIN` or `SUPER_ADMIN`.
