{ "openapi": "3.0.0", "info": { "title": "AKXR Backend API", "version": "1.0.0", "description": "API documentation for AKXR Backend" }, "servers": [ { "url": "http://localhost:3000", "description": "Local development server" } ], "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": { "SignUpWithEmailRequest": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 8 }, "username": { "type": "string", "minLength": 3, "maxLength": 50, "pattern": "^[a-zA-Z0-9_-]+$" }, "full_name": { "type": "string", "minLength": 2 } }, "required": [ "email", "password", "username", "full_name" ] }, "SignInWithEmailRequest": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 1 } }, "required": [ "email", "password" ] }, "RefreshTokenRequest": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "access_token", "refresh_token" ] }, "CompleteProfileRequest": { "type": "object", "properties": { "skills": { "type": "array", "items": { "type": "string" }, "minItems": 1 }, "linkedin_url": { "type": "string", "nullable": true, "format": "uri" }, "x_url": { "type": "string", "nullable": true, "format": "uri" }, "github_url": { "type": "string", "nullable": true, "format": "uri" }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 } }, "required": [ "skills" ] }, "UpdateUserRequest": { "type": "object", "properties": { "full_name": { "type": "string", "minLength": 2 }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true, "format": "uri" }, "x_url": { "type": "string", "nullable": true, "format": "uri" }, "github_url": { "type": "string", "nullable": true, "format": "uri" }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 } } }, "UpgradeRoleRequest": { "type": "object", "properties": { "user_id": { "type": "string", "format": "uuid" }, "new_role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] } }, "required": [ "user_id", "new_role" ] }, "GithubCallbackQuery": { "type": "object", "properties": { "code": { "type": "string" } }, "required": [ "code" ] }, "UserResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "AuthResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "user", "access_token", "refresh_token" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "GithubAuthResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "access_token": { "type": "string" }, "refresh_token": { "type": "string" }, "is_new_user": { "type": "boolean" } }, "required": [ "user", "access_token", "refresh_token", "is_new_user" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "GithubLoginResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "auth_url": { "type": "string", "format": "uri" } }, "required": [ "auth_url" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "RefreshTokenResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "access_token", "refresh_token" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "UserDataResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "UsersListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "UpgradeRoleResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "username": { "type": "string" }, "email": { "type": "string", "format": "email" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] } }, "required": [ "id", "username", "email", "role" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "ErrorResponse": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] }, "CreateMeetingRequest": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 60 } }, "required": [ "title", "description", "batch_id", "scheduled_start_time" ] }, "StartMeetingRequest": { "type": "object", "properties": { "initial_participant_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "default": [] } } }, "EndMeetingRequest": { "type": "object", "properties": { "present_participant_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "joined_participant_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } } }, "required": [ "present_participant_ids", "joined_participant_ids" ] }, "CancelMeetingRequest": { "type": "object", "properties": { "reason": { "type": "string" } } }, "MeetingResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "MeetingDataResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "CreateBatchRequest": { "type": "object", "properties": { "total_classes": { "type": "integer", "minimum": 0 }, "batch_name": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "batch_start_date": { "type": "string", "format": "date" }, "batch_end_date": { "type": "string", "format": "date" }, "estimated_end_date": { "type": "string", "format": "date" }, "current_course_id": { "type": "string", "nullable": true }, "course_ids": { "type": "array", "items": { "type": "string" } }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "batch_code": { "type": "string", "maxLength": 4 }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "meeting_id": { "type": "string", "format": "uuid" } }, "required": [ "total_classes", "batch_name", "mentor_ids", "batch_start_date", "batch_end_date", "estimated_end_date", "course_ids", "batch_code", "description" ] }, "UpdateBatchRequest": { "type": "object", "properties": { "total_classes": { "type": "integer", "minimum": 0 }, "batch_name": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "batch_start_date": { "type": "string", "format": "date" }, "batch_end_date": { "type": "string", "format": "date" }, "estimated_end_date": { "type": "string", "format": "date" }, "current_course_id": { "type": "string", "nullable": true }, "course_ids": { "type": "array", "items": { "type": "string" } }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "batch_code": { "type": "string", "maxLength": 4 }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "meeting_id": { "type": "string", "format": "uuid" } } }, "CreateBatchRequestRequest": { "type": "object", "properties": { "batch_code": { "type": "string" }, "change_type": { "type": "string", "enum": [ "date", "reschedule", "size" ] }, "proposed_value": { "type": "string", "nullable": true }, "reason": { "type": "string" } }, "required": [ "batch_code", "change_type", "reason" ] }, "BatchRequestResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_code": { "type": "string" }, "mentor_id": { "type": "string", "format": "uuid" }, "change_type": { "type": "string" }, "proposed_value": { "type": "string", "nullable": true }, "reason": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_code", "mentor_id", "change_type", "reason", "status", "created_at", "updated_at" ] }, "BatchResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] }, "BatchDataResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "BatchMeetingsResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "BatchesListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "CreateCourseRequest": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "time_allotted_in_weeks": { "type": "integer" } }, "required": [ "name", "description", "time_allotted_in_weeks" ] }, "CourseResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "lesson_ids": { "type": "array", "items": { "type": "string" } }, "time_allotted_in_weeks": { "type": "integer" }, "weekly_content": { "type": "array", "items": { "type": "object", "properties": { "week_number": { "type": "integer" }, "lesson_ids": { "type": "array", "items": { "type": "string" } } }, "required": [ "week_number", "lesson_ids" ] } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "lesson_ids", "time_allotted_in_weeks", "weekly_content", "created_at", "updated_at" ] }, "CoursesListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "lesson_ids": { "type": "array", "items": { "type": "string" } }, "time_allotted_in_weeks": { "type": "integer" }, "weekly_content": { "type": "array", "items": { "type": "object", "properties": { "week_number": { "type": "integer" }, "lesson_ids": { "type": "array", "items": { "type": "string" } } }, "required": [ "week_number", "lesson_ids" ] } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "lesson_ids", "time_allotted_in_weeks", "weekly_content", "created_at", "updated_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] }, "AttendanceResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" }, "meeting_id": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": [ "PRESENT", "ABSENT", "JOINED_LATE" ] }, "joined_at": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "id", "user_id", "meeting_id", "status" ] }, "AttendanceListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" }, "meeting_id": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": [ "PRESENT", "ABSENT", "JOINED_LATE" ] }, "joined_at": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "id", "user_id", "meeting_id", "status" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } }, "parameters": {} }, "paths": { "/health": { "get": { "description": "Health check endpoint", "tags": [ "Health" ], "responses": { "200": { "description": "Server is running", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } }, "required": [ "status", "message" ] } } } } } } }, "/user/auth/signup": { "post": { "description": "Sign up with email and password", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 8 }, "username": { "type": "string", "minLength": 3, "maxLength": 50, "pattern": "^[a-zA-Z0-9_-]+$" }, "full_name": { "type": "string", "minLength": 2 } }, "required": [ "email", "password", "username", "full_name" ] } } } }, "responses": { "201": { "description": "User created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "user", "access_token", "refresh_token" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/user/auth/signin": { "post": { "description": "Sign in with email and password", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 1 } }, "required": [ "email", "password" ] } } } }, "responses": { "200": { "description": "Sign in successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "user", "access_token", "refresh_token" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/user/auth/refresh": { "post": { "description": "Refresh access and refresh tokens", "tags": [ "Auth" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "access_token", "refresh_token" ] } } } }, "responses": { "200": { "description": "Tokens refreshed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": [ "access_token", "refresh_token" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "401": { "description": "Invalid or expired tokens", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/user/github/login": { "get": { "description": "Initiate GitHub OAuth login", "tags": [ "Auth", "GitHub" ], "responses": { "200": { "description": "GitHub auth URL", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "auth_url": { "type": "string", "format": "uri" } }, "required": [ "auth_url" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } } } } }, "/user/github/callback": { "get": { "description": "GitHub OAuth callback", "tags": [ "Auth", "GitHub" ], "parameters": [ { "schema": { "type": "string" }, "required": true, "name": "code", "in": "query" } ], "responses": { "302": { "description": "Redirects to the frontend auth callback URL with tokens or error information encoded in the URL fragment" } } } }, "/user": { "get": { "description": "Get current user profile", "tags": [ "User" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "User profile", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } }, "patch": { "description": "Update user profile", "tags": [ "User" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "full_name": { "type": "string", "minLength": 2 }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true, "format": "uri" }, "x_url": { "type": "string", "nullable": true, "format": "uri" }, "github_url": { "type": "string", "nullable": true, "format": "uri" }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 } } } } } }, "responses": { "200": { "description": "User updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/user/complete-profile": { "post": { "description": "Complete user profile with additional information", "tags": [ "User" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "skills": { "type": "array", "items": { "type": "string" }, "minItems": 1 }, "linkedin_url": { "type": "string", "nullable": true, "format": "uri" }, "x_url": { "type": "string", "nullable": true, "format": "uri" }, "github_url": { "type": "string", "nullable": true, "format": "uri" }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 } }, "required": [ "skills" ] } } } }, "responses": { "200": { "description": "Profile completed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/admin/upgrade-role": { "post": { "description": "Upgrade user role (Admin only)", "tags": [ "Admin" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "user_id": { "type": "string", "format": "uuid" }, "new_role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] } }, "required": [ "user_id", "new_role" ] } } } }, "responses": { "200": { "description": "Role upgraded successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "username": { "type": "string" }, "email": { "type": "string", "format": "email" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] } }, "required": [ "id", "username", "email", "role" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } }, "403": { "description": "Forbidden - Admin access required", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/admin/users": { "get": { "description": "Get all users (Admin only)", "tags": [ "Admin" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "List of all users", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "403": { "description": "Forbidden - Admin access required", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/admin/courses": { "get": { "description": "Get all courses (Admin only)", "tags": [ "Admin" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "List of all courses", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "lesson_ids": { "type": "array", "items": { "type": "string" } }, "time_allotted_in_weeks": { "type": "integer" }, "weekly_content": { "type": "array", "items": { "type": "object", "properties": { "week_number": { "type": "integer" }, "lesson_ids": { "type": "array", "items": { "type": "string" } } }, "required": [ "week_number", "lesson_ids" ] } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "lesson_ids", "time_allotted_in_weeks", "weekly_content", "created_at", "updated_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "403": { "description": "Forbidden - Admin access required", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } }, "post": { "description": "Create a new course (Admin only)", "tags": [ "Admin" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "time_allotted_in_weeks": { "type": "integer" } }, "required": [ "name", "description", "time_allotted_in_weeks" ] } } } }, "responses": { "201": { "description": "Course created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string" }, "lesson_ids": { "type": "array", "items": { "type": "string" } }, "time_allotted_in_weeks": { "type": "integer" }, "weekly_content": { "type": "array", "items": { "type": "object", "properties": { "week_number": { "type": "integer" }, "lesson_ids": { "type": "array", "items": { "type": "string" } } }, "required": [ "week_number", "lesson_ids" ] } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "description", "lesson_ids", "time_allotted_in_weeks", "weekly_content", "created_at", "updated_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } }, "403": { "description": "Forbidden - Admin access required", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting": { "get": { "description": "Get all meetings for the current user. Admins see all meetings, students see meetings for their batches, mentors see meetings for batches they mentor or belong to.", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "List of meetings", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } }, "post": { "description": "Create a new meeting", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "default": 60 } }, "required": [ "title", "description", "batch_id", "scheduled_start_time" ] } } } }, "responses": { "201": { "description": "Meeting created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting/{id}": { "get": { "description": "Get meeting by ID", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Meeting details", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "404": { "description": "Meeting not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting/{id}/participants": { "get": { "description": "Get meeting participants", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "List of participants", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "format": "email" }, "username": { "type": "string" }, "full_name": { "type": "string" }, "role": { "type": "string", "enum": [ "STUDENT", "MENTOR", "ADMIN" ] }, "profile_status": { "type": "string", "enum": [ "AUTHENTICATED", "PROFILE_CREATED" ] }, "skills": { "type": "array", "items": { "type": "string" } }, "linkedin_url": { "type": "string", "nullable": true }, "github_url": { "type": "string", "nullable": true }, "x_url": { "type": "string", "nullable": true }, "zulip_username": { "type": "string", "nullable": true }, "did_internship": { "type": "boolean" }, "college_year": { "type": "integer", "nullable": true, "minimum": 1, "maximum": 5 }, "batch_ids": { "type": "array", "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "email", "username", "full_name", "role", "profile_status", "skills", "did_internship", "batch_ids", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "404": { "description": "Meeting not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting/{id}/start": { "post": { "description": "Start a meeting", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "initial_participant_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "default": [] } } } } } }, "responses": { "200": { "description": "Meeting started successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting/{id}/end": { "post": { "description": "End a meeting", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "present_participant_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "joined_participant_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } } }, "required": [ "present_participant_ids", "joined_participant_ids" ] } } } }, "responses": { "200": { "description": "Meeting ended successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting/{id}/cancel": { "post": { "description": "Cancel a meeting", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reason": { "type": "string" } } } } } }, "responses": { "200": { "description": "Meeting cancelled successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/meeting/{id}/attendance": { "get": { "description": "Get meeting attendance", "tags": [ "Meeting" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Attendance list", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" }, "meeting_id": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": [ "PRESENT", "ABSENT", "JOINED_LATE" ] }, "joined_at": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "id", "user_id", "meeting_id", "status" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "404": { "description": "Meeting not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/batch": { "post": { "description": "Create a new batch", "tags": [ "Batch" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "total_classes": { "type": "integer", "minimum": 0 }, "batch_name": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "batch_start_date": { "type": "string", "format": "date" }, "batch_end_date": { "type": "string", "format": "date" }, "estimated_end_date": { "type": "string", "format": "date" }, "current_course_id": { "type": "string", "nullable": true }, "course_ids": { "type": "array", "items": { "type": "string" } }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "batch_code": { "type": "string", "maxLength": 4 }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "meeting_id": { "type": "string", "format": "uuid" } }, "required": [ "total_classes", "batch_name", "mentor_ids", "batch_start_date", "batch_end_date", "estimated_end_date", "course_ids", "batch_code", "description" ] } } } }, "responses": { "201": { "description": "Batch created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } }, "get": { "description": "Get all batches", "tags": [ "Batch" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "List of all batches", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } } } } }, "/batch/{id}": { "get": { "description": "Get batch by ID", "tags": [ "Batch" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "Batch details", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "404": { "description": "Batch not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } }, "patch": { "description": "Update a batch (Admin only)", "tags": [ "Batch" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "total_classes": { "type": "integer", "minimum": 0 }, "batch_name": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "batch_start_date": { "type": "string", "format": "date" }, "batch_end_date": { "type": "string", "format": "date" }, "estimated_end_date": { "type": "string", "format": "date" }, "current_course_id": { "type": "string", "nullable": true }, "course_ids": { "type": "array", "items": { "type": "string" } }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "batch_code": { "type": "string", "maxLength": 4 }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "meeting_id": { "type": "string", "format": "uuid" } } } } } }, "responses": { "200": { "description": "Batch updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_name": { "type": "string" }, "batch_code": { "type": "string" }, "description": { "type": "string" }, "image_url": { "type": "string", "format": "uri" }, "total_classes": { "type": "integer" }, "batch_start_date": { "type": "string" }, "batch_end_date": { "type": "string" }, "estimated_end_date": { "type": "string" }, "mentor_ids": { "type": "array", "items": { "type": "string" } }, "course_ids": { "type": "array", "items": { "type": "string" } }, "current_course_id": { "type": "string", "nullable": true }, "completed_course_ids": { "type": "array", "items": { "type": "string" } }, "meeting_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_name", "batch_code", "description", "image_url", "total_classes", "batch_start_date", "batch_end_date", "estimated_end_date", "mentor_ids", "course_ids", "current_course_id", "completed_course_ids", "meeting_id", "created_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } }, "403": { "description": "Forbidden - Admin access required", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } }, "404": { "description": "Batch not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/batch/{id}/meetings": { "get": { "description": "Get all meetings for a batch", "tags": [ "Batch" ], "security": [ { "bearerAuth": [] } ], "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "required": true, "name": "id", "in": "path" } ], "responses": { "200": { "description": "List of meetings for the batch", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "description": { "type": "string" }, "batch_id": { "type": "string", "format": "uuid" }, "scheduled_start_time": { "type": "string", "format": "date-time" }, "duration_minutes": { "type": "integer" }, "status": { "type": "string", "enum": [ "SCHEDULED", "STARTED", "ENDED", "CANCELLED" ] }, "actual_start_time": { "type": "string", "nullable": true, "format": "date-time" }, "actual_end_time": { "type": "string", "nullable": true, "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "title", "description", "batch_id", "scheduled_start_time", "duration_minutes", "status", "created_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "404": { "description": "Batch not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/batch-requests": { "post": { "description": "Create a new batch change request", "tags": [ "BatchRequest" ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "batch_code": { "type": "string" }, "change_type": { "type": "string", "enum": [ "date", "reschedule", "size" ] }, "proposed_value": { "type": "string", "nullable": true }, "reason": { "type": "string" } }, "required": [ "batch_code", "change_type", "reason" ] } } } }, "responses": { "201": { "description": "Request created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_code": { "type": "string" }, "mentor_id": { "type": "string", "format": "uuid" }, "change_type": { "type": "string" }, "proposed_value": { "type": "string", "nullable": true }, "reason": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_code", "mentor_id", "change_type", "reason", "status", "created_at", "updated_at" ] }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "required": [ "error", "message" ] } } } } } } }, "/batch-requests/my": { "get": { "description": "Get batch requests for current user", "tags": [ "BatchRequest" ], "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "List of requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "batch_code": { "type": "string" }, "mentor_id": { "type": "string", "format": "uuid" }, "change_type": { "type": "string" }, "proposed_value": { "type": "string", "nullable": true }, "reason": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "batch_code", "mentor_id", "change_type", "reason", "status", "created_at", "updated_at" ] } }, "message": { "type": "string" } }, "required": [ "data", "message" ] } } } } } } } } }