definitions: domain.AgeGroup: enum: - UNDER_13 - "13_17" - "18_24" - "25_34" - "35_44" - "45_54" - 55_PLUS type: string x-enum-varnames: - AgeUnder13 - Age13To17 - Age18To24 - Age25To34 - Age35To44 - Age45To54 - Age55Plus domain.AssessmentQuestion: properties: created_at: type: string description: type: string difficulty_level: type: string id: type: integer is_active: type: boolean points: type: integer question_type: type: string title: type: string updated_at: type: string type: object domain.CreateAssessmentQuestionInput: properties: correctAnswer: description: Short Answer only type: string description: type: string difficultyLevel: type: string isActive: type: boolean options: description: Multiple Choice only items: $ref: '#/definitions/domain.CreateQuestionOptionInput' type: array points: format: int32 type: integer questionType: $ref: '#/definitions/domain.QuestionType' title: type: string type: object domain.CreateQuestionOptionInput: properties: isCorrect: type: boolean order: format: int32 type: integer text: type: string type: object domain.ErrorResponse: properties: error: type: string message: type: string type: object domain.LogEntry: properties: caller: type: string env: type: string fields: additionalProperties: true type: object level: type: string message: type: string service: type: string stacktrace: type: string timestamp: type: string type: object domain.LogResponse: properties: data: items: $ref: '#/definitions/domain.LogEntry' type: array message: type: string pagination: $ref: '#/definitions/domain.Pagination' type: object domain.LoginRequest: properties: email: type: string otp_code: type: string password: type: string phone_number: type: string type: object domain.OtpMedium: enum: - email - sms type: string x-enum-varnames: - OtpMediumEmail - OtpMediumSms domain.Pagination: properties: current_page: type: integer limit: type: integer total: type: integer total_pages: type: integer type: object domain.QuestionOption: properties: option_text: type: string question_id: type: integer type: object domain.QuestionType: enum: - MULTIPLE_CHOICE - TRUE_FALSE - SHORT_ANSWER type: string x-enum-varnames: - MultipleChoice - TrueFalse - ShortAnswer domain.QuestionWithDetails: properties: options: items: $ref: '#/definitions/domain.QuestionOption' type: array question: $ref: '#/definitions/domain.AssessmentQuestion' type: object domain.RegisterUserReq: properties: email: type: string otp_medium: $ref: '#/definitions/domain.OtpMedium' password: type: string phone_number: type: string role: type: string type: object domain.ResendOtpReq: properties: email: type: string phone_number: type: string type: object domain.Response: properties: data: {} message: type: string metadata: {} status_code: type: integer success: type: boolean type: object domain.Role: enum: - super_admin - admin - student - instructor - support type: string x-enum-varnames: - RoleSuperAdmin - RoleAdmin - RoleStudent - RoleInstructor - RoleSupport domain.UpdateKnowledgeLevelReq: properties: knowledge_level: description: BEGINNER, INTERMEDIATE, ADVANCED type: string user_id: type: integer type: object domain.UpdateUserReq: properties: age_group: $ref: '#/definitions/domain.AgeGroup' birth_day: description: YYYY-MM-DD type: string country: type: string education_level: type: string favourite_topic: type: string first_name: type: string gender: type: string initial_assessment_completed: type: boolean knowledge_level: type: string language_challange: type: string language_goal: type: string last_name: type: string learning_goal: type: string nick_name: type: string occupation: type: string preferred_language: type: string profile_completed: type: boolean profile_picture_url: type: string region: type: string type: object domain.UserProfileResponse: properties: age_group: type: string birth_day: description: formatted as YYYY-MM-DD type: string country: type: string created_at: type: string education_level: type: string email: description: UserName string `json:"user_name,omitempty"` type: string email_verified: type: boolean favoutite_topic: type: string first_name: type: string gender: type: string id: type: integer initial_assessment_completed: description: Profile fields type: boolean language_challange: type: string language_goal: type: string last_login: type: string last_name: type: string learning_goal: type: string nick_name: type: string occupation: type: string phone_number: type: string phone_verified: type: boolean preferred_language: type: string profile_completed: type: boolean profile_picture_url: type: string region: type: string role: $ref: '#/definitions/domain.Role' status: $ref: '#/definitions/domain.UserStatus' updated_at: type: string type: object domain.UserStatus: enum: - PENDING - ACTIVE - SUSPENDED - DEACTIVATED type: string x-enum-varnames: - UserStatusPending - UserStatusActive - UserStatusSuspended - UserStatusDeactivated domain.VerifyOtpReq: properties: email: type: string otp: type: string phone_number: type: string required: - otp type: object handlers.AdminProfileRes: properties: created_at: type: string email: type: string email_verified: type: boolean first_name: type: string id: type: integer last_login: type: string last_name: type: string phone_number: type: string phone_verified: type: boolean role: $ref: '#/definitions/domain.Role' suspended: type: boolean suspended_at: type: string updated_at: type: string type: object handlers.AdminRes: properties: created_at: type: string email: type: string email_verified: type: boolean first_name: type: string id: type: integer last_login: type: string last_name: type: string phone_number: type: string phone_verified: type: boolean role: $ref: '#/definitions/domain.Role' suspended: type: boolean suspended_at: type: string updated_at: type: string type: object handlers.CheckPhoneEmailExistReq: properties: email: example: john.doe@example.com type: string phone_number: example: "1234567890" type: string type: object handlers.CheckPhoneEmailExistRes: properties: email_exist: type: boolean phone_number_exist: type: boolean type: object handlers.CreateAdminReq: properties: email: example: john.doe@example.com type: string first_name: example: John type: string last_name: example: Doe type: string password: example: password123 type: string phone_number: example: "1234567890" type: string type: object handlers.LoginAdminRes: properties: access_token: type: string refresh_token: type: string role: type: string type: object handlers.RegisterCodeReq: properties: email: example: john.doe@example.com type: string phone_number: example: "1234567890" type: string type: object handlers.ResetCodeReq: properties: email: example: john.doe@example.com type: string phone_number: example: "1234567890" type: string type: object handlers.ResetPasswordReq: type: object handlers.SearchUserByNameOrPhoneReq: properties: query: type: string role: $ref: '#/definitions/domain.Role' type: object handlers.SendSingleAfroSMSReq: properties: message: example: Hello world type: string recipient: example: "+251912345678" type: string required: - message - recipient type: object handlers.createCourseCategoryReq: properties: name: type: string required: - name type: object handlers.createCourseReq: properties: category_id: type: integer description: type: string title: type: string required: - category_id - title type: object handlers.createLevelReq: properties: description: type: string is_active: type: boolean level_index: type: integer program_id: type: integer title: type: string required: - level_index - program_id - title type: object handlers.createModuleReq: properties: content: type: string display_order: type: integer level_id: type: integer title: type: string required: - level_id - title type: object handlers.createModuleVideoReq: properties: description: type: string duration: type: integer instructor_id: type: string module_id: type: integer resolution: type: string thumbnail: type: string title: type: string video_url: type: string visibility: type: string required: - duration - module_id - title - video_url type: object handlers.createPracticeQuestionReq: properties: practice_id: type: integer q_type: type: string question: type: string question_voice_prompt: type: string sample_answer: type: string sample_answer_voice_prompt: type: string tips: type: string required: - practice_id - q_type - question type: object handlers.createPracticeReq: properties: banner_image: type: string description: type: string is_active: type: boolean owner_id: type: integer owner_type: type: string persona: type: string title: type: string required: - owner_id - owner_type - title type: object handlers.createProgramReq: properties: course_id: type: integer description: type: string display_order: type: integer thumbnail: type: string title: type: string required: - course_id - title type: object handlers.loginUserRes: properties: access_token: type: string refresh_token: type: string role: type: string user_id: type: integer type: object handlers.logoutReq: properties: refresh_token: example: type: string required: - refresh_token type: object handlers.refreshToken: properties: access_token: example: type: string refresh_token: example: type: string required: - access_token - refresh_token type: object handlers.updateAdminReq: properties: first_name: example: John type: string last_name: example: Doe type: string suspended: example: false type: boolean type: object handlers.updateCourseCategoryReq: properties: is_active: type: boolean name: type: string type: object handlers.updateCourseReq: properties: description: type: string is_active: type: boolean title: type: string type: object handlers.updateLevelReq: properties: description: type: string is_active: type: boolean level_index: type: integer title: type: string type: object handlers.updateModuleReq: properties: content: type: string display_order: type: integer is_active: type: boolean title: type: string type: object handlers.updateModuleVideoReq: properties: description: type: string duration: type: integer is_active: type: boolean resolution: type: string thumbnail: type: string title: type: string video_url: type: string visibility: type: string type: object handlers.updatePracticeQuestionReq: properties: q_type: type: string question: type: string sample_answer: type: string tips: type: string type: object handlers.updatePracticeReq: properties: banner_image: type: string description: type: string is_active: type: boolean persona: type: string title: type: string type: object handlers.updateProgramFullReq: properties: course_id: type: integer description: type: string display_order: type: integer is_active: type: boolean thumbnail: type: string title: type: string required: - course_id - title type: object handlers.updateProgramPartialReq: properties: description: type: string display_order: type: integer is_active: type: boolean thumbnail: type: string title: type: string type: object response.APIResponse: properties: data: {} message: type: string metadata: {} page: type: integer status: $ref: '#/definitions/response.Status' timestamp: type: string total: type: integer type: object response.Status: enum: - error - success type: string x-enum-varnames: - Error - Success info: contact: email: support@swagger.io name: API Support url: http://www.swagger.io/support description: This is server for Yimaru. license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: http://swagger.io/terms/ title: Yimaru API version: 1.0.1 paths: /api/v1/{tenant_slug}/admin-login: post: consumes: - application/json description: Login user parameters: - description: Login admin in: body name: login required: true schema: $ref: '#/definitions/domain.LoginRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.LoginAdminRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Login user tags: - auth /api/v1/{tenant_slug}/otp/resend: post: consumes: - application/json description: Resend OTP if the previous one is expired parameters: - description: Resend OTP in: body name: resendOtp required: true schema: $ref: '#/definitions/domain.ResendOtpReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Resend OTP tags: - otp /api/v1/{tenant_slug}/user-login: post: consumes: - application/json description: Login user parameters: - description: Login user in: body name: login required: true schema: $ref: '#/definitions/domain.LoginRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.loginUserRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Login user tags: - auth /api/v1/{tenant_slug}/user/admin-profile: get: consumes: - application/json description: Get user profile produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.AdminProfileRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' security: - Bearer: [] summary: Get user profile tags: - user /api/v1/{tenant_slug}/user/checkPhoneEmailExist: post: consumes: - application/json description: Check if phone number or email exist parameters: - description: Check phone number or email exist in: body name: checkPhoneEmailExist required: true schema: $ref: '#/definitions/handlers.CheckPhoneEmailExistReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.CheckPhoneEmailExistRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Check if phone number or email exist tags: - user /api/v1/{tenant_slug}/user/knowledge-level: put: consumes: - application/json description: Updates the knowledge level of the specified user after initial assessment parameters: - description: User ID in: path name: user_id required: true type: integer - description: Knowledge level in: body name: knowledge_level required: true schema: $ref: '#/definitions/domain.UpdateKnowledgeLevelReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update user's knowledge level tags: - user /api/v1/{tenant_slug}/user/register: post: consumes: - application/json description: Register user parameters: - description: Register user in: body name: registerUser required: true schema: $ref: '#/definitions/domain.RegisterUserReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Register user tags: - user /api/v1/{tenant_slug}/user/resetPassword: post: consumes: - application/json description: Reset tenant password parameters: - description: Reset password in: body name: resetPassword required: true schema: $ref: '#/definitions/handlers.ResetPasswordReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Reset tenant password tags: - user /api/v1/{tenant_slug}/user/sendRegisterCode: post: consumes: - application/json description: Send register code parameters: - description: Send register code in: body name: registerCode required: true schema: $ref: '#/definitions/handlers.RegisterCodeReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Send register code tags: - user /api/v1/{tenant_slug}/user/sendResetCode: post: consumes: - application/json description: Send reset code parameters: - description: Send reset code in: body name: resetCode required: true schema: $ref: '#/definitions/handlers.ResetCodeReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Send reset code tags: - user /api/v1/{tenant_slug}/user/user-profile: get: consumes: - application/json description: Get user profile produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.UserProfileResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' security: - Bearer: [] summary: Get user profile tags: - user /api/v1/admin: get: consumes: - application/json description: Get all Admins parameters: - description: Page number in: query name: page type: integer - description: Page size in: query name: page_size type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.AdminRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Get all Admins tags: - admin post: consumes: - application/json description: Create Admin parameters: - description: Create admin in: body name: manger required: true schema: $ref: '#/definitions/handlers.CreateAdminReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Create Admin tags: - admin /api/v1/admin/{id}: get: consumes: - application/json description: Get a single admin by id parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.AdminRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Get admin by id tags: - admin put: consumes: - application/json description: Update Admin parameters: - description: Update Admin in: body name: admin required: true schema: $ref: '#/definitions/handlers.updateAdminReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Update Admin tags: - admin /api/v1/assessment/questions: get: description: Returns all active assessment questions with their options or answers produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/domain.QuestionWithDetails' type: array "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: List assessment questions tags: - assessment-question post: consumes: - application/json description: Creates a new assessment question with options or short answer depending on question type parameters: - description: Create question payload in: body name: body required: true schema: $ref: '#/definitions/domain.CreateAssessmentQuestionInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create assessment question tags: - assessment-question /api/v1/assessment/questions/{id}: get: description: Returns a single assessment question with its options or answer parameters: - description: Question ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.QuestionWithDetails' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get assessment question by ID tags: - assessment-question /api/v1/auth/google/android: post: parameters: - description: Google ID Token from Android in: body name: idToken required: true schema: type: string responses: {} summary: Login via Google Android ID Token tags: - auth /api/v1/auth/google/callback: get: responses: {} summary: Google login callback tags: - auth /api/v1/auth/google/login: get: responses: {} summary: Google login redirect tags: - auth /api/v1/auth/logout: post: consumes: - application/json description: Logout user parameters: - description: Logout user in: body name: logout required: true schema: $ref: '#/definitions/handlers.logoutReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Logout user tags: - auth /api/v1/auth/refresh: post: consumes: - application/json description: Refresh token parameters: - description: tokens in: body name: refresh required: true schema: $ref: '#/definitions/handlers.refreshToken' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.loginUserRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Refresh token tags: - auth /api/v1/course-management/categories: get: description: Returns a paginated list of all course categories parameters: - default: 10 description: Limit in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get all course categories tags: - course-categories post: consumes: - application/json description: Creates a new course category with the provided name parameters: - description: Create category payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createCourseCategoryReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new course category tags: - course-categories /api/v1/course-management/categories/{categoryId}/courses: get: description: Returns a paginated list of courses under a specific category parameters: - description: Category ID in: path name: categoryId required: true type: integer - default: 10 description: Limit in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get courses by category tags: - courses /api/v1/course-management/categories/{id}: delete: description: Deletes a course category by its ID parameters: - description: Category ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete course category tags: - course-categories get: description: Returns a single course category by its ID parameters: - description: Category ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get course category by ID tags: - course-categories put: consumes: - application/json description: Updates a course category's name and/or active status parameters: - description: Category ID in: path name: id required: true type: integer - description: Update category payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateCourseCategoryReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update course category tags: - course-categories /api/v1/course-management/courses: post: consumes: - application/json description: Creates a new course under a specific category parameters: - description: Create course payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createCourseReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new course tags: - courses /api/v1/course-management/courses/{courseId}/programs: get: description: Returns all programs under a specific course with total count parameters: - description: Course ID in: path name: courseId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get programs by course tags: - programs /api/v1/course-management/courses/{courseId}/programs/list: get: description: Returns a simple list of programs under a specific course parameters: - description: Course ID in: path name: courseId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: List programs by course tags: - programs /api/v1/course-management/courses/{id}: delete: description: Deletes a course by its ID parameters: - description: Course ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete course tags: - courses get: description: Returns a single course by its ID parameters: - description: Course ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get course by ID tags: - courses put: consumes: - application/json description: Updates a course's title, description, and/or active status parameters: - description: Course ID in: path name: id required: true type: integer - description: Update course payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateCourseReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update course tags: - courses /api/v1/course-management/learning-tree: get: description: Returns the complete learning tree structure with courses, programs, levels, and modules produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get full learning tree tags: - learning-tree /api/v1/course-management/levels: post: consumes: - application/json description: Creates a new level under a specific program parameters: - description: Create level payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createLevelReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new level tags: - levels /api/v1/course-management/levels/{id}: put: consumes: - application/json description: Updates a level's title, description, index, and/or active status parameters: - description: Level ID in: path name: id required: true type: integer - description: Update level payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateLevelReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update level tags: - levels /api/v1/course-management/levels/{levelId}: delete: description: Deletes a level by its ID parameters: - description: Level ID in: path name: levelId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete level tags: - levels /api/v1/course-management/levels/{levelId}/increment-module: put: description: Increments the module count for a specific level parameters: - description: Level ID in: path name: levelId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Increment level module count tags: - levels /api/v1/course-management/levels/{levelId}/increment-practice: put: description: Increments the practice count for a specific level parameters: - description: Level ID in: path name: levelId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Increment level practice count tags: - levels /api/v1/course-management/levels/{levelId}/increment-video: put: description: Increments the video count for a specific level parameters: - description: Level ID in: path name: levelId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Increment level video count tags: - levels /api/v1/course-management/levels/{levelId}/modules: get: description: Returns a paginated list of modules under a specific level parameters: - description: Level ID in: path name: levelId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get modules by level tags: - modules /api/v1/course-management/modules: post: consumes: - application/json description: Creates a new module under a specific level parameters: - description: Create module payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createModuleReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new module tags: - modules /api/v1/course-management/modules/{id}: delete: description: Deletes a module by its ID parameters: - description: Module ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete module tags: - modules put: consumes: - application/json description: Updates a module's title, content, display order, and/or active status parameters: - description: Module ID in: path name: id required: true type: integer - description: Update module payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateModuleReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update module tags: - modules /api/v1/course-management/modules/{moduleId}/videos/published: get: description: Returns all published videos under a specific module parameters: - description: Module ID in: path name: moduleId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get published videos by module tags: - module-videos /api/v1/course-management/owners/{ownerType}/{ownerId}/practices: get: description: Returns all practices for a specific owner type and ID parameters: - description: Owner Type in: path name: ownerType required: true type: string - description: Owner ID in: path name: ownerId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get practices by owner tags: - practices /api/v1/course-management/practices: post: consumes: - application/json description: Creates a new practice for a specific owner (module or level) parameters: - description: Create practice payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createPracticeReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new practice tags: - practices /api/v1/course-management/practices/{id}: delete: description: Deletes a practice by its ID parameters: - description: Practice ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete practice tags: - practices put: consumes: - application/json description: Updates a practice's fields parameters: - description: Practice ID in: path name: id required: true type: integer - description: Update practice payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updatePracticeReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update practice tags: - practices /api/v1/course-management/practices/{practiceId}/questions: get: description: Returns all questions under a specific practice parameters: - description: Practice ID in: path name: practiceId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get questions by practice tags: - practice-questions /api/v1/course-management/programs: post: consumes: - application/json description: Creates a new program under a specific course parameters: - description: Create program payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createProgramReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new program tags: - programs /api/v1/course-management/programs/{id}: delete: description: Deletes a program by its ID parameters: - description: Program ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete program tags: - programs get: description: Returns a single program by its ID parameters: - description: Program ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get program by ID tags: - programs patch: consumes: - application/json description: Updates selected fields of a program parameters: - description: Program ID in: path name: id required: true type: integer - description: Update program payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateProgramPartialReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update program partially tags: - programs /api/v1/course-management/programs/{id}/deactivate: put: description: Deactivates a program by setting is_active to false parameters: - description: Program ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Deactivate program tags: - programs /api/v1/course-management/programs/{id}/full: put: consumes: - application/json description: Updates all fields of a program parameters: - description: Program ID in: path name: id required: true type: integer - description: Update program payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateProgramFullReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update program fully tags: - programs /api/v1/course-management/programs/{programId}/levels: get: description: Returns all levels under a specific program parameters: - description: Program ID in: path name: programId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get levels by program tags: - levels /api/v1/course-management/programs/active: get: description: Returns all active programs across all courses produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: List active programs tags: - programs /api/v1/course-management/questions: post: consumes: - application/json description: Creates a new question under a specific practice parameters: - description: Create question payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createPracticeQuestionReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new practice question tags: - practice-questions /api/v1/course-management/questions/{id}: delete: description: Deletes a practice question by its ID parameters: - description: Question ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete practice question tags: - practice-questions put: consumes: - application/json description: Updates a practice question's fields parameters: - description: Question ID in: path name: id required: true type: integer - description: Update question payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updatePracticeQuestionReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update practice question tags: - practice-questions /api/v1/course-management/videos: post: consumes: - application/json description: Creates a new video under a specific module parameters: - description: Create video payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createModuleVideoReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Create a new module video tags: - module-videos /api/v1/course-management/videos/{id}: delete: description: Deletes a module video by its ID parameters: - description: Video ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Delete module video tags: - module-videos put: consumes: - application/json description: Updates a module video's fields parameters: - description: Video ID in: path name: id required: true type: integer - description: Update video payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateModuleVideoReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update module video tags: - module-videos /api/v1/course-management/videos/{videoId}/publish: put: description: Publishes a module video by setting publish date parameters: - description: Video ID in: path name: videoId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Publish module video tags: - module-videos /api/v1/logs: get: description: Fetches application logs from MongoDB with pagination, level filtering, and search parameters: - description: Filter logs by level (debug, info, warn, error, dpanic, panic, fatal) in: query name: level type: string - description: Search term to match against message or fields in: query name: search type: string - default: 1 description: 'Page number for pagination (default: 1)' in: query name: page type: integer - default: 50 description: 'Number of items per page (default: 50, max: 100)' in: query name: limit type: integer produces: - application/json responses: "200": description: Paginated list of application logs schema: $ref: '#/definitions/domain.LogResponse' "400": description: Invalid request parameters schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Retrieve application logs with filtering and pagination tags: - Logs /api/v1/sendSMS: post: consumes: - application/json description: Sends an SMS message to a single phone number using AfroMessage parameters: - description: Send SMS request in: body name: sendSMS required: true schema: $ref: '#/definitions/handlers.SendSingleAfroSMSReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Send single SMS via AfroMessage tags: - user /api/v1/super-login: post: consumes: - application/json description: Login super-admin parameters: - description: Login super-admin in: body name: login required: true schema: $ref: '#/definitions/domain.LoginRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.LoginAdminRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Login super-admin tags: - auth /api/v1/t-approver/{id}: get: consumes: - application/json description: Get a single admin by id parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.AdminRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Get admin by id tags: - admin put: consumes: - application/json description: Update Admin parameters: - description: Update Admin in: body name: admin required: true schema: $ref: '#/definitions/handlers.updateAdminReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Update Admin tags: - admin /api/v1/tenant: get: consumes: - application/json description: Check if phone number or email exist parameters: - description: Check phone number or email exist in: body name: checkPhoneEmailExist required: true schema: $ref: '#/definitions/handlers.CheckPhoneEmailExistReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.CheckPhoneEmailExistRes' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Check if phone number or email exist tags: - user /api/v1/user: put: consumes: - application/json description: Updates user profile information (partial updates supported) parameters: - description: User ID in: path name: user_id required: true type: integer - description: Update user payload in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateUserReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Update user profile tags: - user /api/v1/user/{id}/profile-picture: post: consumes: - multipart/form-data description: Uploads a profile picture for the specified user parameters: - description: User ID in: path name: id required: true type: integer - description: Image file (jpg|png|webp) in: formData name: file required: true type: file produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' security: - Bearer: [] summary: Upload profile picture tags: - user /api/v1/user/{user_id}/is-pending: get: consumes: - application/json description: Returns whether the specified user has a status of "pending" parameters: - description: User ID in: path name: user_id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Check if user status is pending tags: - user /api/v1/user/{user_id}/is-profile-completed: get: consumes: - application/json description: Returns whether the specified user's profile is completed parameters: - description: User ID in: path name: user_id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.Response' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Check if user profile is completed tags: - user /api/v1/user/delete/{id}: delete: consumes: - application/json description: Delete a user by their ID parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Delete user by ID tags: - user /api/v1/user/resetPassword: post: consumes: - application/json description: Reset password parameters: - description: Reset password in: body name: resetPassword required: true schema: $ref: '#/definitions/handlers.ResetPasswordReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Reset password tags: - user /api/v1/user/search: post: consumes: - application/json description: Search for user using name or phone parameters: - description: Search for using his name or phone in: body name: searchUserByNameOrPhone required: true schema: $ref: '#/definitions/handlers.SearchUserByNameOrPhoneReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.UserProfileResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Search for user using name or phone tags: - user /api/v1/user/sendResetCode: post: consumes: - application/json description: Send reset code parameters: - description: Send reset code in: body name: resetCode required: true schema: $ref: '#/definitions/handlers.ResetCodeReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Send reset code tags: - user /api/v1/user/single/{id}: get: consumes: - application/json description: Get a single user by id parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.UserProfileResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "401": description: Unauthorized schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Get user by id tags: - user /api/v1/user/verify-otp: post: consumes: - application/json description: Verify OTP for registration or other actions parameters: - description: Verify OTP in: body name: verifyOtp required: true schema: $ref: '#/definitions/domain.VerifyOtpReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Verify OTP tags: - user /api/v1/users: get: consumes: - application/json description: Get users with optional filters parameters: - description: Role filter in: query name: role type: string - description: Search query in: query name: query type: string - description: Page number in: query name: page type: integer - description: Page size in: query name: page_size type: integer - description: Created before (RFC3339) in: query name: created_before type: string - description: Created after (RFC3339) in: query name: created_after type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.APIResponse' "400": description: Bad Request schema: $ref: '#/definitions/response.APIResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/response.APIResponse' summary: Get all users tags: - user securityDefinitions: Bearer: in: header name: Authorization type: apiKey swagger: "2.0"