definitions: domain.ARIFPAYPaymentMethod: properties: ID: type: integer Name: type: string type: object domain.AcceptTeamInvitationReq: properties: bio: type: string department: type: string emergency_contact: type: string employment_type: type: string first_name: type: string hire_date: description: YYYY-MM-DD type: string job_title: type: string last_name: type: string password: minLength: 8 type: string phone_number: type: string profile_picture_url: type: string token: type: string work_phone: type: string required: - first_name - last_name - password - token type: object domain.AccountDeletionRequest: properties: DeletionCancelledAt: type: string DeletionRequestedAt: type: string DeletionScheduledAt: type: string DeletionState: $ref: '#/definitions/domain.AccountDeletionState' Email: type: string FirstName: type: string LastName: type: string PhoneNumber: type: string Role: $ref: '#/definitions/domain.Role' Status: $ref: '#/definitions/domain.UserStatus' UserID: type: integer type: object domain.AccountDeletionState: enum: - PENDING - DUE - CANCELLED type: string x-enum-varnames: - AccountDeletionStatePending - AccountDeletionStateDue - AccountDeletionStateCancelled domain.AdminExamPrepCatalogCourseLearningEntry: properties: chapters: items: $ref: '#/definitions/domain.AdminExamPrepUnitLearningEntry' type: array id: type: integer name: type: string practices: items: $ref: '#/definitions/domain.AdminExamPrepPracticeLearningEntry' type: array sort_order: type: integer type: object domain.AdminExamPrepLessonLearningEntry: properties: id: type: integer practices: items: $ref: '#/definitions/domain.AdminExamPrepPracticeLearningEntry' type: array sort_order: type: integer title: type: string type: object domain.AdminExamPrepPracticeLearningEntry: properties: completed_at: type: string practice_id: type: integer title: type: string type: object domain.AdminExamPrepUnitLearningEntry: properties: id: type: integer lessons: items: $ref: '#/definitions/domain.AdminExamPrepLessonLearningEntry' type: array name: type: string practices: items: $ref: '#/definitions/domain.AdminExamPrepPracticeLearningEntry' type: array sort_order: type: integer type: object domain.AdminExamPrepUserLearningActivityTree: properties: courses: items: $ref: '#/definitions/domain.AdminExamPrepCatalogCourseLearningEntry' type: array user_id: type: integer type: object domain.AdminUserExamPrepLearningSection: properties: completions: $ref: '#/definitions/domain.AdminExamPrepUserLearningActivityTree' progress: $ref: '#/definitions/domain.ExamPrepProgressSummary' type: object domain.AdminUserLearningActivityDetails: properties: learning: $ref: '#/definitions/domain.AdminUserExamPrepLearningSection' recent_activity: $ref: '#/definitions/domain.UserRecentActivityFeed' user_id: type: integer type: object domain.AdminUserSubscriptionDetails: properties: active_by_category: additionalProperties: type: boolean type: object active_subscriptions: items: $ref: '#/definitions/domain.AdminUserSubscriptionRecord' type: array display_status: type: string has_active_subscription: type: boolean payments: items: $ref: '#/definitions/domain.AdminUserSubscriptionPayment' type: array subscriptions: items: $ref: '#/definitions/domain.AdminUserSubscriptionRecord' type: array user_id: type: integer type: object domain.AdminUserSubscriptionPayment: properties: amount: type: number created_at: type: string currency: type: string expires_at: type: string id: type: integer paid_at: type: string payment_method: type: string plan_id: type: integer plan_name: type: string status: type: string subscription_id: type: integer type: object domain.AdminUserSubscriptionRecord: properties: auto_renew: type: boolean cancelled_at: type: string created_at: type: string currency: type: string duration_unit: type: string duration_value: type: integer expires_at: type: string id: type: integer is_currently_active: type: boolean is_lifetime: type: boolean payment_method: type: string payment_reference: type: string plan_category: type: string plan_id: type: integer plan_name: type: string price: type: number starts_at: type: string status: type: string updated_at: type: string user_id: type: integer type: object domain.AffiliateApplicationInput: properties: accept_terms: type: boolean application: type: string terms_version: type: string type: object domain.AffiliateBalance: properties: available: type: string currency: type: string paid: type: string pending: type: string recovery_due: type: string reserved: type: string reversed: type: string type: object domain.AffiliateCommission: properties: amount: type: string available_at: type: string commission_percent: type: string course_id: type: integer created_at: type: string currency: type: string id: type: integer payment_id: type: integer payout_id: type: integer referrer_id: type: integer reversal_reason: type: string reversed_at: type: string status: type: string type: object domain.AffiliateCommissionData: properties: items: items: $ref: '#/definitions/domain.AffiliateCommission' type: array limit: type: integer offset: type: integer total_count: type: integer type: object domain.AffiliateDashboard: properties: balances: items: $ref: '#/definitions/domain.AffiliateBalance' type: array converted_referrals: type: integer profile: $ref: '#/definitions/domain.AffiliateProfile' settings: $ref: '#/definitions/domain.AffiliateSettings' share_url: type: string terms: $ref: '#/definitions/domain.AffiliateTerms' total_referrals: type: integer type: object domain.AffiliateEvent: properties: actor_id: type: integer affiliate_user_id: type: integer created_at: type: string details: description: Event-specific audit fields, such as from/to status, note, payout_id, commission_id, and rate snapshots. type: object event: type: string id: type: integer type: object domain.AffiliateEventData: properties: items: items: $ref: '#/definitions/domain.AffiliateEvent' type: array limit: type: integer offset: type: integer type: object domain.AffiliateListData: properties: items: items: $ref: '#/definitions/domain.AffiliateProfile' type: array limit: type: integer offset: type: integer total_count: type: integer type: object domain.AffiliateMutationData: properties: id: type: integer type: object domain.AffiliatePayout: properties: account_name: type: string account_reference: type: string amount: type: string created_at: type: string currency: type: string id: type: integer method: type: string payment_reference: type: string review_note: type: string reviewed_at: type: string status: type: string user_id: type: integer type: object domain.AffiliatePayoutData: properties: items: items: $ref: '#/definitions/domain.AffiliatePayout' type: array limit: type: integer offset: type: integer total_count: type: integer type: object domain.AffiliatePayoutInput: properties: account_name: type: string account_reference: type: string currency: type: string method: enum: - BANK - MOBILE_MONEY type: string type: object domain.AffiliatePayoutReviewInput: properties: note: type: string payment_reference: type: string status: enum: - PAID - REJECTED type: string type: object domain.AffiliateProfile: properties: application: type: string code: type: string created_at: type: string email: type: string first_name: type: string last_name: type: string review_note: type: string status: type: string terms_accepted_at: type: string terms_version: type: string updated_at: type: string user_id: type: integer type: object domain.AffiliateReversalInput: properties: reason: type: string type: object domain.AffiliateReviewInput: properties: note: type: string status: enum: - APPROVED - REJECTED - SUSPENDED type: string type: object domain.AffiliateSettings: properties: attribution_days: type: integer commission_mode: type: string commission_percent: type: string holding_days: type: integer share_base_url: type: string updated_at: type: string type: object domain.AffiliateSettingsInput: properties: attribution_days: maximum: 365 minimum: 1 type: integer commission_mode: enum: - FIRST_PURCHASE - EVERY_COURSE type: string commission_percent: maximum: 100 minimum: 0 type: number holding_days: maximum: 365 minimum: 0 type: integer share_base_url: type: string type: object domain.AffiliateTerms: properties: rules: items: type: string type: array version: type: string type: object 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.AnalyticsContentSection: properties: question_sets_by_type: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array questions_by_type: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array total_question_sets: type: integer total_questions: type: integer type: object domain.AnalyticsCoursesSection: properties: exam_prep: $ref: '#/definitions/domain.AnalyticsExamPrepContentCounts' total_categories: description: Top-level summary fields preserve the dashboard contract using the unified hierarchy. type: integer total_courses: type: integer total_sub_courses: type: integer total_videos: type: integer type: object domain.AnalyticsDashboard: properties: content: $ref: '#/definitions/domain.AnalyticsContentSection' courses: $ref: '#/definitions/domain.AnalyticsCoursesSection' date_filter: $ref: '#/definitions/domain.AnalyticsDateFilter' generated_at: type: string issues: $ref: '#/definitions/domain.AnalyticsIssuesSection' notifications: $ref: '#/definitions/domain.AnalyticsNotificationsSection' payments: $ref: '#/definitions/domain.AnalyticsPaymentsSection' subscriptions: $ref: '#/definitions/domain.AnalyticsSubscriptionsSection' team: $ref: '#/definitions/domain.AnalyticsTeamSection' users: $ref: '#/definitions/domain.AnalyticsUsersSection' videos: $ref: '#/definitions/domain.AnalyticsVideosSection' type: object domain.AnalyticsDateFilter: properties: from: type: string mode: type: string month: type: integer payment_method: type: string range_end: type: string range_start: type: string ref_date: type: string series_end: type: string series_start: type: string timezone: type: string to: type: string year: type: integer type: object domain.AnalyticsExamPrepContentCounts: properties: catalog_courses: type: integer lesson_practices: type: integer lessons: type: integer lessons_with_video: type: integer unit_modules: type: integer units: type: integer type: object domain.AnalyticsIssuesSection: properties: by_status: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_type: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array resolution_rate: type: number resolved_issues: type: integer total_issues: type: integer type: object domain.AnalyticsLabelAmount: properties: amount: type: number count: type: integer label: type: string type: object domain.AnalyticsLabelCount: properties: count: type: integer label: type: string type: object domain.AnalyticsMonthlyRevenuePoint: properties: currency: type: string label: description: Short English month label, e.g. Jan type: string month: description: 1–12 type: integer month_start: description: UTC date of month start (for sorting / tooltips) type: string revenue: description: SUCCESS payments aggregate for that bucket type: number type: object domain.AnalyticsNotificationsSection: properties: by_channel: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_type: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array read_count: type: integer total_sent: type: integer unread_count: type: integer type: object domain.AnalyticsPaymentsSection: properties: avg_transaction_value: type: number by_method: items: $ref: '#/definitions/domain.AnalyticsLabelAmount' type: array by_status: items: $ref: '#/definitions/domain.AnalyticsLabelAmount' type: array monthly_revenue_year: description: MonthlyRevenueYear is set when RevenueMonthly is non-empty (the calendar year of those buckets). type: integer revenue_last_30_days: items: $ref: '#/definitions/domain.AnalyticsRevenueTimePoint' type: array revenue_monthly: description: RevenueMonthly is populated only when the request includes year=..., with 12 months (possibly multiple currencies per month). items: $ref: '#/definitions/domain.AnalyticsMonthlyRevenuePoint' type: array successful_payments: type: integer total_payments: type: integer total_revenue: type: number type: object domain.AnalyticsRevenueByPlan: properties: currency: type: string plan_name: type: string revenue: type: number type: object domain.AnalyticsRevenueTimePoint: properties: date: type: string revenue: type: number type: object domain.AnalyticsSubscriptionRenewal: properties: avg_days_to_resubscribe: type: number expired_in_period: type: integer first_time_subscriptions: type: integer median_days_to_resubscribe: type: number renewal_rate: description: 0–1; renewed_after_expiry / expired_in_period type: number renewed_after_expiry: type: integer resubscribe_after_expiry: type: integer returning_subscriptions: type: integer type: object domain.AnalyticsSubscriptionSnapshot: properties: active_learners: type: integer active_now: type: integer auto_renew_enabled: type: integer cancelled_now: type: integer expired_now: type: integer expiring_within_7_days: type: integer expiring_within_30_days: type: integer lifetime_active: type: integer pending_now: type: integer term_active: type: integer type: object domain.AnalyticsSubscriptionsSection: properties: acquisition_by_source: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array active_by_category: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array active_by_lifetime: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array active_by_plan: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array active_subscriptions: type: integer by_status: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array cancellations_last_30_days: items: $ref: '#/definitions/domain.AnalyticsTimePoint' type: array expirations_last_30_days: items: $ref: '#/definitions/domain.AnalyticsTimePoint' type: array new_by_cohort: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array new_month: type: integer new_subscriptions_last_30_days: items: $ref: '#/definitions/domain.AnalyticsTimePoint' type: array new_today: type: integer new_week: type: integer renewal: allOf: - $ref: '#/definitions/domain.AnalyticsSubscriptionRenewal' description: Resubscribe / renewal behaviour resubscriptions_last_30_days: items: $ref: '#/definitions/domain.AnalyticsTimePoint' type: array revenue_by_category: items: $ref: '#/definitions/domain.AnalyticsLabelAmount' type: array revenue_by_plan: items: $ref: '#/definitions/domain.AnalyticsRevenueByPlan' type: array snapshot: allOf: - $ref: '#/definitions/domain.AnalyticsSubscriptionSnapshot' description: Learner subscription behaviour total_subscriptions: type: integer type: object domain.AnalyticsTeamSection: properties: by_role: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_status: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array total_members: type: integer type: object domain.AnalyticsTimePoint: properties: count: type: integer date: type: string type: object domain.AnalyticsUsersSection: properties: by_age_group: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_country: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_education_level: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_gender: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_knowledge_level: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_language_challange: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_learning_goal: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_occupation: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_region: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_role: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array by_status: items: $ref: '#/definitions/domain.AnalyticsLabelCount' type: array new_month: type: integer new_today: type: integer new_week: type: integer registrations_last_30_days: items: $ref: '#/definitions/domain.AnalyticsTimePoint' type: array total_users: type: integer type: object domain.AnalyticsVideoDropOffPoint: properties: checkpoint_percent: type: integer drop_off_rate: type: number total_sessions: type: integer viewers_reached: type: integer type: object domain.AnalyticsVideosSection: properties: completed_sessions: type: integer completion_rate: type: number drop_off_by_checkpoint: items: $ref: '#/definitions/domain.AnalyticsVideoDropOffPoint' type: array replay_rate: type: number replay_sessions: type: integer total_watch_sessions: type: integer unique_video_starts: type: integer users_who_replayed: type: integer type: object domain.AuthorizeChapaDirectChargeResponse: properties: message: type: string payment_id: type: integer success: type: boolean type: object domain.BulkAccountsByRoleRequest: properties: exclude_team_member_id: type: integer type: object domain.BulkDeactivateAccountsByRoleResult: properties: role: type: string team_members_deactivated: type: integer users_deactivated: type: integer type: object domain.BulkReactivateAccountsByRoleResult: properties: role: type: string team_members_reactivated: type: integer users_reactivated: type: integer type: object domain.ChapaDirectChargeMethod: properties: auth_type: description: '"ussd" or "otp"' type: string display_name: type: string name: type: string type: object domain.ChapaPaymentMethod: properties: display_name: type: string name: type: string type: object domain.ChapaWebhookPayload: properties: amount: type: string currency: type: string event: type: string mode: type: string payment_method: type: string reference: type: string status: type: string tx_ref: type: string type: type: string type: object domain.CompletePracticeInput: properties: parent_id: type: integer parent_kind: type: string type: object domain.ContentAccessTier: enum: - INHERIT - FREE - PREMIUM type: string x-enum-varnames: - ContentAccessInherit - ContentAccessFree - ContentAccessPremium domain.ContentPublishStatus: enum: - DRAFT - PUBLISHED type: string x-enum-varnames: - ContentPublishDraft - ContentPublishPublished domain.CourseCheckoutRequest: properties: phone: type: string referral_code: type: string type: object domain.CourseCheckoutResponse: properties: amount: type: number course_id: type: integer currency: type: string payment_id: type: integer payment_url: type: string session_id: type: string type: object domain.CreateCourseInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string description: type: string name: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: description: SortOrder within the program when set; omit to append after current max within program_id (uniqueness is per-program). minimum: 0 type: integer thumbnail: type: string required: - name type: object domain.CreateExamPrepCatalogCourseInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string currency: type: string description: type: string name: type: string price: maximum: 9.99999999999e+09 minimum: 0 type: number publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string thumbnail: type: string required: - name type: object domain.CreateExamPrepLessonInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium - INHERIT - inherit type: string description: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string thumbnail: type: string title: type: string video_url: type: string required: - title type: object domain.CreateExamPrepModuleInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium - INHERIT - inherit type: string description: type: string icon: type: string name: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string thumbnail: type: string required: - name type: object domain.CreateExamPrepPracticeInput: properties: parent_id: type: integer parent_kind: description: ParentKind and ParentID are accepted for backward compatibility when parents is omitted. enum: - COURSE - CHAPTER - LESSON type: string parents: description: Parents optionally attaches the practice to catalog course, unit, or lesson. Omit or null to create unlinked. items: $ref: '#/definitions/domain.ExamPrepPracticeParent' type: array persona_id: type: integer publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string required: - question_set_id type: object domain.CreateExamPrepUnitInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium - INHERIT - inherit type: string description: type: string name: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: description: SortOrder within the catalog course when set; omit to append after current max sort_order within catalog_course_id. minimum: 0 type: integer thumbnail: type: string required: - name type: object domain.CreateLessonInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string description: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: description: SortOrder within the module when set; omit to append after current max within module_id. minimum: 0 type: integer thumbnail: type: string title: type: string video_url: type: string required: - title type: object domain.CreateLmsPersonaInput: properties: description: type: string gender: type: string is_active: type: boolean name: type: string profile_picture: type: string required: - name type: object domain.CreateModuleInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string description: type: string icon: type: string name: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: description: SortOrder within the course when set; omit to append after current max within course_id (uniqueness is per-course). minimum: 0 type: integer required: - name type: object domain.CreatePracticeInput: properties: parent_id: type: integer parent_kind: allOf: - $ref: '#/definitions/domain.ParentKind' description: ParentKind and ParentID are accepted for backward compatibility when parents is omitted. enum: - COURSE - MODULE - LESSON parents: description: Parents optionally attaches the practice to hierarchy entities. Omit or null to create unlinked. items: $ref: '#/definitions/domain.PracticeParent' type: array persona_id: type: integer publish_status: description: Omit or empty for backward compatibility defaults to PUBLISHED; set DRAFT to save hidden from learners until published. enum: - DRAFT - draft - PUBLISHED - published type: string question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string required: - question_set_id type: object domain.CreateProgramInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string category: enum: - EDUCATION type: string description: type: string name: type: string publish_status: description: Omit or empty defaults to DRAFT; set PUBLISHED to make visible to learners immediately. enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: description: SortOrder inserts at this global program order when set; omit to append after current max (sort_order uniqueness is enforced). minimum: 0 type: integer thumbnail: type: string required: - category - name type: object domain.CreateQuestionOptionInput: properties: isCorrect: type: boolean optionOrder: format: int32 type: integer optionText: type: string type: object domain.CreateRoleReq: properties: description: type: string name: maxLength: 100 minLength: 2 type: string required: - name type: object domain.CreateShortAnswerInput: properties: acceptableAnswer: type: string matchType: type: string type: object domain.CreateTeamMemberReq: properties: bio: type: string department: type: string email: type: string emergency_contact: type: string employment_type: type: string first_name: type: string hire_date: description: YYYY-MM-DD type: string job_title: type: string last_name: type: string password: minLength: 8 type: string permissions: items: type: string type: array phone_number: type: string profile_picture_url: type: string team_role: type: string work_phone: type: string required: - email - first_name - last_name - password - team_role type: object domain.DeliveryChannel: enum: - email - sms - push - in_app type: string x-enum-varnames: - DeliveryChannelEmail - DeliveryChannelSMS - DeliveryChannelPush - DeliveryChannelInApp domain.DynamicElementDefinition: properties: config: additionalProperties: true type: object id: type: string kind: type: string label: type: string required: type: boolean type: object domain.DynamicElementInstance: properties: id: type: string kind: type: string meta: additionalProperties: true type: object value: description: 'Component-specific JSON value selected by kind: string, number, boolean, object, array, or null. Use the component catalog and definition schema to interpret it.' x-json-types: string|number|boolean|object|array|null type: object domain.DynamicQuestionPayload: properties: response: items: $ref: '#/definitions/domain.DynamicElementInstance' type: array stimulus: items: $ref: '#/definitions/domain.DynamicElementInstance' type: array type: object domain.EmploymentType: enum: - full_time - part_time - contract - intern type: string x-enum-varnames: - EmploymentTypeFullTime - EmploymentTypePartTime - EmploymentTypeContract - EmploymentTypeIntern domain.ErrorResponse: properties: error: type: string message: type: string type: object domain.ExamPrepCatalogCourse: properties: access: $ref: '#/definitions/domain.LMSEntityAccess' access_tier: $ref: '#/definitions/domain.ContentAccessTier' chapters_count: type: integer created_at: type: string currency: type: string description: type: string effective_access_tier: $ref: '#/definitions/domain.ContentAccessTier' has_practice: type: boolean id: type: integer is_archived: type: boolean lessons_count: type: integer name: type: string price: type: number publish_status: $ref: '#/definitions/domain.ContentPublishStatus' sort_order: type: integer thumbnail: type: string updated_at: type: string type: object domain.ExamPrepLesson: properties: access: $ref: '#/definitions/domain.LMSEntityAccess' access_tier: $ref: '#/definitions/domain.ContentAccessTier' chapter_id: type: integer created_at: type: string description: type: string effective_access_tier: $ref: '#/definitions/domain.ContentAccessTier' has_practice: type: boolean id: type: integer publish_status: $ref: '#/definitions/domain.ContentPublishStatus' sort_order: type: integer thumbnail: type: string title: type: string updated_at: type: string video_url: type: string type: object domain.ExamPrepPractice: properties: authoring_profile: $ref: '#/definitions/domain.PracticeAuthoringProfile' created_at: type: string id: type: integer lesson_id: type: integer parents: items: $ref: '#/definitions/domain.ExamPrepPracticeParent' type: array persona_id: type: integer publish_status: $ref: '#/definitions/domain.PracticePublishStatus' question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string updated_at: type: string type: object domain.ExamPrepPracticeParent: properties: parent_id: type: integer parent_kind: enum: - COURSE - CHAPTER - LESSON type: string type: object domain.ExamPrepProgressSummary: properties: courses: items: $ref: '#/definitions/domain.ExamPrepProgressSummaryCatalogCourse' type: array type: object domain.ExamPrepProgressSummaryCatalogCourse: properties: access: $ref: '#/definitions/domain.LMSEntityAccess' chapters: items: $ref: '#/definitions/domain.ExamPrepProgressSummaryUnit' type: array id: type: integer name: type: string type: object domain.ExamPrepProgressSummaryLesson: properties: access: $ref: '#/definitions/domain.LMSEntityAccess' chapter_id: type: integer id: type: integer title: type: string type: object domain.ExamPrepProgressSummaryUnit: properties: access: $ref: '#/definitions/domain.LMSEntityAccess' course_id: type: integer id: type: integer lessons: items: $ref: '#/definitions/domain.ExamPrepProgressSummaryLesson' type: array name: type: string type: object domain.ExamPrepUnit: properties: access: $ref: '#/definitions/domain.LMSEntityAccess' access_tier: $ref: '#/definitions/domain.ContentAccessTier' course_id: type: integer created_at: type: string description: type: string effective_access_tier: $ref: '#/definitions/domain.ContentAccessTier' has_practice: type: boolean id: type: integer lessons_count: type: integer name: type: string practices_count: type: integer publish_status: $ref: '#/definitions/domain.ContentPublishStatus' sort_order: type: integer thumbnail: type: string updated_at: type: string type: object domain.FullUpdatePracticeInput: properties: practice: $ref: '#/definitions/domain.FullUpdatePracticeShellInput' question_set: $ref: '#/definitions/domain.FullUpdateQuestionSetInput' questions: items: $ref: '#/definitions/domain.FullUpdatePracticeQuestionItem' type: array stimulus_blocks: items: $ref: '#/definitions/domain.FullUpdateStimulusBlockItem' type: array type: object domain.FullUpdatePracticeQuestionItem: properties: associated_question_id: type: integer audio_correct_answer_text: type: string difficulty_level: type: string display_order: type: integer dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' explanation: type: string id: type: integer image_url: type: string options: items: $ref: '#/definitions/domain.CreateQuestionOptionInput' type: array points: type: integer question_text: type: string question_type: type: string question_type_definition_id: type: integer sample_answer_voice_prompt: type: string short_answers: items: $ref: '#/definitions/domain.CreateShortAnswerInput' type: array status: type: string stimulus_block_key: type: string tips: type: string voice_prompt: type: string type: object domain.FullUpdatePracticeShellInput: properties: authoring_profile: type: string persona_id: type: integer publish_status: type: string question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string type: object domain.FullUpdateQuestionSetInput: properties: banner_image: type: string description: type: string intro_video_url: type: string passing_score: type: integer persona: type: string shuffle_questions: type: boolean status: type: string time_limit_minutes: type: integer title: type: string type: object domain.FullUpdateStimulusBlockItem: properties: block_key: type: string display_order: type: integer stimulus: items: $ref: '#/definitions/domain.DynamicElementInstance' type: array type: object domain.InitiateChapaDirectChargeResponse: properties: amount: type: number auth_type: description: ussd | otp type: string chapa_reference: type: string currency: type: string expires_at: type: string message: type: string payment_id: type: integer portal_html: type: string request_id: description: OTP flows only type: string requires_authorize: type: boolean session_id: description: tx_ref for verify polling type: string type: object domain.InitiateDirectPaymentResponse: properties: amount: type: number currency: type: string message: type: string payment_id: type: integer requires_otp: type: boolean session_id: type: string type: object domain.InitiateSubscriptionPaymentResponse: properties: amount: type: number currency: type: string expires_at: type: string free_enrollment: type: boolean payment_id: type: integer payment_url: type: string session_id: type: string subscription_id: type: integer type: object domain.InviteTeamMemberReq: properties: email: type: string team_role: type: string required: - email - team_role type: object domain.InviteTeamMemberRes: properties: email: type: string expires_at: type: string invitation_id: type: integer team_member_id: type: integer type: object domain.LMSEntityAccess: properties: completed_count: type: integer is_accessible: type: boolean is_completed: type: boolean progress_percent: type: integer progress_percent_precise: type: number reason: type: string total_count: type: integer type: object domain.LinkExamPrepAssessmentInput: properties: parent_id: type: integer parent_kind: enum: - CATALOG_COURSE - UNIT - MODULE - LESSON type: string question_set_id: type: integer required: - parent_id - parent_kind - question_set_id type: object domain.LmsPersona: properties: created_at: type: string description: type: string gender: description: Gender matches learner-style free text (nullable); always present in JSON for stable list payloads. type: string id: type: integer is_active: type: boolean name: type: string profile_picture: description: ProfilePicture is always serialized (null when not set); clients rely on stable keys in list payloads. type: string updated_at: 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.MobileAppVersionCheckResult: properties: client_version_code: type: integer force_update: type: boolean latest_version_code: type: integer latest_version_name: type: string platform: type: string release_notes: type: string store_url: type: string update_available: type: boolean update_type: type: string type: object domain.Notification: properties: delivery_channel: $ref: '#/definitions/domain.DeliveryChannel' delivery_status: $ref: '#/definitions/domain.NotificationDeliveryStatus' error_severity: $ref: '#/definitions/domain.NotificationErrorSeverity' expires: type: string id: type: string image: type: string is_read: type: boolean level: $ref: '#/definitions/domain.NotificationLevel' metadata: description: Free-form notification metadata supplied by the sending application. Keys are application-defined. type: object payload: $ref: '#/definitions/domain.NotificationPayload' priority: type: integer receiver_type: $ref: '#/definitions/domain.ReceiverType' reciever: $ref: '#/definitions/domain.NotificationRecieverSide' recipient_id: type: integer timestamp: type: string type: $ref: '#/definitions/domain.NotificationType' type: object domain.NotificationDeliveryScheme: enum: - bulk - single type: string x-enum-varnames: - NotificationDeliverySchemeBulk - NotificationDeliverySchemeSingle domain.NotificationDeliveryStatus: enum: - pending - sent - failed type: string x-enum-varnames: - DeliveryStatusPending - DeliveryStatusSent - DeliveryStatusFailed domain.NotificationErrorSeverity: enum: - low - medium - high - critical - fatal type: string x-enum-varnames: - NotificationErrorSeverityLow - NotificationErrorSeverityMedium - NotificationErrorSeverityHigh - NotificationErrorSeverityCritical - NotificationErrorSeverityFatal domain.NotificationLevel: enum: - info - error - warning - success type: string x-enum-varnames: - NotificationLevelInfo - NotificationLevelError - NotificationLevelWarning - NotificationLevelSuccess domain.NotificationPayload: properties: headline: type: string message: type: string tags: items: type: string type: array type: object domain.NotificationRecieverSide: enum: - admin - customer - cashier - branch_manager - team_member type: string x-enum-varnames: - NotificationRecieverSideAdmin - NotificationRecieverSideCustomer - NotificationRecieverSideCashier - NotificationRecieverSideBranchManager - NotificationRecieverSideTeamMember domain.NotificationType: enum: - knowledge_level_update - payment_verified - subscription_activated - course_created - sub_course_created - video_added - issue_status_updated - issue_created - admin_created - team_member_created - user_deleted - system_alert - user_welcome - module_completed - course_completed - program_completed - subscription_expiring type: string x-enum-varnames: - NOTIFICATION_TYPE_KNOWLEDGE_LEVEL_UPDATE - NOTIFICATION_TYPE_PAYMENT_VERIFIED - NOTIFICATION_TYPE_SUBSCRIPTION_ACTIVATED - NOTIFICATION_TYPE_COURSE_CREATED - NOTIFICATION_TYPE_SUB_COURSE_CREATED - NOTIFICATION_TYPE_VIDEO_ADDED - NOTIFICATION_TYPE_ISSUE_STATUS_UPDATED - NOTIFICATION_TYPE_ISSUE_CREATED - NOTIFICATION_TYPE_ADMIN_CREATED - NOTIFICATION_TYPE_TEAM_MEMBER_CREATED - NOTIFICATION_TYPE_USER_DELETED - NOTIFICATION_TYPE_SYSTEM_ALERT - NOTIFICATION_TYPE_USER_WELCOME - NOTIFICATION_TYPE_MODULE_COMPLETED - NOTIFICATION_TYPE_COURSE_COMPLETED - NOTIFICATION_TYPE_PROGRAM_COMPLETED - NOTIFICATION_TYPE_SUBSCRIPTION_EXPIRING domain.Pagination: properties: current_page: type: integer limit: type: integer total: type: integer total_pages: type: integer type: object domain.ParentKind: enum: - COURSE - MODULE - LESSON type: string x-enum-varnames: - ParentKindCourse - ParentKindModule - ParentKindLesson domain.Permission: properties: created_at: type: string description: type: string group_name: type: string id: type: integer key: type: string name: type: string type: object domain.PracticeAuthoringProfile: enum: - STANDALONE - IELTS_SHARED_STIMULUS type: string x-enum-varnames: - PracticeAuthoringProfileStandalone - PracticeAuthoringProfileIELTSSharedStimulus domain.PracticeByQuestionTypeDefinition: properties: created_at: type: string exam_prep_lesson_id: type: integer exam_prep_parents: items: $ref: '#/definitions/domain.ExamPrepPracticeParent' type: array matching_question_count: type: integer parents: items: $ref: '#/definitions/domain.PracticeParent' type: array persona_id: type: integer practice_id: type: integer practice_kind: type: string publish_status: $ref: '#/definitions/domain.PracticePublishStatus' question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string updated_at: type: string type: object domain.PracticeParent: properties: parent_id: type: integer parent_kind: $ref: '#/definitions/domain.ParentKind' type: object domain.PracticePublishStatus: enum: - DRAFT - PUBLISHED type: string x-enum-varnames: - PracticePublishDraft - PracticePublishPublished domain.PracticeStimulusBlock: properties: block_key: type: string display_order: type: integer id: type: integer stimulus: items: $ref: '#/definitions/domain.DynamicElementInstance' type: array type: object domain.PracticesByQuestionTypeDefinitionSummary: properties: limit: type: integer offset: type: integer practices: items: $ref: '#/definitions/domain.PracticeByQuestionTypeDefinition' type: array question_type_definition_id: type: integer total_count: type: integer type: object domain.ProfileFieldOptionItem: properties: code: type: string label: type: string type: object domain.ProfileFieldOptionsGrouped: additionalProperties: items: $ref: '#/definitions/domain.ProfileFieldOptionItem' type: array type: object domain.PublicCatalogPage: properties: courses: items: $ref: '#/definitions/domain.PublicCourse' type: array limit: type: integer offset: type: integer total_count: type: integer type: object domain.PublicChapter: properties: description: type: string id: type: integer lessons: items: $ref: '#/definitions/domain.PublicLesson' type: array name: type: string quizzes: items: $ref: '#/definitions/domain.PublicQuiz' type: array type: object domain.PublicCourse: properties: access_tier: enum: - FREE - PREMIUM type: string chapter_count: type: integer currency: type: string description: type: string id: type: integer lesson_count: type: integer name: type: string price: type: number quiz_count: type: integer thumbnail: type: string type: object domain.PublicCourseOutline: properties: access_tier: enum: - FREE - PREMIUM type: string chapter_count: type: integer chapters: items: $ref: '#/definitions/domain.PublicChapter' type: array currency: type: string description: type: string id: type: integer lesson_count: type: integer name: type: string price: type: number quiz_count: type: integer thumbnail: type: string type: object domain.PublicLesson: properties: access_tier: enum: - FREE - PREMIUM type: string description: type: string id: type: integer thumbnail: type: string title: type: string type: object domain.PublicQuiz: properties: id: type: integer question_count: type: integer title: type: string type: object domain.QuestionSetQuestionTypeCount: properties: count: type: integer display_name: type: string key: type: string question_type_definition_id: type: integer type: object domain.QuestionSetQuestionTypesSummary: properties: question_set_id: type: integer question_types: items: $ref: '#/definitions/domain.QuestionSetQuestionTypeCount' type: array total_questions: type: integer type: object domain.QuestionTypeDefinition: properties: CreatedAt: type: string Description: type: string DisplayName: type: string ID: type: integer IsSystem: type: boolean Key: type: string ResponseComponentKinds: items: type: string type: array ResponseSchema: items: $ref: '#/definitions/domain.DynamicElementDefinition' type: array Status: type: string StimulusComponentKinds: items: type: string type: array StimulusSchema: items: $ref: '#/definitions/domain.DynamicElementDefinition' type: array UpdatedAt: type: string group_ids: items: type: integer type: array type: object domain.QuestionTypeDefinitionGroup: properties: created_at: type: string description: type: string display_order: type: integer id: type: integer name: type: string status: type: string updated_at: type: string type: object domain.QuestionTypeDefinitionGroupDetail: properties: created_at: type: string definitions: items: $ref: '#/definitions/domain.QuestionTypeDefinition' type: array description: type: string display_order: type: integer id: type: integer name: type: string status: type: string updated_at: type: string type: object domain.ReceiverType: enum: - user - team_member type: string x-enum-varnames: - ReceiverTypeUser - ReceiverTypeTeamMember domain.RecentActivityCourseRef: properties: id: type: integer name: type: string type: object domain.RecentActivityLessonRef: properties: id: type: integer sort_order: type: integer title: type: string type: object domain.RecentActivityModuleRef: properties: id: type: integer name: type: string sort_order: type: integer type: object domain.RecentActivityPracticeRef: properties: lms_practice_id: type: integer scope: description: lesson | module | course type: string title: type: string type: object domain.RecentActivityProgramRef: properties: id: type: integer name: type: string type: object domain.RegisterUserReq: properties: email: type: string password: type: string phone_number: type: string referral_code: example: ABCDEF0123456789 type: string type: object domain.RenderedEmail: properties: html: type: string subject: type: string text: type: string type: object domain.ReorderIDsRequest: properties: ordered_ids: items: type: integer type: array type: object domain.ResendOtpReq: properties: email: type: string phone_number: type: string type: object domain.Response: properties: message: type: string metadata: description: Optional endpoint-specific metadata; null unless the operation documents a concrete metadata schema. type: object x-nullable: true status_code: type: integer success: type: boolean type: object domain.Role: enum: - SUPER_ADMIN - ADMIN - CONTENT_MANAGER - STUDENT - OPEN_LEARNER - INSTRUCTOR - SUPPORT type: string x-enum-varnames: - RoleSuperAdmin - RoleAdmin - RoleContentManager - RoleStudent - RoleOpenLearner - RoleInstructor - RoleSupport domain.RoleRecord: properties: created_at: type: string description: type: string id: type: integer is_system: type: boolean name: type: string updated_at: type: string type: object domain.RoleWithPermissions: properties: created_at: type: string description: type: string id: type: integer is_system: type: boolean name: type: string permissions: items: $ref: '#/definitions/domain.Permission' type: array updated_at: type: string type: object domain.SMSProvider: enum: - afro_message type: string x-enum-varnames: - AfroMessage domain.SaveSettingListReq: properties: amount_for_bet_referral: type: number bet_amount_limit: type: number bet_duplicate_limit: type: integer cashback_amount_cap: type: number cashback_percentage: type: number daily_ticket_limit: type: integer default_max_referrals: type: integer default_winning_limit: type: integer max_number_of_outcomes: type: integer max_unsettled_bets: type: integer minimum_bet_amount: type: number referral_reward_amount: type: number send_email_on_bet_finish: type: boolean send_sms_on_bet_finish: type: boolean sms_provider: type: string total_winning_limit: type: number total_winning_notify: type: number welcome_bonus_active: type: boolean welcome_bonus_cap: type: number welcome_bonus_count: type: integer welcome_bonus_expiry: type: integer welcome_bonus_multiplier: type: number type: object domain.ScheduledNotification: properties: attempt_count: type: integer cancelled_at: type: string channel: $ref: '#/definitions/domain.DeliveryChannel' created_at: type: string created_by: description: team_members.id of the staff actor who scheduled the job type: integer email_template_slug: type: string email_template_variables: description: Free-form template variable object. Keys are defined by the selected email template. type: object html: type: string id: type: integer last_error: type: string message: type: string processing_started_at: type: string scheduled_at: type: string sent_at: type: string status: $ref: '#/definitions/domain.ScheduledNotificationStatus' target_raw: description: 'Optional extra targets: phones and emails arrays, team_member_ids array, team_role, level, and type strings.' type: object target_role: type: string target_team_member_ids: items: type: integer type: array target_team_role: type: string target_user_ids: items: type: integer type: array title: type: string updated_at: type: string type: object domain.ScheduledNotificationStatus: enum: - pending - processing - sent - failed - cancelled type: string x-enum-varnames: - ScheduledStatusPending - ScheduledStatusProcessing - ScheduledStatusSent - ScheduledStatusFailed - ScheduledStatusCancelled domain.SetRolePermissionsReq: properties: permission_ids: items: type: integer type: array required: - permission_ids type: object domain.SettingListRes: properties: amount_for_bet_referral: type: number bet_amount_limit: type: number bet_duplicate_limit: type: integer cashback_amount_cap: type: number cashback_percentage: type: number daily_ticket_limit: type: integer default_max_referrals: type: integer default_winning_limit: type: integer max_number_of_outcomes: type: integer max_unsettled_bets: type: integer minimum_bet_amount: type: number referral_reward_amount: type: number send_email_on_bet_finish: type: boolean send_sms_on_bet_finish: type: boolean sms_provider: $ref: '#/definitions/domain.SMSProvider' total_winning_limit: type: number total_winning_notify: type: number welcome_bonus_active: type: boolean welcome_bonus_cap: type: number welcome_bonus_count: type: integer welcome_bonus_expiry: type: integer welcome_bonus_multiplier: type: number type: object domain.SettingRes: properties: key: type: string updated_at: type: string value: type: string type: object domain.TeamMemberLoginReq: properties: email: type: string password: type: string required: - email - password type: object domain.TeamMemberResponse: properties: bio: type: string created_at: type: string department: type: string email: type: string email_verified: type: boolean employment_type: $ref: '#/definitions/domain.EmploymentType' first_name: type: string hire_date: type: string id: type: integer job_title: type: string last_login: type: string last_name: type: string permissions: items: type: string type: array phone_number: type: string profile_picture_url: type: string status: $ref: '#/definitions/domain.TeamMemberStatus' team_role: $ref: '#/definitions/domain.TeamRole' updated_at: type: string work_phone: type: string type: object domain.TeamMemberStats: properties: active_count: type: integer inactive_count: type: integer suspended_count: type: integer terminated_count: type: integer total_count: type: integer type: object domain.TeamMemberStatus: enum: - active - inactive - suspended - terminated type: string x-enum-varnames: - TeamMemberStatusActive - TeamMemberStatusInactive - TeamMemberStatusSuspended - TeamMemberStatusTerminated domain.TeamResetPasswordReq: properties: email: type: string otp: type: string password: minLength: 8 type: string required: - email - otp - password type: object domain.TeamRole: enum: - SUPER_ADMIN - ADMIN - CONTENT_MANAGER - SUPPORT_AGENT - INSTRUCTOR - FINANCE - HR - ANALYST type: string x-enum-varnames: - TeamRoleSuperAdmin - TeamRoleAdmin - TeamRoleContentManager - TeamRoleSupportAgent - TeamRoleInstructor - TeamRoleFinance - TeamRoleHR - TeamRoleAnalyst domain.TeamSendPasswordResetReq: properties: email: type: string required: - email type: object domain.TeamVerifyPasswordResetRes: properties: reason: description: missing | invalid | used | expired type: string valid: type: boolean type: object domain.UpdateCourseInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string description: type: string name: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string type: object domain.UpdateExamPrepCatalogCourseInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string currency: type: string description: type: string name: type: string price: maximum: 9.99999999999e+09 minimum: 0 type: number publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string type: object domain.UpdateExamPrepLessonInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium - INHERIT - inherit type: string description: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string title: type: string video_url: type: string type: object domain.UpdateExamPrepModuleInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium - INHERIT - inherit type: string description: type: string icon: type: string name: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string type: object domain.UpdateExamPrepPracticeInput: properties: authoring_profile: enum: - STANDALONE - IELTS_SHARED_STIMULUS type: string persona_id: type: integer publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string type: object domain.UpdateExamPrepPracticeParentsInput: properties: parents: items: $ref: '#/definitions/domain.ExamPrepPracticeParent' type: array required: - parents type: object domain.UpdateExamPrepUnitInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium - INHERIT - inherit type: string description: type: string name: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string type: object domain.UpdateKnowledgeLevelReq: properties: knowledge_level: description: BEGINNER, INTERMEDIATE, ADVANCED type: string user_id: type: integer type: object domain.UpdateLessonInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string description: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string title: type: string video_url: type: string type: object domain.UpdateLmsPersonaInput: properties: description: type: string gender: type: string is_active: type: boolean name: type: string profile_picture: type: string type: object domain.UpdateModuleInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string description: type: string icon: type: string name: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer type: object domain.UpdateMyTeamProfileReq: properties: bio: type: string department: type: string first_name: type: string job_title: type: string last_name: type: string phone_number: type: string profile_picture_url: type: string work_phone: type: string type: object domain.UpdatePracticeInput: properties: authoring_profile: enum: - STANDALONE - IELTS_SHARED_STIMULUS type: string persona_id: type: integer publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string question_set_id: type: integer quick_tips: type: string story_description: type: string story_image: type: string title: type: string type: object domain.UpdatePracticeParentsInput: properties: parents: items: $ref: '#/definitions/domain.PracticeParent' type: array required: - parents type: object domain.UpdateProgramInput: properties: access_tier: enum: - FREE - free - PREMIUM - premium type: string category: enum: - EDUCATION type: string description: type: string name: type: string publish_status: enum: - DRAFT - draft - PUBLISHED - published type: string sort_order: type: integer thumbnail: type: string type: object domain.UpdateRoleReq: properties: description: type: string name: maxLength: 100 minLength: 2 type: string required: - name type: object domain.UpdateTeamMemberReq: properties: bio: type: string department: type: string emergency_contact: type: string employment_type: type: string first_name: type: string hire_date: type: string job_title: type: string last_name: type: string permissions: items: type: string type: array phone_number: type: string profile_picture_url: type: string team_role: type: string work_phone: type: string type: object domain.UpdateTeamMemberStatusReq: properties: status: type: string required: - status 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 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_picture_url: type: string region: type: string type: object domain.UserPersona: properties: DisplayOrder: type: integer FirstName: type: string ID: type: integer LastName: type: string NickName: type: string ProfilePictureURL: type: string Role: type: string type: object domain.UserProfileResponse: properties: active_subscriptions: items: $ref: '#/definitions/domain.UserProfileSubscription' type: array 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 language_challange: type: string language_goal: type: string last_login: type: string last_name: type: string learning_goal: type: string nick_name: description: Profile fields type: string occupation: type: string phone_number: type: string phone_verified: type: boolean preferred_language: type: string profile_completed: type: boolean profile_completion_percentage: type: integer profile_picture_url: type: string region: type: string role: $ref: '#/definitions/domain.Role' status: $ref: '#/definitions/domain.UserStatus' subscription_status: type: string updated_at: type: string type: object domain.UserProfileSubscription: properties: auto_renew: type: boolean category: type: string created_at: type: string currency: type: string duration_unit: type: string duration_value: type: integer expires_at: type: string id: type: integer is_lifetime: type: boolean plan_id: type: integer plan_name: type: string price: type: number starts_at: type: string status: type: string type: object domain.UserRecentActivityFeed: properties: items: items: $ref: '#/definitions/domain.UserRecentActivityItem' type: array user_id: type: integer type: object domain.UserRecentActivityItem: properties: course: $ref: '#/definitions/domain.RecentActivityCourseRef' headline: description: Headline is optional server-rendered primary line (client may ignore and build from refs). type: string id: type: string kind: description: Kind drives default icon treatment on the client (e.g. joined vs completion). type: string lesson: $ref: '#/definitions/domain.RecentActivityLessonRef' module: $ref: '#/definitions/domain.RecentActivityModuleRef' occurred_at: description: OccurredAt is when the platform recorded the event (typically completion time). type: string practice: $ref: '#/definitions/domain.RecentActivityPracticeRef' program: $ref: '#/definitions/domain.RecentActivityProgramRef' type: object domain.UserStatus: enum: - PENDING - ACTIVE - SUSPENDED - DEACTIVATED type: string x-enum-varnames: - UserStatusPending - UserStatusActive - UserStatusSuspended - UserStatusDeactivated domain.UserSummary: properties: active_users: type: integer joined_this_month: type: integer total_users: type: integer type: object domain.VerifyOTPResponse: properties: message: type: string payment_id: type: integer success: type: boolean transaction_id: type: string type: object domain.VerifyOtpReq: properties: email: type: string otp: type: string phone_number: type: string required: - otp type: object domain.VerifyTeamInvitationRes: properties: email: type: string expires_at: type: string needs_profile_setup: type: boolean status: type: string team_role: type: string valid: type: boolean type: object domain.VideoEngagementHeartbeatInput: properties: content_id: type: integer content_kind: enum: - lesson type: string duration_sec: minimum: 0 type: integer ended: type: boolean position_sec: minimum: 0 type: integer required: - content_id - content_kind type: object domain.VideoWatchSessionResponse: properties: completed: type: boolean max_position_sec: type: integer session_id: type: integer session_number: type: integer type: object domain.WebhookRequest: properties: nonce: type: string notificationUrl: type: string paymentMethod: type: string phone: type: string sessionId: type: string totalAmount: type: integer transaction: properties: transactionId: type: string transactionStatus: type: string type: object transactionStatus: type: string uuid: type: string type: object handlers.AddQuestionToSetData: properties: associated_question_id: type: integer display_order: type: integer id: type: integer question_id: type: integer set_id: type: integer 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.CheckProfileCompletedData: properties: is_profile_completed: type: boolean profile_completion_percentage: type: integer type: object handlers.CheckSubscriptionStatusData: properties: has_active_subscription: type: boolean type: object handlers.CheckUserPendingData: properties: is_pending: type: boolean type: object handlers.CountUnreadNotificationsResponse: properties: unread: type: integer 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.CreateAndSendNotification.Request: type: object handlers.CreatePullUploadRequest: properties: description: type: string file_size: type: integer name: type: string source_url: type: string required: - file_size - name - source_url type: object handlers.CreateTusUploadRequest: properties: description: type: string file_size: type: integer name: type: string required: - file_size - name type: object handlers.DeleteEmailTemplateData: properties: id: type: integer type: object handlers.DeleteFAQData: properties: id: type: integer type: object handlers.DeleteInAppNotificationsData: properties: deleted_count: type: integer requested_ids: type: integer type: object handlers.DeleteMyUserAccountData: properties: can_cancel_until_at: type: string grace_period_days: type: integer scheduled_purge_at: type: string type: object handlers.DeleteQuestionTypeDefinitionData: properties: id: type: integer type: object handlers.DeleteQuestionTypeDefinitionGroupData: properties: id: type: integer type: object handlers.GetAllNotificationsResponse: properties: limit: type: integer notifications: items: $ref: '#/definitions/domain.Notification' type: array page: type: integer total_count: type: integer type: object handlers.GetAllUsersData: properties: total: type: integer users: items: $ref: '#/definitions/domain.UserProfileResponse' type: array type: object handlers.GetFileURLData: properties: url: type: string type: object handlers.GetSampleVideoData: properties: iframe: type: string video: $ref: '#/definitions/handlers.VimeoVideoResponse' type: object handlers.GetUserNotificationResponse: properties: limit: type: integer notifications: items: $ref: '#/definitions/domain.Notification' type: array offset: type: integer total_count: type: integer type: object handlers.LinkExamPrepAssessmentData: properties: assessment: $ref: '#/definitions/handlers.RawQuestionSetResponse' parent_id: type: integer parent_kind: type: string type: object handlers.ListAccountDeletionRequestsData: properties: items: items: $ref: '#/definitions/domain.AccountDeletionRequest' type: array page: type: integer page_size: type: integer total: type: integer type: object handlers.ListAllExamPrepPracticesData: properties: limit: type: integer offset: type: integer practices: items: $ref: '#/definitions/domain.ExamPrepPractice' type: array total_count: type: integer type: object handlers.ListExamPrepAssessmentsData: properties: assessments: items: $ref: '#/definitions/handlers.RawQuestionSetResponse' type: array type: object handlers.ListExamPrepPracticesByCatalogCourseData: properties: limit: type: integer offset: type: integer practices: items: $ref: '#/definitions/domain.ExamPrepPractice' type: array total_count: type: integer type: object handlers.ListExamPrepPracticesByLessonData: properties: limit: type: integer offset: type: integer practices: items: $ref: '#/definitions/domain.ExamPrepPractice' type: array total_count: type: integer type: object handlers.ListExamPrepPracticesByUnitData: properties: limit: type: integer offset: type: integer practices: items: $ref: '#/definitions/domain.ExamPrepPractice' type: array total_count: type: integer type: object handlers.ListFieldKeysData: properties: fields: items: type: string type: array type: object handlers.ListRolesData: properties: page: type: integer page_size: type: integer roles: items: $ref: '#/definitions/domain.RoleRecord' type: array total: type: integer type: object handlers.ListScheduledNotificationsResponse: properties: limit: type: integer page: type: integer scheduled_notifications: items: $ref: '#/definitions/domain.ScheduledNotification' type: array total_count: type: integer type: object handlers.MessageAPIResponse: properties: message: type: string status: enum: - success - error type: string timestamp: type: string type: object handlers.MessageResponse: properties: message: type: string metadata: allOf: - $ref: '#/definitions/handlers.NullResponseValue' description: Always null for message-only domain responses. x-nullable: true status_code: type: integer success: type: boolean type: object handlers.NotificationDispatchResponse: properties: message: type: string notification_id: type: string notification_ids: items: type: string type: array recipient_count: type: integer type: object handlers.NullResponseValue: description: Reserved metadata value. Always null; no object properties are returned. type: object handlers.PurgeDueDeletedUsersData: properties: batch_limit: type: integer deleted_count: type: integer type: object handlers.RawQuestionSetResponse: properties: BannerImage: type: string CreatedAt: type: string Description: type: string ID: type: integer IntroVideoURL: type: string OwnerID: type: integer OwnerType: type: string PassingScore: type: integer Persona: type: string SetType: type: string ShuffleQuestions: type: boolean Status: type: string TimeLimitMinutes: type: integer Title: type: string UpdatedAt: type: string UserPersonas: items: $ref: '#/definitions/domain.UserPersona' type: array type: object handlers.ReferralCodeData: properties: code: example: ABCDEF0123456789 type: string required: - code type: object handlers.ReferralCommissionItem: properties: amount: example: "51.25" type: string commission_percent: example: "10.25" type: string created_at: example: "2026-10-28T09:00:00Z" format: date-time type: string currency: example: ETB type: string id: example: 7 type: integer payment_id: example: 42 type: integer reversed_at: description: Null until the qualifying payment leaves SUCCESS; reversed credits no longer contribute to the balance. format: date-time type: string x-nullable: true type: object handlers.ReferralHistoryData: properties: items: items: $ref: '#/definitions/handlers.ReferralHistoryItem' type: array limit: example: 20 type: integer offset: example: 0 type: integer type: object handlers.ReferralHistoryItem: properties: converted: example: true type: boolean created_at: example: "2026-10-28T09:00:00Z" format: date-time type: string id: example: 14 type: integer type: object handlers.ReferralOverviewData: properties: code: example: ABCDEF0123456789 type: string commission_percent: example: "10.25" type: string converted_referrals: example: 3 type: integer total_referrals: example: 12 type: integer wallet: items: $ref: '#/definitions/handlers.ReferralWalletBalance' type: array required: - code type: object handlers.ReferralSettingsData: properties: commission_percent: example: "10.25" type: string updated_at: example: "2026-10-28T09:00:00Z" format: date-time type: string type: object handlers.ReferralWalletBalance: properties: balance: description: Decimal string; balances are not combined across currencies. example: "125.50" type: string currency: example: ETB type: string type: object handlers.ReferralWalletData: properties: balances: items: $ref: '#/definitions/handlers.ReferralWalletBalance' type: array limit: example: 20 type: integer offset: example: 0 type: integer transactions: items: $ref: '#/definitions/handlers.ReferralCommissionItem' type: array type: object handlers.RefreshFileURLData: properties: expires_in: type: integer object_key: type: string url: type: string type: object handlers.RegisterCodeReq: properties: email: example: john.doe@example.com type: string phone_number: example: "1234567890" type: string type: object handlers.RegisterDeviceToken.Request: properties: device_token: type: string platform: enum: - android - ios - web type: string required: - device_token - platform type: object handlers.ResetCodeReq: properties: email: example: john.doe@example.com type: string phone_number: example: "1234567890" type: string type: object handlers.ResetPasswordReq: properties: email: example: john.doe@example.com type: string otp: example: "123456" type: string password: example: newpassword123 minLength: 8 type: string phone_number: example: "1234567890" type: string required: - otp - password type: object handlers.RevokeTeamInvitationData: properties: id: type: integer type: object handlers.SearchUserByNameOrPhoneReq: properties: query: type: string role: $ref: '#/definitions/domain.Role' type: object handlers.SendBulkEmailData: properties: failed: type: integer sent: type: integer team_member_recipients: type: integer total_recipients: type: integer user_recipients: type: integer type: object handlers.SendBulkInAppNotificationData: properties: failed: type: integer sent: type: integer team_member_recipients: type: integer total_recipients: type: integer user_recipients: type: integer type: object handlers.SendBulkPushNotificationData: properties: devices_targeted: type: integer failed: type: integer image: type: string sent: type: integer target_users: type: integer type: object handlers.SendBulkSMSData: properties: failed: type: integer sent: type: integer total_recipients: type: integer type: object handlers.SendSingleAfroSMSReq: properties: message: example: Hello world type: string recipient: example: "+251912345678" type: string required: - message - recipient type: object handlers.SendTestPushNotificationData: properties: devices_count: type: integer image: type: string message: type: string title: type: string type: object handlers.SubmitAudioAnswerData: properties: audio_url: type: string created_at: type: string id: type: integer question_id: type: integer question_set_id: type: integer type: object handlers.UnregisterDeviceToken.Request: properties: device_token: type: string required: - device_token type: object handlers.UpdateQuestionTypeDefinitionData: properties: id: type: integer type: object handlers.UploadAudioData: properties: content_type: type: string object_key: type: string url: type: string type: object handlers.UploadProfilePictureData: properties: profile_picture_url: type: string type: object handlers.ValidateQuestionTypeDefinitionData: properties: valid: type: boolean type: object handlers.VimeoEmbedResponse: properties: embed_html: type: string embed_url: type: string video_id: type: string type: object handlers.VimeoTranscodeStatusData: properties: status: type: string video_id: type: string type: object handlers.VimeoUploadResultData: properties: Link: type: string Status: type: string URI: type: string UploadLink: type: string VimeoID: type: string type: object handlers.VimeoVideoResponse: properties: description: type: string duration: type: integer embed_html: type: string embed_url: type: string height: type: integer link: type: string name: type: string status: type: string thumbnail_url: type: string transcode_status: type: string uri: type: string vimeo_id: type: string width: type: integer type: object handlers.VimeoVideosListMetadata: properties: current_page: type: integer first: type: string last: type: string limit: type: integer next: type: string previous: type: string total: type: integer total_pages: type: integer type: object handlers.activityLogListRes: properties: limit: type: integer logs: items: $ref: '#/definitions/handlers.activityLogRes' type: array offset: type: integer total_count: type: integer type: object handlers.activityLogRes: properties: action: type: string actor_email: type: string actor_id: type: integer actor_kind: type: string actor_name: type: string actor_role: type: string created_at: type: string id: type: integer ip_address: type: string message: type: string metadata: description: Free-form event metadata; keys depend on action and resource_type. Null when the event has no metadata. type: object resource_id: type: integer resource_type: type: string user_agent: type: string type: object handlers.addQuestionToSetReq: properties: associated_question_id: description: Section anchor question in the same set; must have a lower display_order and no association of its own. minimum: 1 type: integer display_order: description: Omit to append after the current highest display_order in the set; set explicitly to insert at a position. minimum: 0 type: integer question_id: type: integer required: - question_id type: object handlers.addUserPersonaReq: properties: display_order: type: integer user_id: type: integer required: - user_id type: object handlers.adminApplySubscriptionReq: properties: plan_id: minimum: 1 type: integer record_payment: description: RecordPayment when omitted defaults to true (record SUCCESS payment at plan price). type: boolean required: - plan_id type: object handlers.adminPaymentListItemRes: properties: amount: type: number course_id: type: integer created_at: type: string currency: type: string expires_at: type: string id: type: integer nonce: type: string paid_at: type: string payment_method: type: string plan_category: type: string plan_id: type: integer plan_name: type: string session_id: type: string status: type: string subscription_id: type: integer transaction_id: type: string updated_at: type: string user_email: type: string user_first_name: type: string user_id: type: integer user_last_name: type: string type: object handlers.adminPaymentRes: properties: amount: type: number course_id: type: integer created_at: type: string currency: type: string expires_at: type: string id: type: integer nonce: type: string paid_at: type: string payment_method: type: string payment_url: type: string plan_category: type: string plan_id: type: integer plan_name: type: string session_id: type: string status: type: string subscription_id: type: integer transaction_id: type: string updated_at: type: string user_email: type: string user_first_name: type: string user_id: type: integer user_last_name: type: string type: object handlers.apiIndexResponse: properties: admin_api: example: /api/v1/admin type: string client_api: example: /api/v1 type: string type: object handlers.applyReferralReq: properties: code: example: ABCDEF0123456789 type: string required: - code type: object handlers.authorizeChapaDirectPaymentReq: properties: otp: type: string request_id: type: string session_id: type: string required: - otp - request_id - session_id type: object handlers.autoRenewReq: properties: auto_renew: type: boolean type: object handlers.changePasswordReq: properties: current_password: example: oldpassword123 type: string new_password: example: newpassword123 minLength: 8 type: string required: - current_password - new_password type: object handlers.chapterListData: properties: chapters: items: $ref: '#/definitions/domain.ExamPrepUnit' type: array limit: type: integer offset: type: integer total_count: type: integer type: object handlers.completePresignedUploadReq: properties: file_size: type: integer media_type: type: string object_key: type: string type: object handlers.componentCatalogRes: properties: response_component_kinds: items: type: string type: array stimulus_component_kinds: items: type: string type: array type: object handlers.courseListData: properties: courses: items: $ref: '#/definitions/domain.ExamPrepCatalogCourse' type: array limit: type: integer offset: type: integer total_count: type: integer type: object handlers.createChapterQuizRequest: properties: publish_status: default: DRAFT enum: - DRAFT - PUBLISHED type: string question_set_id: example: 12 type: integer title: example: Chapter review type: string required: - question_set_id type: object handlers.createEmailTemplateReq: properties: body_html: type: string body_text: type: string name: type: string slug: type: string status: type: string subject: type: string variables: items: type: string type: array required: - body_html - body_text - name - slug - subject type: object handlers.createFAQReq: properties: answer: type: string category: type: string display_order: type: integer question: type: string status: type: string required: - answer - question type: object handlers.createFieldOptionReq: properties: code: type: string display_order: type: integer field_key: type: string label: type: string status: type: string required: - code - field_key - label type: object handlers.createIssueReq: properties: description: type: string issue_type: type: string metadata: additionalProperties: true type: object subject: type: string required: - description - issue_type - subject type: object handlers.createMobileAppVersionReq: properties: min_supported_version_code: type: integer platform: type: string release_notes: type: string status: type: string store_url: type: string update_type: type: string version_code: minimum: 1 type: integer version_name: type: string required: - platform - version_code - version_name type: object handlers.createPlanReq: properties: category: enum: - EDUCATION type: string currency: type: string description: type: string duration_unit: type: string duration_value: type: integer is_active: type: boolean is_free: type: boolean is_lifetime: type: boolean name: type: string price: minimum: 0 type: number required: - category - currency - name type: object handlers.createQuestionReq: properties: audio_correct_answer_text: type: string difficulty_level: type: string dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' explanation: type: string image_url: type: string options: items: $ref: '#/definitions/handlers.optionInput' type: array points: type: integer question_text: type: string question_type: type: string question_type_definition_id: type: integer sample_answer_voice_prompt: type: string short_answers: items: $ref: '#/definitions/handlers.shortAnswerInput' type: array status: type: string tips: type: string voice_prompt: type: string type: object handlers.createQuestionSetReq: properties: banner_image: type: string description: type: string intro_video_url: type: string owner_id: type: integer owner_type: type: string passing_score: type: integer persona: type: string set_type: enum: - PRACTICE - QUIZ - EXAM - SURVEY - CAPSTONE type: string shuffle_questions: type: boolean status: type: string time_limit_minutes: type: integer title: type: string required: - set_type - title type: object handlers.createQuestionTypeDefinitionGroupReq: properties: description: type: string display_order: type: integer name: type: string status: type: string required: - name type: object handlers.createQuestionTypeDefinitionReq: properties: description: type: string display_name: type: string group_ids: items: type: integer type: array key: type: string response_component_kinds: items: type: string type: array response_schema: items: $ref: '#/definitions/domain.DynamicElementDefinition' type: array status: type: string stimulus_component_kinds: items: type: string type: array stimulus_schema: items: $ref: '#/definitions/domain.DynamicElementDefinition' type: array required: - display_name - key type: object handlers.documentAdminGetSampleVideoData: properties: iframe: type: string video: $ref: '#/definitions/handlers.VimeoVideoResponse' type: object handlers.emailTemplateRes: properties: body_html: type: string body_text: type: string created_at: type: string id: type: integer is_system: type: boolean name: type: string slug: type: string status: type: string subject: type: string updated_at: type: string variables: items: type: string type: array type: object handlers.faqRes: properties: answer: type: string category: type: string created_at: type: string display_order: type: integer id: type: integer question: type: string status: type: string updated_at: type: string type: object handlers.fieldOptionRes: properties: code: type: string created_at: type: string display_order: type: integer field_key: type: string id: type: integer label: type: string status: type: string updated_at: type: string type: object handlers.initiateChapaDirectPaymentReq: properties: email: type: string payment_method: type: string phone: type: string plan_id: type: integer required: - email - payment_method - phone - plan_id type: object handlers.initiateDirectPaymentReq: properties: email: type: string payment_method: type: string phone: type: string plan_id: type: integer required: - email - payment_method - phone - plan_id type: object handlers.initiatePaymentReq: properties: email: type: string phone: type: string plan_id: type: integer provider: type: string required: - email - phone - plan_id - provider type: object handlers.issueListRes: properties: issues: items: $ref: '#/definitions/handlers.issueRes' type: array total_count: type: integer type: object handlers.issueRes: properties: created_at: type: string description: type: string id: type: integer issue_type: type: string metadata: additionalProperties: true type: object status: type: string subject: type: string updated_at: type: string user_id: type: integer user_role: type: string type: object handlers.lessonListData: properties: lessons: items: $ref: '#/definitions/domain.ExamPrepLesson' type: array limit: type: integer offset: type: integer total_count: type: integer type: object handlers.listAdminPaymentsRes: properties: limit: type: integer offset: type: integer payments: items: $ref: '#/definitions/handlers.adminPaymentListItemRes' type: array total_count: type: integer type: object handlers.listEmailTemplatesRes: properties: templates: items: $ref: '#/definitions/handlers.emailTemplateRes' type: array total_count: type: integer type: object handlers.listFAQsRes: properties: faqs: items: $ref: '#/definitions/handlers.faqRes' type: array total_count: type: integer type: object handlers.listFieldOptionsRes: properties: options: items: $ref: '#/definitions/handlers.fieldOptionRes' type: array total_count: type: integer type: object handlers.listMobileAppVersionsRes: properties: total_count: type: integer versions: items: $ref: '#/definitions/handlers.mobileAppVersionRes' type: array type: object handlers.listPersonasData: properties: limit: type: integer offset: type: integer personas: items: $ref: '#/definitions/domain.LmsPersona' type: array total_count: type: integer type: object handlers.listQuestionSetsRes: properties: question_sets: items: $ref: '#/definitions/handlers.questionSetRes' type: array total_count: type: integer type: object handlers.listQuestionTypeDefinitionGroupsData: properties: groups: items: $ref: '#/definitions/domain.QuestionTypeDefinitionGroup' type: array limit: type: integer offset: type: integer total_count: type: integer type: object handlers.listQuestionTypeDefinitionsData: properties: limit: type: integer offset: type: integer question_type_definitions: items: $ref: '#/definitions/domain.QuestionTypeDefinition' type: array total_count: type: integer type: object handlers.listQuestionsRes: properties: questions: items: $ref: '#/definitions/handlers.questionRes' type: array total_count: type: integer type: object handlers.listTeamInvitationsRes: properties: invitations: items: $ref: '#/definitions/handlers.teamInvitationListItem' type: array total_count: type: integer 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: device_token: example: type: string refresh_token: example: type: string required: - refresh_token type: object handlers.mobileAppVersionRes: properties: created_at: type: string id: type: integer min_supported_version_code: type: integer platform: type: string release_notes: type: string status: type: string store_url: type: string update_type: type: string updated_at: type: string version_code: type: integer version_name: type: string type: object handlers.optionInput: properties: is_correct: type: boolean option_order: type: integer option_text: type: string required: - option_text type: object handlers.optionRes: properties: id: type: integer is_correct: type: boolean option_order: type: integer option_text: type: string type: object handlers.paginatedQuestionSetItemsRes: properties: limit: type: integer offset: type: integer questions: items: $ref: '#/definitions/handlers.questionSetItemRes' type: array stimulus_blocks: items: $ref: '#/definitions/domain.PracticeStimulusBlock' type: array total_count: type: integer type: object handlers.paymentRes: properties: amount: type: number course_id: type: integer created_at: type: string currency: type: string expires_at: type: string id: type: integer paid_at: type: string payment_method: type: string payment_url: type: string plan_id: type: integer plan_name: type: string session_id: type: string status: type: string subscription_id: type: integer user_id: type: integer type: object handlers.planRes: properties: category: type: string created_at: type: string currency: type: string description: type: string duration_unit: type: string duration_value: type: integer id: type: integer is_active: type: boolean is_free: type: boolean is_lifetime: type: boolean name: type: string price: type: number type: object handlers.presignedUploadReq: properties: content_type: type: string file_size: type: integer filename: type: string media_type: type: string type: object handlers.presignedUploadRes: properties: content_type: type: string expires_in: type: integer media_type: type: string object_key: type: string provider: type: string reference: type: string upload_url: type: string type: object handlers.previewEmailTemplateReq: properties: variables: additionalProperties: {} type: object type: object handlers.questionRes: properties: associated_question_id: type: integer audio_correct_answer_text: type: string created_at: type: string difficulty_level: type: string display_order: type: integer dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' effective_dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' explanation: type: string id: type: integer image_url: type: string options: items: $ref: '#/definitions/handlers.optionRes' type: array points: type: integer prerequisite_question_ids: items: type: integer type: array preview_text: type: string question_text: type: string question_type: type: string question_type_definition_id: type: integer sample_answer_voice_prompt: type: string shared_stimulus: items: $ref: '#/definitions/handlers.questionSharedStimulusRes' type: array short_answers: items: $ref: '#/definitions/handlers.shortAnswerRes' type: array status: type: string stimulus_block_key: type: string tips: type: string voice_prompt: type: string type: object handlers.questionSetItemRes: properties: associated_question_id: type: integer audio_correct_answer_text: type: string difficulty_level: type: string display_order: type: integer dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' effective_dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' explanation: type: string id: type: integer image_url: type: string points: type: integer prerequisite_question_ids: items: type: integer type: array preview_text: type: string question_id: type: integer question_status: type: string question_text: type: string question_type: type: string sample_answer_voice_prompt: type: string set_id: type: integer stimulus_block_key: type: string tips: type: string voice_prompt: type: string type: object handlers.questionSetRes: properties: banner_image: type: string created_at: type: string description: type: string id: type: integer intro_video_url: type: string owner_id: type: integer owner_type: type: string passing_score: type: integer persona: type: string question_count: type: integer set_type: type: string shuffle_questions: type: boolean status: type: string time_limit_minutes: type: integer title: type: string type: object handlers.questionSharedStimulusRes: properties: block_key: type: string display_order: type: integer effective_dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' practice_id: type: integer practice_kind: type: string stimulus: items: $ref: '#/definitions/domain.DynamicElementInstance' type: array type: object handlers.quizFullData: properties: practice: $ref: '#/definitions/domain.ExamPrepPractice' question_set: $ref: '#/definitions/handlers.questionSetRes' questions: items: $ref: '#/definitions/handlers.questionRes' type: array stimulus_blocks: items: $ref: '#/definitions/domain.PracticeStimulusBlock' type: array type: object handlers.quizListData: properties: limit: type: integer offset: type: integer quizzes: items: $ref: '#/definitions/domain.ExamPrepPractice' type: array total_count: type: integer type: object handlers.ratingRes: properties: created_at: type: string id: type: integer review: type: string stars: type: integer target_id: type: integer target_type: type: string updated_at: type: string user_id: type: integer type: object handlers.ratingSummaryRes: properties: average_stars: type: number total_count: type: integer type: object handlers.refreshFileURLReq: properties: reference: type: string type: object handlers.refreshToken: properties: access_token: example: type: string refresh_token: example: type: string required: - access_token - refresh_token type: object handlers.requestCheckoutLinkReq: properties: category: type: string plan_id: type: integer type: object handlers.requestCheckoutLinkRes: properties: channel: type: string destination_hint: type: string type: object handlers.serviceInfoResponse: properties: message: example: Welcome to Rezina Backend API type: string version: example: 1.0.1 type: string type: object handlers.shortAnswerInput: properties: acceptable_answer: type: string match_type: type: string required: - acceptable_answer type: object handlers.shortAnswerRes: properties: acceptable_answer: type: string id: type: integer match_type: type: string type: object handlers.submitRatingReq: properties: review: type: string stars: maximum: 5 minimum: 1 type: integer target_id: type: integer target_type: type: string required: - stars - target_type type: object handlers.subscribeReq: properties: payment_method: type: string payment_reference: type: string plan_id: type: integer required: - plan_id type: object handlers.subscribeWithPaymentReq: properties: email: type: string phone: type: string plan_id: type: integer provider: type: string required: - email - phone - plan_id - provider type: object handlers.subscriptionCheckoutRes: properties: amount: type: number currency: type: string expires_at: type: string free_enrollment: type: boolean payment_id: type: integer payment_url: type: string session_id: type: string subscription: $ref: '#/definitions/handlers.subscriptionRes' subscription_id: type: integer type: object handlers.subscriptionRes: properties: auto_renew: type: boolean category: type: string created_at: type: string currency: type: string duration_unit: type: string duration_value: type: integer expires_at: type: string id: type: integer is_lifetime: type: boolean payment_method: type: string payment_reference: type: string plan_id: type: integer plan_name: type: string price: type: number starts_at: type: string status: type: string user_id: type: integer type: object handlers.teamInvitationListItem: properties: created_at: type: string email: type: string expires_at: type: string first_name: type: string id: type: integer last_name: type: string status: type: string team_member_id: type: integer team_role: type: string type: object handlers.teamMemberLoginRes: properties: access_token: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... type: string member_id: example: 1 type: integer refresh_token: example: type: string team_role: example: admin type: string type: object handlers.teamMemberRefreshReq: properties: refresh_token: type: string required: - 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.updateEmailTemplateReq: properties: body_html: type: string body_text: type: string name: type: string status: type: string subject: type: string variables: items: type: string type: array type: object handlers.updateFAQReq: properties: answer: type: string category: type: string display_order: type: integer question: type: string status: type: string type: object handlers.updateFieldOptionReq: properties: display_order: type: integer label: type: string status: type: string type: object handlers.updateIssueStatusReq: properties: status: enum: - pending - in_progress - resolved - rejected type: string required: - status type: object handlers.updateMobileAppVersionReq: properties: min_supported_version_code: type: integer release_notes: type: string status: type: string store_url: type: string update_type: type: string version_code: type: integer version_name: type: string type: object handlers.updatePlanReq: properties: category: enum: - EDUCATION type: string currency: type: string description: type: string duration_unit: type: string duration_value: type: integer is_active: type: boolean is_free: type: boolean is_lifetime: type: boolean name: type: string price: type: number type: object handlers.updateQuestionOrderReq: properties: associated_question_id: minimum: 1 type: integer display_order: type: integer required: - display_order type: object handlers.updateQuestionReq: properties: audio_correct_answer_text: type: string difficulty_level: type: string dynamic_payload: $ref: '#/definitions/domain.DynamicQuestionPayload' explanation: type: string image_url: type: string options: items: $ref: '#/definitions/handlers.optionInput' type: array points: type: integer question_text: type: string question_type: type: string question_type_definition_id: type: integer sample_answer_voice_prompt: type: string short_answers: items: $ref: '#/definitions/handlers.shortAnswerInput' type: array status: type: string tips: type: string voice_prompt: type: string type: object handlers.updateQuestionSetReq: properties: banner_image: type: string description: type: string intro_video_url: type: string passing_score: type: integer persona: type: string shuffle_questions: type: boolean status: type: string time_limit_minutes: type: integer title: type: string type: object handlers.updateQuestionTypeDefinitionGroupReq: properties: description: type: string display_order: type: integer name: type: string status: type: string type: object handlers.updateQuestionTypeDefinitionReq: type: object handlers.updateReferralSettingsReq: properties: commission_percent: description: Percentage of the qualifying verified course payment, with at most two decimal places. Zero disables new commissions. example: 10.25 maximum: 100 minimum: 0 type: number required: - commission_percent type: object handlers.uploadMediaRes: properties: content_type: type: string embed_url: type: string media_type: type: string object_key: type: string provider: type: string url: type: string vimeo_id: type: string type: object handlers.userPersonaRes: properties: display_order: type: integer first_name: type: string id: type: integer last_name: type: string nick_name: type: string profile_picture_url: type: string role: type: string type: object handlers.validateQuestionTypeDefinitionReq: properties: response_component_kinds: items: type: string type: array stimulus_component_kinds: items: type: string type: array type: object handlers.verifyOTPReq: properties: otp: type: string session_id: type: string required: - otp - session_id type: object response.APIResponse: properties: message: type: string metadata: description: Optional endpoint-specific metadata; omitted when there is no metadata. type: object 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 vimeo.OEmbedResponse: properties: author_name: type: string author_url: type: string description: type: string duration: type: integer height: type: integer html: type: string is_plus: type: string provider_name: type: string provider_url: type: string thumbnail_height: type: integer thumbnail_url: type: string thumbnail_width: type: integer title: type: string type: type: string version: type: string video_id: type: integer width: type: integer type: object info: contact: name: API Support description: Rezina LMS API. Learning content follows course -> chapter -> lesson with chapter-only quizzes and no course category selection. Admin panel endpoints use /api/v1/admin; customer web and mobile endpoints retain /api/v1. Use the audience-specific Swagger pages to browse each API. For protected endpoints, enter Bearer followed by a space and the access token in Authorize. title: Rezina API version: 1.0.1 paths: /: get: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.serviceInfoResponse' summary: Service welcome and version tags: - discovery /api/v1/: get: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.apiIndexResponse' summary: Discover the admin and customer API roots tags: - discovery /api/v1/admin/activity-logs: get: description: Returns a filtered, paginated list of activity logs parameters: - description: Filter by actor ID in: query name: actor_id type: integer - description: Filter by action in: query name: action type: string - description: Filter by resource type in: query name: resource_type type: string - description: Filter by resource ID in: query name: resource_id type: integer - description: Filter logs after this RFC3339 timestamp in: query name: after type: string - description: Filter logs before this RFC3339 timestamp in: query name: before type: string - default: 20 description: Limit in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer - description: Search in: query name: search type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.activityLogListRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get activity logs tags: - activity-logs /api/v1/admin/activity-logs/{id}: get: description: Returns a single activity log entry by its ID parameters: - description: Activity Log ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.activityLogRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get activity log by ID tags: - activity-logs /api/v1/admin/activity-logs/export: get: produces: - text/csv - text/csv responses: "200": description: CSV export; filename is supplied in Content-Disposition headers: Content-Disposition: description: attachment; filename=export.csv type: string schema: type: file "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Export activity logs as CSV (admin) tags: - activity-logs /api/v1/admin/admins: 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 - description: Query in: query name: query type: string - description: Created before in: query name: created_before type: string - description: Created after in: query name: created_after type: string - description: Company id in: query name: company_id type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: items: $ref: '#/definitions/handlers.AdminRes' type: array type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Get all Admins tags: - admins 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/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Create Admin tags: - admins /api/v1/admin/admins/{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: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.AdminRes' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Get admin by id tags: - admins put: consumes: - application/json description: Update Admin parameters: - description: Update Admin in: body name: admin required: true schema: $ref: '#/definitions/handlers.updateAdminReq' - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Update Admin tags: - admins /api/v1/admin/admins/roles/{role}/bulk-deactivate: post: consumes: - application/json description: Sets all platform users with the given users.role to DEACTIVATED (except the caller) and all team_members with the given team_role to inactive. Path :role may be a role key (e.g. INSTRUCTOR, ADMIN) or a decimal RBAC roles.id from GET /api/v1/rbac/roles (resolved to RoleRecord.name uppercased). SUPER_ADMIN cannot be bulk-deactivated. ADMIN platform users must use SUPER_ADMIN to bulk change other platform ADMIN users (team_members with team_role ADMIN under path ADMIN remain allowed). Empty body allowed; optionally pass exclude_team_member_id to skip one team_members row (e.g. yourself). parameters: - description: Role key (INSTRUCTOR etc.) or RBAC roles.id (integer string) in: path name: role required: true type: string - description: Optional exclusions in: body name: body schema: $ref: '#/definitions/domain.BulkAccountsByRoleRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.BulkDeactivateAccountsByRoleResult' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Bulk deactivate accounts by role (SUPER_ADMIN or ADMIN platform users only) tags: - admins /api/v1/admin/admins/roles/{role}/bulk-reactivate: post: consumes: - application/json description: Sets all platform users with the given role from DEACTIVATED to ACTIVE (except the caller) and all team_members with the given team_role from inactive to active. Path :role may be a role key or decimal RBAC roles.id (see bulk-deactivate). Path role must correspond to valid platform users.role or team_members.team_role (after resolving id → name). SUPER_ADMIN cannot be bulk changed. ADMIN callers cannot bulk change other platform ADMIN users (team_members ADMIN under path ADMIN is allowed). Matches only users currently DEACTIVATED and team rows currently inactive. parameters: - description: Role key (INSTRUCTOR etc.) or RBAC roles.id (integer string) in: path name: role required: true type: string - description: Optional exclusions in: body name: body schema: $ref: '#/definitions/domain.BulkAccountsByRoleRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.BulkReactivateAccountsByRoleResult' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Bulk reactivate accounts by role (SUPER_ADMIN or ADMIN platform users only) tags: - admins /api/v1/admin/affiliates: get: description: ADMIN and SUPER_ADMIN only. Returns applications and learner contact details. Optional status is PENDING, APPROVED, REJECTED, or SUSPENDED. Lists return items, total_count, limit, and offset. parameters: - description: Page size (1-100) in: query name: limit type: integer - description: Offset in: query name: offset type: integer - description: Status filter in: query name: status type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateListData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List affiliate applications tags: - affiliates /api/v1/admin/affiliates/{id}/review: put: consumes: - application/json description: 'ADMIN and SUPER_ADMIN only. The path id is the affiliate learner user ID. Allowed transitions: PENDING to APPROVED or REJECTED, APPROVED to SUSPENDED, and SUSPENDED to APPROVED. A 3-2000 character review note is required. Changes are audited.' parameters: - description: Record ID in: path name: id required: true type: integer - description: Request in: body name: body required: true schema: $ref: '#/definitions/domain.AffiliateReviewInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateMutationData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Record not found schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Approve, reject, or suspend an affiliate tags: - affiliates /api/v1/admin/affiliates/commissions: get: description: ADMIN and SUPER_ADMIN only. Lists the course commission ledger across affiliates or for a positive user_id filter. Amount and commission_percent are decimal strings. Includes maturity, payout association, and reversal information. parameters: - description: Page size (1-100) in: query name: limit type: integer - description: Offset in: query name: offset type: integer - description: Affiliate user ID in: query name: user_id type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateCommissionData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List affiliate course commissions tags: - affiliates /api/v1/admin/affiliates/commissions/{id}/reverse: post: consumes: - application/json description: ADMIN and SUPER_ADMIN only. The path id is the commission ID. Requires a 3-2000 character reason. Reversing an earning rejects any pending payout in the same affiliate/currency and releases reservations. Already-paid earnings become recovery debt deducted from future payouts. Repeated reversal is idempotent. This does not refund the learner or revoke course access. parameters: - description: Record ID in: path name: id required: true type: integer - description: Request in: body name: body required: true schema: $ref: '#/definitions/domain.AffiliateReversalInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateMutationData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Record not found schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Reverse an affiliate commission tags: - affiliates /api/v1/admin/affiliates/events: get: description: ADMIN and SUPER_ADMIN only. Returns newest-first application, settings, payout, and commission reversal audit events. Details contain event-specific fields without beneficiary account details. Optional positive user_id filters an affiliate. This list returns items, limit, and offset without a total_count. parameters: - description: Page size (1-100) in: query name: limit type: integer - description: Offset in: query name: offset type: integer - description: Affiliate user ID in: query name: user_id type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateEventData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List affiliate audit events tags: - affiliates /api/v1/admin/affiliates/payouts: get: description: ADMIN and SUPER_ADMIN only. Lists payout requests and beneficiary details. Optional status is REQUESTED, PAID, or REJECTED. Optional positive user_id filters one affiliate. These sensitive records must only be shown to authorized administrators. parameters: - description: Page size (1-100) in: query name: limit type: integer - description: Offset in: query name: offset type: integer - description: Affiliate user ID in: query name: user_id type: integer - description: Status filter in: query name: status type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliatePayoutData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List affiliate payout requests tags: - affiliates /api/v1/admin/affiliates/payouts/{id}/review: put: consumes: - application/json description: ADMIN and SUPER_ADMIN only. The path id is the payout request ID. Review a REQUESTED payout as PAID or REJECTED with a 3-2000 character note. PAID requires an already completed external transfer and a unique 3-120 character payment_reference; this API never sends money. Affiliate must still be approved and active. REJECTED releases reservations. Matching repeated reviews are idempotent; conflicting final-state reviews return 409. parameters: - description: Record ID in: path name: id required: true type: integer - description: Request in: body name: body required: true schema: $ref: '#/definitions/domain.AffiliatePayoutReviewInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateMutationData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Record not found schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Record an externally paid payout or reject a request tags: - affiliates /api/v1/admin/affiliates/settings: get: description: ADMIN and SUPER_ADMIN only. Returns the commission percentage, FIRST_PURCHASE or EVERY_COURSE policy, attribution window, earning hold, and learner share URL base. Initial defaults are 0 percent, FIRST_PURCHASE, 30 attribution days, and 14 holding days. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateSettings' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get affiliate program settings tags: - affiliates put: consumes: - application/json description: ADMIN and SUPER_ADMIN only. Commission percentage is 0-100 with at most two decimals; zero disables future earnings. Attribution is 1-365 days and holding is 0-365 days. FIRST_PURCHASE rewards the first paid purchase; EVERY_COURSE rewards each distinct eligible course. Rates and holds are snapshotted on successful payment; attribution expiry is snapshotted when the code is applied. Changes are audited. Optional share_base_url must be an absolute HTTP(S) learner URL; share links append ref=CODE. parameters: - description: Request in: body name: body required: true schema: $ref: '#/definitions/domain.AffiliateSettingsInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateSettings' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update affiliate program settings tags: - affiliates /api/v1/admin/analytics/dashboard: get: description: 'Platform analytics with optional date filters in Africa/Addis_Ababa (EAT): all-time (default), year, year+month, or custom from/to range. When year is set, payments.revenue_monthly returns Jan–Dec SUCCESS revenue totals (EAT) per currency for that calendar year. Optional payment_method filters payment/revenue metrics (exact or METHOD:% variants). Daily series remains in revenue_last_30_days (see date_filter.series_*). Courses section counts LMS + exam_prep inventory.' parameters: - description: EAT calendar year (e.g. 2025) in: query name: year type: integer - description: EAT calendar month 1-12 (requires year) in: query name: month type: integer - description: Custom EAT range start (YYYY-MM-DD or RFC3339) in: query name: from type: string - description: Custom EAT range end (YYYY-MM-DD or RFC3339, inclusive) in: query name: to type: string - description: Filter payment/revenue metrics (e.g. CHAPA, ARIFPAY, ADMIN_GRANT) in: query name: payment_method type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.AnalyticsDashboard' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Analytics dashboard tags: - analytics /api/v1/admin/app-versions: get: parameters: - description: Filter by ANDROID or IOS in: query name: platform type: string - description: Filter by ACTIVE or INACTIVE in: query name: status type: string - description: Limit (default 20) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listMobileAppVersionsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List mobile app versions (admin) tags: - app-versions post: consumes: - application/json parameters: - description: App version payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createMobileAppVersionReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.mobileAppVersionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create mobile app version (admin) tags: - app-versions /api/v1/admin/app-versions/{id}: delete: parameters: - description: App version ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete mobile app version (admin) tags: - app-versions get: parameters: - description: App version ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.mobileAppVersionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get mobile app version by ID (admin) tags: - app-versions put: consumes: - application/json parameters: - description: App version ID in: path name: id required: true type: integer - description: App version payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateMobileAppVersionReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.mobileAppVersionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update mobile app version (admin) tags: - app-versions /api/v1/admin/assessments: get: produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepAssessmentsData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: List Exam Prep Assessments tags: - learning post: consumes: - application/json parameters: - description: Request payload in: body name: body required: true schema: $ref: '#/definitions/domain.LinkExamPrepAssessmentInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.LinkExamPrepAssessmentData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Link Exam Prep Assessment tags: - learning /api/v1/admin/assessments/{questionSetId}/parents/{parentKind}/{parentId}: delete: parameters: - description: Parent id format: int64 in: path name: parentId required: true type: integer - description: Parent kind in: path name: parentKind required: true type: string - description: Question set id format: int64 in: path name: questionSetId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Unlink Exam Prep Assessment tags: - learning /api/v1/admin/auth/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: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Access denied schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Login user tags: - auth /api/v1/admin/auth/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: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Access denied schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Login super-admin tags: - auth /api/v1/admin/chapters/{chapterId}/lessons: get: parameters: - description: Chapter ID in: path name: chapterId required: true type: integer - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.lessonListData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List lessons for a chapter tags: - learning post: parameters: - description: Chapter ID in: path name: chapterId required: true type: integer - description: Lesson in: body name: body required: true schema: $ref: '#/definitions/domain.CreateExamPrepLessonInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepLesson' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a lesson in a chapter tags: - learning /api/v1/admin/chapters/{chapterId}/lessons/reorder: put: consumes: - application/json parameters: - description: Chapter id format: int64 in: path name: chapterId required: true type: integer - description: Request payload in: body name: body required: true schema: $ref: '#/definitions/domain.ReorderIDsRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Reorder lessons within a chapter tags: - learning /api/v1/admin/chapters/{chapterId}/practices: get: parameters: - description: Exam prep unit ID in: path name: chapterId required: true type: integer - description: Page size. Omit to return all practices for the unit. in: query name: limit type: integer - description: Offset (used when limit is provided) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepPracticesByUnitData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices for a unit tags: - learning post: parameters: - description: Exam prep unit ID in: path name: chapterId required: true type: integer - description: Practice in: body name: body required: true schema: $ref: '#/definitions/domain.CreateExamPrepPracticeInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create practice under a unit tags: - learning /api/v1/admin/chapters/{chapterId}/quizzes: get: description: Returns quizzes and pagination. Admins see drafts; learners see published quizzes with published question sets in published chapters and courses. parameters: - description: Chapter ID in: path name: chapterId required: true type: integer - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.quizListData' type: object "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List quizzes in a chapter tags: - quizzes post: consumes: - application/json description: First create a question set with set_type QUIZ. The chapter URL determines placement; omit all parent fields. Defaults to DRAFT. Learners require both the quiz and its question set to be published. parameters: - description: Chapter ID in: path name: chapterId required: true type: integer - description: Quiz shell in: body name: body required: true schema: $ref: '#/definitions/handlers.createChapterQuizRequest' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a chapter quiz tags: - quizzes /api/v1/admin/chapters/{id}: delete: parameters: - description: Chapter ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete chapter tags: - learning get: parameters: - description: Chapter ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepUnit' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get chapter by ID tags: - learning put: parameters: - description: Chapter ID in: path name: id required: true type: integer - description: Fields to update in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateExamPrepUnitInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepUnit' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update chapter tags: - learning /api/v1/admin/courses: get: parameters: - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.courseListData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List courses tags: - learning post: consumes: - application/json description: Top-level exam track (DET, IELTS, …) in schema exam_prep — separate from LMS programs/courses parameters: - description: Course in: body name: body required: true schema: $ref: '#/definitions/domain.CreateExamPrepCatalogCourseInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepCatalogCourse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create course tags: - learning /api/v1/admin/courses/{courseId}/chapters: get: parameters: - description: Course ID in: path name: courseId required: true type: integer - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.chapterListData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List chapters for a course tags: - learning post: consumes: - application/json description: Chapter under a course (e.g. chapter title). Optional sort_order assigns position within that course (siblings at or after that index are shifted); omit to append after the current highest sort_order in the course. parameters: - description: Course ID in: path name: courseId required: true type: integer - description: Chapter in: body name: body required: true schema: $ref: '#/definitions/domain.CreateExamPrepUnitInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepUnit' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create chapter tags: - learning /api/v1/admin/courses/{courseId}/chapters/reorder: put: parameters: - description: Course ID in: path name: courseId required: true type: integer - description: 'ordered_ids: every chapter id in this course, new order' in: body name: body required: true schema: $ref: '#/definitions/domain.ReorderIDsRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Reorder chapters within a course tags: - learning /api/v1/admin/courses/{courseId}/practices: get: parameters: - description: Exam prep course ID in: path name: courseId required: true type: integer - description: Page size. Omit to return all practices for the course. in: query name: limit type: integer - description: Offset (used when limit is provided) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepPracticesByCatalogCourseData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices for a course tags: - learning post: parameters: - description: Exam prep course ID in: path name: courseId required: true type: integer - description: Practice in: body name: body required: true schema: $ref: '#/definitions/domain.CreateExamPrepPracticeInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create practice under a course tags: - learning /api/v1/admin/courses/{id}: delete: parameters: - description: Course ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete course tags: - learning get: parameters: - description: Course ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepCatalogCourse' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get course by ID tags: - learning put: consumes: - application/json parameters: - description: Course ID in: path name: id required: true type: integer - description: Fields to update in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateExamPrepCatalogCourseInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepCatalogCourse' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update course tags: - learning /api/v1/admin/courses/reorder: put: consumes: - application/json parameters: - description: 'ordered_ids: every course id exactly once' in: body name: body required: true schema: $ref: '#/definitions/domain.ReorderIDsRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Reorder all courses tags: - learning /api/v1/admin/devices/register: post: consumes: - application/json parameters: - description: Device token and platform in: body name: body required: true schema: $ref: '#/definitions/handlers.RegisterDeviceToken.Request' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Register Device Token tags: - devices /api/v1/admin/devices/unregister: post: consumes: - application/json parameters: - description: Device token to unregister in: body name: body required: true schema: $ref: '#/definitions/handlers.UnregisterDeviceToken.Request' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Unregister Device Token tags: - devices /api/v1/admin/email-templates: get: description: Returns email templates for admin management parameters: - description: ACTIVE or INACTIVE in: query name: status type: string - description: Search by slug, name, or subject in: query name: query type: string - description: Limit (default 20) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listEmailTemplatesRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List email templates (admin) tags: - email-templates post: consumes: - application/json description: Creates a new custom email template parameters: - description: Create email template payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createEmailTemplateReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.emailTemplateRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create email template tags: - email-templates /api/v1/admin/email-templates/{id}: delete: description: Deletes a custom email template parameters: - description: Email template ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.DeleteEmailTemplateData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete email template tags: - email-templates get: description: Returns one email template regardless of status parameters: - description: Email template ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.emailTemplateRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get email template by ID (admin) tags: - email-templates put: consumes: - application/json description: Updates an existing email template parameters: - description: Email template ID in: path name: id required: true type: integer - description: Update email template payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateEmailTemplateReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.emailTemplateRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update email template tags: - email-templates /api/v1/admin/email-templates/{id}/preview: post: consumes: - application/json description: Renders an email template with sample variables without sending parameters: - description: Email template ID in: path name: id required: true type: integer - description: Preview variables in: body name: body required: true schema: $ref: '#/definitions/handlers.previewEmailTemplateReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.RenderedEmail' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Preview email template by ID tags: - email-templates /api/v1/admin/email-templates/slug/{slug}: get: description: Returns one email template by slug regardless of status parameters: - description: Email template slug in: path name: slug required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.emailTemplateRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get email template by slug (admin) tags: - email-templates /api/v1/admin/email-templates/slug/{slug}/preview: post: consumes: - application/json description: Renders an email template with sample variables without sending parameters: - description: Email template slug in: path name: slug required: true type: string - description: Preview variables in: body name: body required: true schema: $ref: '#/definitions/handlers.previewEmailTemplateReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.RenderedEmail' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Preview email template by slug tags: - email-templates /api/v1/admin/faqs: get: description: Returns FAQs for admin management with status/category filtering parameters: - description: ACTIVE or INACTIVE in: query name: status type: string - description: Filter by category in: query name: category type: string - description: Limit (default 20) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listFAQsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List FAQs (admin) tags: - faqs post: consumes: - application/json description: Creates a new FAQ item parameters: - description: Create FAQ payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createFAQReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.faqRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create FAQ tags: - faqs /api/v1/admin/faqs/{id}: delete: description: Deletes an FAQ item parameters: - description: FAQ ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.DeleteFAQData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete FAQ tags: - faqs get: description: Returns one FAQ regardless of status parameters: - description: FAQ ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.faqRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get FAQ by ID (admin) tags: - faqs put: consumes: - application/json description: Updates an existing FAQ item parameters: - description: FAQ ID in: path name: id required: true type: integer - description: Update FAQ payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateFAQReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.faqRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update FAQ tags: - faqs /api/v1/admin/field-options: get: parameters: - description: Filter by field key in: query name: field_key type: string - description: ACTIVE or INACTIVE in: query name: status type: string - description: Limit in: query name: limit type: integer - description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listFieldOptionsRes' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: List field options (admin) tags: - field-options post: consumes: - application/json parameters: - description: Create option in: body name: body required: true schema: $ref: '#/definitions/handlers.createFieldOptionReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.fieldOptionRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Create field option (admin) tags: - field-options /api/v1/admin/field-options/{id}: delete: parameters: - description: Option ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete field option (admin) tags: - field-options get: parameters: - description: Option ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.fieldOptionRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Get field option by ID (admin) tags: - field-options put: consumes: - application/json parameters: - description: Option ID in: path name: id required: true type: integer - description: Update option in: body name: body required: true schema: $ref: '#/definitions/handlers.updateFieldOptionReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.fieldOptionRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Update field option (admin) tags: - field-options /api/v1/admin/files/audio: post: consumes: - multipart/form-data parameters: - description: Audio file (mp3, wav, ogg, m4a, aac, webm) in: formData name: file required: true type: file produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.UploadAudioData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Upload an audio file tags: - files /api/v1/admin/files/complete-upload: post: consumes: - application/json description: Call after PUT upload to upload_url. Returns the same file metadata shape as POST /files/upload. parameters: - description: Complete upload request in: body name: body required: true schema: $ref: '#/definitions/handlers.completePresignedUploadReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.uploadMediaRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Complete presigned MinIO upload tags: - files /api/v1/admin/files/presign-upload: post: consumes: - application/json description: Returns a short-lived PUT URL and object key. Upload the file with HTTP PUT to upload_url using the same Content-Type, then call POST /files/complete-upload. parameters: - description: Presigned upload request in: body name: body required: true schema: $ref: '#/definitions/handlers.presignedUploadReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.presignedUploadRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create presigned MinIO upload URL tags: - files /api/v1/admin/files/refresh-url: post: consumes: - application/json parameters: - description: reference (object key, minio://..., or existing presigned URL) in: body name: body required: true schema: $ref: '#/definitions/handlers.refreshFileURLReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.RefreshFileURLData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Refresh presigned URL for a file tags: - files /api/v1/admin/files/upload: post: consumes: - multipart/form-data parameters: - description: 'Media type: image|audio|video|pdf' in: formData name: media_type required: true type: string - description: Media file in: formData name: file required: true type: file produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.uploadMediaRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Upload media file tags: - files /api/v1/admin/files/url: get: parameters: - description: MinIO object key (e.g. profile_pictures/uuid.jpg) in: query name: key required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.GetFileURLData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get presigned URL for a file tags: - files /api/v1/admin/internal/users/purge-due-deletions: post: description: Worker-safe purge for due self-deletion requests parameters: - description: Max users to purge in one run (default 100, max 1000) in: query name: limit type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.PurgeDueDeletedUsersData' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Purge due account deletions tags: - user /api/v1/admin/issues: get: description: Returns all reported issues with pagination (admin only) parameters: - default: 20 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.issueListRes' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get all issues tags: - issues /api/v1/admin/issues/{id}: delete: description: Deletes an issue report (admin only) parameters: - description: Issue ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete an issue tags: - issues get: description: Returns a single issue report by its ID (admin only) parameters: - description: Issue ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.issueRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get issue by ID tags: - issues /api/v1/admin/issues/{id}/status: patch: consumes: - application/json description: Updates the status of an issue (admin only) parameters: - description: Issue ID in: path name: id required: true type: integer - description: Status update payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateIssueStatusReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update issue status tags: - issues /api/v1/admin/issues/user/{user_id}: get: description: Returns paginated issues reported by a specific user (admin only) parameters: - description: User ID in: path name: user_id required: true type: integer - default: 20 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.issueListRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get issues for a specific user tags: - issues /api/v1/admin/lessons/{id}: delete: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete lesson tags: - learning get: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepLesson' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get lesson by ID tags: - learning put: consumes: - application/json parameters: - description: Id format: int64 in: path name: id required: true type: integer - description: Request payload in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateExamPrepLessonInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepLesson' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update lesson tags: - learning /api/v1/admin/lessons/{lessonId}/practices: get: parameters: - description: Exam prep lesson ID in: path name: lessonId required: true type: integer - description: Page size. Omit to return all practices for the lesson. in: query name: limit type: integer - description: Offset (used when limit is provided) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepPracticesByLessonData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices for a lesson tags: - learning /api/v1/admin/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' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Staff account and logs.list permission required schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Retrieve application logs with filtering and pagination tags: - Logs /api/v1/admin/notifications: delete: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete User Notifications tags: - notifications get: parameters: - default: 10 description: Limit in: query name: limit type: integer - default: 0 description: Offset in: query minimum: 0 name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.GetUserNotificationResponse' "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Get User Notification tags: - notifications /api/v1/admin/notifications/{id}: delete: description: Deletes one in-app notification owned by the authenticated user. parameters: - description: Notification ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a single in-app notification tags: - notifications get: description: Returns a single in-app notification. Users may only fetch their own notifications unless they have list-all access. parameters: - description: Notification ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.Notification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get in-app notification by ID tags: - notifications /api/v1/admin/notifications/{id}/read: patch: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.Notification' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark Notification As Read tags: - notifications /api/v1/admin/notifications/{id}/unread: patch: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.Notification' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark Notification As Unread tags: - notifications /api/v1/admin/notifications/all: get: parameters: - default: 10 description: Limit in: query name: limit type: integer - default: 1 description: Page in: query name: page type: integer - description: Channel in: query name: channel type: string - description: Type in: query name: type type: string - description: User id in: query name: user_id type: integer - description: Is read in: query name: is_read type: boolean - description: After in: query name: after type: string - description: Before in: query name: before type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.GetAllNotificationsResponse' "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Get All Notifications tags: - notifications /api/v1/admin/notifications/bulk-email: post: consumes: - multipart/form-data description: Sends an email to specified user IDs, users of a platform role, team member IDs, team members of a team_role, or direct email addresses with optional image attachment. Optionally schedule for later with scheduled_at (RFC3339). parameters: - description: Saved template slug; otherwise subject and message or html are required in: formData name: email_template_slug type: string - description: JSON object of template variables in: formData name: template_variables type: string - description: Subject, required when no template is selected in: formData name: subject type: string - description: Plain-text body, required without a template unless html is supplied in: formData name: message type: string - description: HTML body alternative to message in: formData name: html type: string - description: Optional attachment in: formData name: file type: file - description: Comma-separated direct email addresses in: formData name: emails type: string - description: Comma-separated customer IDs in: formData name: user_ids type: string - description: Customer role used to select recipients in: formData name: role type: string - description: Comma-separated team-member IDs in: formData name: team_member_ids type: string - description: Team role used to select recipients in: formData name: team_role type: string - description: Optional future delivery time in RFC3339 format in: formData name: scheduled_at type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SendBulkEmailData' type: object "201": description: Scheduled notification created when scheduled_at is provided schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ScheduledNotification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send bulk email tags: - notifications /api/v1/admin/notifications/bulk-in-app: post: consumes: - application/json description: Creates in-app notifications for specified platform user IDs, users matching a platform role, team member IDs, or team members matching a team_role. Optionally schedule for later with scheduled_at (RFC3339). parameters: - description: Bulk in-app content in: body name: body required: true schema: properties: level: type: string message: type: string role: type: string scheduled_at: type: string team_member_ids: items: format: int64 type: integer type: array team_role: type: string title: type: string type: type: string user_ids: items: format: int64 type: integer type: array type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SendBulkInAppNotificationData' type: object "201": description: Scheduled notification created when scheduled_at is provided schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ScheduledNotification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send bulk in-app notification tags: - notifications /api/v1/admin/notifications/bulk-push: post: consumes: - application/json description: Sends a push notification to specified user IDs or all users matching a role. Optionally schedule for later with scheduled_at (RFC3339). parameters: - description: Bulk push content in: body name: body required: true schema: properties: image: type: string message: type: string role: type: string scheduled_at: type: string title: type: string user_ids: items: format: int64 type: integer type: array type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SendBulkPushNotificationData' type: object "201": description: Scheduled notification created when scheduled_at is provided schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ScheduledNotification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send bulk push notification tags: - notifications /api/v1/admin/notifications/bulk-sms: post: consumes: - application/json description: Sends an SMS to specified user IDs, all users of a role, or direct phone numbers. Optionally schedule for later with scheduled_at (RFC3339). parameters: - description: Bulk SMS content in: body name: body required: true schema: properties: message: type: string phone_numbers: items: type: string type: array role: type: string scheduled_at: type: string user_ids: items: format: int64 type: integer type: array type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SendBulkSMSData' type: object "201": description: Scheduled notification created when scheduled_at is provided schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ScheduledNotification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send bulk SMS tags: - notifications /api/v1/admin/notifications/create: post: consumes: - application/json parameters: - description: Notification recipient and delivery settings in: body name: body required: true schema: $ref: '#/definitions/handlers.CreateAndSendNotification.Request' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/handlers.NotificationDispatchResponse' "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Create And Send Notification tags: - notifications /api/v1/admin/notifications/delete-in-app: post: consumes: - application/json description: Deletes in-app notifications by ID for the authenticated user. Non-matching IDs are ignored. parameters: - description: Notification IDs in: body name: body required: true schema: type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.DeleteInAppNotificationsData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete multiple in-app notifications tags: - notifications /api/v1/admin/notifications/mark-all-read: post: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark All Notifications As Read tags: - notifications /api/v1/admin/notifications/mark-all-unread: post: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark All Notifications As Unread tags: - notifications /api/v1/admin/notifications/scheduled: get: description: Returns paginated scheduled notifications with optional status, channel, and date filters parameters: - description: Filter by status in: query name: status type: string - description: Filter by channel in: query name: channel type: string - description: Filter after date (RFC3339) in: query name: after type: string - description: Filter before date (RFC3339) in: query name: before type: string - default: 20 description: Page size in: query name: limit type: integer - default: 1 description: Page number in: query name: page type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.ListScheduledNotificationsResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List scheduled notifications tags: - notifications /api/v1/admin/notifications/scheduled/{id}: get: description: Returns a single scheduled notification by its ID parameters: - description: Scheduled Notification ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ScheduledNotification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get scheduled notification tags: - notifications /api/v1/admin/notifications/scheduled/{id}/cancel: post: description: Cancels a scheduled notification if it is still pending or processing parameters: - description: Scheduled Notification ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ScheduledNotification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Cancel scheduled notification tags: - notifications /api/v1/admin/notifications/send-email: post: consumes: - multipart/form-data description: Sends an email to a single email address with optional image attachment parameters: - description: Saved template slug; otherwise subject and message or html are required in: formData name: email_template_slug type: string - description: JSON object of template variables in: formData name: template_variables type: string - description: Subject, required when no template is selected in: formData name: subject type: string - description: Plain-text body, required without a template unless html is supplied in: formData name: message type: string - description: HTML body alternative to message in: formData name: html type: string - description: Optional attachment in: formData name: file type: file - description: Recipient email address in: formData name: recipient required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send single email tags: - notifications /api/v1/admin/notifications/test-push: post: consumes: - application/json description: Sends a test push notification to all registered devices of the current user parameters: - description: Test notification content in: body name: body required: true schema: properties: message: type: string title: type: string type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SendTestPushNotificationData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send test push notification tags: - notifications /api/v1/admin/notifications/unread: get: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.CountUnreadNotificationsResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Count Unread Notifications tags: - notifications /api/v1/admin/payments: get: description: Returns paginated payments across Chapa and ArifPay with optional filters parameters: - description: Filter by learner user ID in: query name: user_id type: integer - description: Filter by subscription plan ID in: query name: plan_id type: integer - description: Filter by user subscription ID in: query name: subscription_id type: integer - description: Payment status (PENDING, PROCESSING, SUCCESS, FAILED, CANCELLED, EXPIRED) in: query name: status type: string - description: Payment provider (CHAPA, ARIFPAY) in: query name: provider type: string - description: Alias for provider in: query name: payment_method type: string - description: Currency code (e.g. ETB) in: query name: currency type: string - description: Plan category (EDUCATION) in: query name: plan_category type: string - description: Search session_id, nonce, or transaction_id in: query name: reference type: string - description: Created at from (RFC3339 or YYYY-MM-DD) in: query name: created_from type: string - description: Created at to (exclusive, RFC3339 or YYYY-MM-DD) in: query name: created_to type: string - description: Paid at from (RFC3339 or YYYY-MM-DD) in: query name: paid_from type: string - description: Paid at to (exclusive, RFC3339 or YYYY-MM-DD) in: query name: paid_to type: string - description: Minimum amount in: query name: min_amount type: number - description: Maximum amount in: query name: max_amount type: number - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Page offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listAdminPaymentsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List all payments (admin) tags: - payments /api/v1/admin/payments/{id}: get: description: Returns any payment record by ID without learner ownership restriction parameters: - description: Payment ID in: path name: id required: true type: integer - default: 20 description: Limit in: query name: limit type: integer - default: 0 description: Offset in: query minimum: 0 name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.adminPaymentRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get payment by ID (admin) tags: - payments /api/v1/admin/payments/export: get: produces: - text/csv - text/csv responses: "200": description: CSV export; filename is supplied in Content-Disposition headers: Content-Disposition: description: attachment; filename=export.csv type: string schema: type: file "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Export payments as CSV (admin) tags: - payments /api/v1/admin/personas: get: parameters: - default: true description: When true (default), return only active personas in: query name: active_only type: boolean - description: Page size in: query name: limit type: integer - description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listPersonasData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List LMS personas (catalog for practice assignment) tags: - personas post: consumes: - application/json parameters: - description: Persona in: body name: body required: true schema: $ref: '#/definitions/domain.CreateLmsPersonaInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.LmsPersona' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create LMS persona catalog entry tags: - personas /api/v1/admin/personas/{id}: delete: parameters: - description: Persona ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete LMS persona (practices referencing it will have persona_id cleared) tags: - personas get: parameters: - description: Persona ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.LmsPersona' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get LMS persona by ID tags: - personas put: parameters: - description: Persona ID in: path name: id required: true type: integer - description: Fields to update in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateLmsPersonaInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.LmsPersona' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update LMS persona tags: - personas /api/v1/admin/practices: get: parameters: - description: Page size. Omit (with offset) to return all practices. in: query name: limit type: integer - description: Offset. Defaults to 0 when limit is provided; ignored semantics when both omitted (all rows). in: query name: offset type: integer - description: When true, return only practices with no parent links (admin) in: query name: unlinked_only type: boolean produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListAllExamPrepPracticesData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices globally tags: - learning post: parameters: - description: Practice in: body name: body required: true schema: $ref: '#/definitions/domain.CreateExamPrepPracticeInput' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create practice (optional parents; link later via PUT /practices/:id/parents) tags: - learning /api/v1/admin/practices/{id}: delete: parameters: - description: Exam prep practice ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete practice tags: - learning get: parameters: - description: Exam prep practice ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get practice by ID tags: - learning put: parameters: - description: Exam prep practice ID in: path name: id required: true type: integer - description: Fields to update in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateExamPrepPracticeInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update practice tags: - learning /api/v1/admin/practices/{id}/full: get: description: Returns practice metadata, linked question set settings, and all questions in the set. parameters: - description: Exam prep practice ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.quizFullData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get practice with question set and questions tags: - learning put: consumes: - application/json description: Updates practice metadata, linked question set settings, and syncs questions in one request. parameters: - description: Exam prep practice ID in: path name: id required: true type: integer - description: Full practice update payload in: body name: body required: true schema: $ref: '#/definitions/domain.FullUpdatePracticeInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.quizFullData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Full update practice with question set and questions tags: - learning /api/v1/admin/practices/{id}/parents: put: parameters: - description: Exam prep practice ID in: path name: id required: true type: integer - description: Parent links (replaces all; use empty array to detach) in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateExamPrepPracticeParentsInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Replace practice parent links tags: - learning /api/v1/admin/practices/{id}/parents/{parentKind}/{parentId}: delete: parameters: - description: Exam prep practice ID in: path name: id required: true type: integer - description: Parent kind (CATALOG_COURSE, UNIT, LESSON) in: path name: parentKind required: true type: string - description: Parent entity ID in: path name: parentId required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Unlink one practice parent tags: - learning /api/v1/admin/question-sets: get: description: Returns a paginated list of question sets filtered by type parameters: - description: Set type (PRACTICE, QUIZ, EXAM, SURVEY, CAPSTONE) in: query name: set_type required: true type: string - 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listQuestionSetsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get question sets by type tags: - question-sets post: consumes: - application/json description: Creates a new question set (practice, assessment, quiz, exam, or survey) parameters: - description: Create question set payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createQuestionSetReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.questionSetRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a new question set tags: - question-sets /api/v1/admin/question-sets/{id}: delete: description: Archives a question set (soft delete) parameters: - description: Question Set ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a question set tags: - question-sets get: description: Returns a question set with question count parameters: - description: Question Set ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.questionSetRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get question set by ID tags: - question-sets put: consumes: - application/json description: Updates a question set's properties parameters: - description: Question Set ID in: path name: id required: true type: integer - description: Update question set payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateQuestionSetReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update a question set tags: - question-sets /api/v1/admin/question-sets/{setId}/personas: get: description: Returns all users assigned as personas to a question set (practice) parameters: - description: Question Set ID in: path name: setId required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.userPersonaRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get user personas for a question set tags: - question-sets post: consumes: - application/json description: Links a user as a persona to a question set (practice) parameters: - description: Question Set ID in: path name: setId required: true type: integer - description: Add user persona payload in: body name: body required: true schema: $ref: '#/definitions/handlers.addUserPersonaReq' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Add a user as persona to a question set tags: - question-sets /api/v1/admin/question-sets/{setId}/personas/{userId}: delete: description: Unlinks a user as persona from a question set (practice) parameters: - description: Question Set ID in: path name: setId required: true type: integer - description: User ID in: path name: userId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Remove a user persona from a question set tags: - question-sets /api/v1/admin/question-sets/{setId}/question-types: get: description: Returns distinct question type definitions (key, display_name, counts) for non-archived questions in the set. Legacy stored question_type values (e.g. AUDIO) are resolved to builder definitions when possible. parameters: - description: Question Set ID in: path name: setId required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.QuestionSetQuestionTypesSummary' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List question types in a question set tags: - question-set-items /api/v1/admin/question-sets/{setId}/questions: get: description: Returns all questions as the data array (not a paginated object). Use this admin endpoint to author quiz questions; learner quiz reads are paginated. Includes contextual shared stimulus data. parameters: - description: Question Set ID in: path name: setId required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.questionRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get questions in set tags: - question-set-items post: consumes: - application/json description: Links a question to a question set. Omit display_order to append after the current max; the assigned value is returned in the response. parameters: - description: Question Set ID in: path name: setId required: true type: integer - description: Add question to set payload in: body name: body required: true schema: $ref: '#/definitions/handlers.addQuestionToSetReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.AddQuestionToSetData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Add question to set tags: - question-set-items /api/v1/admin/question-sets/{setId}/questions/{questionId}: delete: description: Unlinks a question from a question set parameters: - description: Question Set ID in: path name: setId required: true type: integer - description: Question ID in: path name: questionId required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Remove question from set tags: - question-set-items /api/v1/admin/question-sets/{setId}/questions/{questionId}/order: put: consumes: - application/json description: Updates the display order of a question in a set parameters: - description: Question Set ID in: path name: setId required: true type: integer - description: Question ID in: path name: questionId required: true type: integer - description: Update order payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateQuestionOrderReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update question order in set tags: - question-set-items /api/v1/admin/question-sets/by-owner: get: description: Returns question sets for a specific owner (e.g., sub-course) parameters: - description: Owner type (SUB_COURSE, COURSE, CATEGORY, STANDALONE) in: query name: owner_type required: true type: string - description: Owner ID in: query name: owner_id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.questionSetRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get question sets by owner tags: - question-sets /api/v1/admin/questions: get: description: Returns a paginated list of questions with optional filters parameters: - description: Question type filter (MCQ, TRUE_FALSE, SHORT_ANSWER) in: query name: question_type type: string - description: Difficulty level filter (EASY, MEDIUM, HARD) in: query name: difficulty type: string - description: Status filter (DRAFT, PUBLISHED, INACTIVE) in: query name: status type: string - 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listQuestionsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List questions tags: - questions post: consumes: - application/json description: Creates a new question with options (for MCQ/TRUE_FALSE) or short answers (for SHORT_ANSWER). DYNAMIC questions must not send question_text; use dynamic_payload stimulus instead. Legacy types require question_text. parameters: - description: Create question payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createQuestionReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.questionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a new question tags: - questions /api/v1/admin/questions/{id}: delete: description: Archives a question (soft delete) parameters: - description: Question ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a question tags: - questions get: description: Returns a question with its options/short answers parameters: - description: Question ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.questionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get question by ID tags: - questions put: consumes: - application/json description: Updates a question and optionally replaces its options/short answers. Supports question_type_definition_id for dynamic builder-linked questions. 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.updateQuestionReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update a question tags: - questions /api/v1/admin/questions/component-catalog: get: description: Valid stimulus and response component kind codes for dynamic question-type definitions produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.componentCatalogRes' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Question-type builder component catalog tags: - questions /api/v1/admin/questions/search: get: description: Search questions by text parameters: - description: Search query in: query name: q required: true type: string - 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listQuestionsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Search questions tags: - questions /api/v1/admin/questions/type-definition-groups: get: parameters: - description: Filter by status (ACTIVE, INACTIVE) in: query name: status type: string - default: 20 description: Page size (default 20, max 200) in: query name: limit type: integer - default: 0 description: Page offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listQuestionTypeDefinitionGroupsData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List question type definition groups tags: - questions post: consumes: - application/json parameters: - description: Group payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createQuestionTypeDefinitionGroupReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.QuestionTypeDefinitionGroup' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Create question type definition group tags: - questions /api/v1/admin/questions/type-definition-groups/{id}: delete: parameters: - description: Group id in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.DeleteQuestionTypeDefinitionGroupData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete question type definition group tags: - questions get: parameters: - description: Group id in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.QuestionTypeDefinitionGroupDetail' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get question type definition group with definitions tags: - questions put: consumes: - application/json parameters: - description: Group id in: path name: id required: true type: integer - description: Update group payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateQuestionTypeDefinitionGroupReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.QuestionTypeDefinitionGroup' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update question type definition group tags: - questions /api/v1/admin/questions/type-definitions: get: parameters: - description: Filter by status (ACTIVE, INACTIVE) in: query name: status type: string - default: true description: Include system seeded definitions in: query name: include_system type: boolean - default: 20 description: Page size (default 20, max 200) in: query name: limit type: integer - default: 0 description: Page offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listQuestionTypeDefinitionsData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List reusable question-type definitions tags: - questions post: consumes: - application/json description: Stores a reusable dynamic question-type definition for future question construction. Only runtime-mappable definitions are persisted. parameters: - description: Question type definition payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createQuestionTypeDefinitionReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.QuestionTypeDefinition' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create reusable question-type definition tags: - questions /api/v1/admin/questions/type-definitions/{id}: delete: parameters: - description: Question type definition id in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.DeleteQuestionTypeDefinitionData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete reusable question-type definition tags: - questions get: parameters: - description: Question type definition id in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.QuestionTypeDefinition' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get reusable question-type definition by id tags: - questions put: consumes: - application/json description: Updates a reusable dynamic question-type definition. Updated definitions must remain runtime-mappable. parameters: - description: Question type definition id in: path name: id required: true type: integer - description: Update question type definition payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updateQuestionTypeDefinitionReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.UpdateQuestionTypeDefinitionData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update reusable question-type definition tags: - questions /api/v1/admin/questions/type-definitions/{id}/practices: get: description: Returns LMS and exam-prep practices whose linked question set contains at least one non-archived question matching the definition (by question_type_definition_id or legacy question_type). parameters: - description: Question type definition id in: path name: id required: true type: integer - default: 20 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.PracticesByQuestionTypeDefinitionSummary' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices globally by question type definition tags: - questions /api/v1/admin/questions/validate-question-type-definition: post: consumes: - application/json description: Validates selected stimulus and response component kinds for temporary question-type definitions (component-level validation only) parameters: - description: Stimulus and response component kinds in: body name: body required: true schema: $ref: '#/definitions/handlers.validateQuestionTypeDefinitionReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ValidateQuestionTypeDefinitionData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Validate dynamic question-type definition tags: - questions /api/v1/admin/quizzes/{id}: delete: description: Deletes the quiz shell and chapter attachment. The question set and bank questions remain independently managed. parameters: - description: Quiz shell ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a chapter quiz tags: - quizzes get: description: Returns a quiz shell. Learners only see published quizzes with a published question set in a published chapter and course. parameters: - description: Quiz shell ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get a chapter quiz tags: - quizzes put: consumes: - application/json description: Updates quiz metadata. A replacement question_set_id must refer to another QUIZ set. Chapter placement is immutable through this endpoint. parameters: - description: Quiz shell ID in: path name: id required: true type: integer - description: Quiz update in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateExamPrepPracticeInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update a chapter quiz tags: - quizzes /api/v1/admin/quizzes/{id}/full: get: description: Returns quiz metadata in practice, question_set settings, stimulus_blocks, and questions. parameters: - description: Quiz shell ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.quizFullData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get a chapter quiz with questions tags: - quizzes put: consumes: - application/json description: Updates quiz metadata and question set settings. Omit questions to preserve memberships; an explicit empty array removes all memberships. Publish practice.publish_status and question_set.status together. parameters: - description: Quiz shell ID in: path name: id required: true type: integer - description: Quiz update in: body name: body required: true schema: $ref: '#/definitions/domain.FullUpdatePracticeInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.quizFullData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update a chapter quiz and its question set tags: - quizzes /api/v1/admin/ratings: get: description: Returns paginated ratings for a specific target parameters: - description: Target type (app, course, sub_course) in: query name: target_type required: true type: string - description: Target ID (0 for app) in: query name: target_id required: true type: integer - description: Limit (default 20) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.ratingRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get ratings for a target tags: - ratings /api/v1/admin/ratings/{id}: delete: description: Deletes a rating by ID for the current user parameters: - description: Rating ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a rating tags: - ratings /api/v1/admin/ratings/summary: get: description: Returns the total count and average stars for a specific target parameters: - description: Target type (app, course, sub_course) in: query name: target_type required: true type: string - description: Target ID (0 for app) in: query name: target_id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ratingSummaryRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get rating summary for a target tags: - ratings /api/v1/admin/rbac/permissions: get: consumes: - application/json description: Get all permissions in the system grouped by group name produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/domain.Permission' type: array type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List all permissions tags: - rbac /api/v1/admin/rbac/permissions/groups: get: consumes: - application/json description: Get all distinct permission group names produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: type: string type: array type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List permission groups tags: - rbac /api/v1/admin/rbac/permissions/sync: post: consumes: - application/json description: Re-seed permissions from code and reload the RBAC cache produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Sync permissions tags: - rbac /api/v1/admin/rbac/roles: get: consumes: - application/json description: Get all roles with optional filters parameters: - description: Search by role name in: query name: query type: string - description: Filter by system role (true/false) in: query name: is_system type: boolean - description: 'Page number (default: 1)' in: query name: page type: integer - description: 'Page size (default: 20)' in: query name: page_size type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListRolesData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List all roles tags: - rbac post: consumes: - application/json description: Create a new role with a name and description parameters: - description: Role creation payload in: body name: body required: true schema: $ref: '#/definitions/domain.CreateRoleReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.RoleRecord' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a new role tags: - rbac /api/v1/admin/rbac/roles/{id}: delete: consumes: - application/json description: Delete a non-system role by ID parameters: - description: Role ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a role tags: - rbac get: consumes: - application/json description: Get a role and its permissions by ID parameters: - description: Role ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.RoleWithPermissions' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get a role by ID tags: - rbac put: consumes: - application/json description: Update an existing role's name and description parameters: - description: Role ID in: path name: id required: true type: integer - description: Role update payload in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateRoleReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update a role tags: - rbac /api/v1/admin/rbac/roles/{id}/permissions: get: consumes: - application/json description: Get all permissions assigned to a role parameters: - description: Role ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/domain.Permission' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get permissions for a role tags: - rbac put: consumes: - application/json description: Replace all permissions for a role with the given permission IDs parameters: - description: Role ID in: path name: id required: true type: integer - description: Permission IDs payload in: body name: body required: true schema: $ref: '#/definitions/domain.SetRolePermissionsReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Set permissions for a role tags: - rbac /api/v1/admin/referrals/settings: get: description: Returns the saved referral commission percentage. Restricted to ADMIN and SUPER_ADMIN. The initial percentage is 0, which disables new credits. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralSettingsData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Get Referral Settings tags: - referrals put: consumes: - application/json description: Sets the percentage credited on a referred learner's qualifying course payment. Accepts 0 through 100 with at most two decimal places. Zero disables new credits. Changes affect future conversions only; existing credits retain their rate. Restricted to ADMIN and SUPER_ADMIN; changes are audited. parameters: - description: Commission percentage configuration in: body name: body required: true schema: $ref: '#/definitions/handlers.updateReferralSettingsReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralSettingsData' type: object "400": description: Missing or invalid commission_percent; use 0 through 100 with at most two decimal places schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Update Referral Settings tags: - referrals /api/v1/admin/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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SendSingleAfroSMSReq' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send single SMS via AfroMessage tags: - user /api/v1/admin/settings: get: produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/domain.SettingListRes' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Get Global Setting List tags: - settings put: consumes: - application/json parameters: - description: Request payload in: body name: body required: true schema: $ref: '#/definitions/domain.SaveSettingListReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/domain.SettingListRes' type: object "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Update Global Setting List tags: - settings /api/v1/admin/settings/{key}: get: parameters: - description: Key in: path name: key required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/domain.SettingRes' type: object "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Get Global Setting By Key tags: - settings /api/v1/admin/subscription-plans: get: description: 'Returns subscription plans. Optional category filter: EDUCATION.' parameters: - description: Return only active plans (default true) in: query name: active_only type: boolean - description: Filter by plan category (EDUCATION) in: query name: category type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.planRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List subscription plans tags: - subscriptions post: consumes: - application/json description: Creates a new subscription plan (admin only) parameters: - description: Create plan payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createPlanReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.planRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "409": description: Resource conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a subscription plan tags: - subscriptions /api/v1/admin/subscription-plans/{id}: delete: description: Deletes a subscription plan (admin only) parameters: - description: Plan ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Resource conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a subscription plan tags: - subscriptions get: description: Returns a single subscription plan by ID parameters: - description: Plan ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.planRes' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get a subscription plan tags: - subscriptions put: consumes: - application/json description: Updates a subscription plan (admin only) parameters: - description: Plan ID in: path name: id required: true type: integer - description: Update plan payload in: body name: body required: true schema: $ref: '#/definitions/handlers.updatePlanReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Resource conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update a subscription plan tags: - subscriptions /api/v1/admin/subscriptions/{id}/cancel: post: description: Cancels any user_subscriptions row by ID. Does not require ownership by the caller. parameters: - description: Subscription ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.subscriptionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Cancel a learner subscription (admin) tags: - subscriptions /api/v1/admin/subscriptions/export: get: produces: - text/csv - text/csv responses: "200": description: CSV export; filename is supplied in Content-Disposition headers: Content-Disposition: description: attachment; filename=export.csv type: string schema: type: file "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Export user subscriptions as CSV (admin) tags: - subscriptions /api/v1/admin/team/invitations: get: description: Lists team member invitations with optional status filter parameters: - description: pending, accepted, expired, or revoked in: query name: status type: string - description: Limit (default 20) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listTeamInvitationsRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: List team invitations tags: - team /api/v1/admin/team/invitations/{id}/revoke: post: description: Revokes the invitation and removes the pending team member if not yet accepted parameters: - description: Invitation ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.RevokeTeamInvitationData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Revoke a pending team invitation tags: - team /api/v1/admin/team/invitations/accept: post: consumes: - application/json description: Public endpoint to set password and profile details after following the invite link parameters: - description: Accept invitation payload in: body name: body required: true schema: $ref: '#/definitions/domain.AcceptTeamInvitationReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamMemberResponse' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' summary: Accept team invitation and complete account setup tags: - team /api/v1/admin/team/invitations/verify: get: description: Public endpoint used by the admin panel accept-invite page parameters: - description: Invitation token in: query name: token required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.VerifyTeamInvitationRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Verify team invitation token tags: - team /api/v1/admin/team/login: post: consumes: - application/json description: Authenticate a team member (internal staff) with email and password parameters: - description: Team member login credentials in: body name: body required: true schema: $ref: '#/definitions/domain.TeamMemberLoginReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.teamMemberLoginRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Login team member tags: - team /api/v1/admin/team/me: get: consumes: - application/json description: Get the authenticated team member's own profile produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamMemberResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get my team profile tags: - team put: consumes: - application/json description: Update the authenticated team member's own profile fields parameters: - description: Profile update payload in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateMyTeamProfileReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamMemberResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update my team profile tags: - team /api/v1/admin/team/members: get: consumes: - application/json description: Get a paginated list of team members with optional filtering parameters: - description: Filter by team role (super_admin, admin, content_manager, support_agent, instructor, finance, hr, analyst) in: query name: team_role type: string - description: Filter by department in: query name: department type: string - description: Filter by status (active, inactive, suspended, terminated) in: query name: status type: string - description: Search by name, email, or phone number in: query name: search type: string - description: 'Page number (default: 1)' in: query name: page type: integer - description: 'Items per page (default: 10, max: 100)' in: query name: page_size type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/domain.TeamMemberResponse' type: array metadata: $ref: '#/definitions/domain.Pagination' type: object "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List all team members tags: - team post: consumes: - application/json description: Create a new internal team member (admin only) parameters: - description: Team member creation payload in: body name: body required: true schema: $ref: '#/definitions/domain.CreateTeamMemberReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamMemberResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a new team member tags: - team /api/v1/admin/team/members/{id}: delete: consumes: - application/json description: Delete a team member (super admin only) parameters: - description: Team Member ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete team member tags: - team get: consumes: - application/json description: Retrieve a team member's details by their ID parameters: - description: Team Member ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamMemberResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get team member by ID tags: - team put: consumes: - application/json description: Update an existing team member's details (admin only) parameters: - description: Team Member ID in: path name: id required: true type: integer - description: Team member update payload in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateTeamMemberReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update team member tags: - team /api/v1/admin/team/members/{id}/change-password: post: consumes: - application/json description: Change a team member's password (requires current password) parameters: - description: Team Member ID in: path name: id required: true type: integer - description: Password change payload in: body name: body required: true schema: $ref: '#/definitions/handlers.changePasswordReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Change team member password tags: - team /api/v1/admin/team/members/{id}/resend-invite: post: description: Revokes the current pending invite and sends a new invitation email parameters: - description: Team member ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.InviteTeamMemberRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Resend team invitation tags: - team /api/v1/admin/team/members/{id}/status: patch: consumes: - application/json description: Update a team member's status (active, inactive, suspended, terminated) parameters: - description: Team Member ID in: path name: id required: true type: integer - description: Status update payload in: body name: body required: true schema: $ref: '#/definitions/domain.UpdateTeamMemberStatusReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update team member status tags: - team /api/v1/admin/team/members/export: get: produces: - text/csv - text/csv responses: "200": description: CSV export; filename is supplied in Content-Disposition headers: Content-Disposition: description: attachment; filename=export.csv type: string schema: type: file "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Export team members as CSV (admin) tags: - team /api/v1/admin/team/members/invite: post: consumes: - application/json description: Creates a pending team member (email + team_role only) and sends an invitation email; profile is completed on accept parameters: - description: Invite payload in: body name: body required: true schema: $ref: '#/definitions/domain.InviteTeamMemberReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.InviteTeamMemberRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Invite a team member by email tags: - team /api/v1/admin/team/refresh: post: consumes: - application/json description: Exchanges a valid team refresh token for a new access JWT and a rotated refresh token (use only tokens from POST /team/login or this endpoint). parameters: - description: Current refresh token in: body name: body required: true schema: $ref: '#/definitions/handlers.teamMemberRefreshReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.teamMemberLoginRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Access denied schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Refresh team member tokens tags: - team /api/v1/admin/team/resetPassword: post: consumes: - application/json description: Completes team password reset using email + OTP from the reset link. Public. parameters: - description: Reset payload in: body name: body required: true schema: $ref: '#/definitions/domain.TeamResetPasswordReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "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: Reset team member password tags: - team /api/v1/admin/team/sendResetCode: post: consumes: - application/json description: Sends a password-reset email with a link to the team member (admin panel). Public. parameters: - description: Email in: body name: body required: true schema: $ref: '#/definitions/domain.TeamSendPasswordResetReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "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: Send team password reset link tags: - team /api/v1/admin/team/stats: get: consumes: - application/json description: Get statistics about team members by status produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamMemberStats' type: object "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get team member statistics tags: - team /api/v1/admin/team/verifyResetCode: get: description: Checks whether email+otp from a reset link are still valid without consuming the OTP. Public. parameters: - description: Team member email in: query name: email required: true type: string - description: Reset OTP from the email link in: query name: otp required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.TeamVerifyPasswordResetRes' type: object summary: Verify team password reset link tags: - team /api/v1/admin/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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.UploadProfilePictureData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Upload profile picture tags: - user /api/v1/admin/user/admin-profile: get: consumes: - application/json description: Get user profile produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/domain.UserProfileResponse' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Get user profile tags: - user /api/v1/admin/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/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Delete user by ID tags: - user /api/v1/admin/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: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: items: $ref: '#/definitions/domain.UserProfileResponse' type: array type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Search for user using name or phone tags: - user /api/v1/admin/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: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/domain.UserProfileResponse' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Get user by id tags: - user /api/v1/admin/user/status: patch: consumes: - application/json description: Activates, deactivates, or suspends a user account parameters: - description: Status update payload in: body name: body required: true schema: type: object produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Update user status tags: - user /api/v1/admin/users: get: consumes: - application/json description: 'Get users with optional filters. Each user includes subscription_status: ACTIVE, PENDING, or Unsubscribed.' 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 - description: User account status filter (ACTIVE, PENDING, SUSPENDED, DEACTIVATED, or INACTIVE for all non-ACTIVE statuses) in: query name: status type: string - description: Country filter (case-insensitive match on stored value) in: query name: country type: string - description: Region filter (case-insensitive match on stored value) in: query name: region type: string - description: 'Derived subscription filter: ACTIVE, PENDING, or Unsubscribed (matches response subscription_status semantics)' in: query name: subscription_status type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.GetAllUsersData' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Get all users tags: - user /api/v1/admin/users/{user_id}/learning-activity: get: description: Returns the unified catalog-course learning tree, progress summary, and recent activity timeline parameters: - description: Target user ID in: path name: user_id required: true type: integer - description: Max recent-activity items (default 40, max 120) in: query name: limit type: integer - description: Include practice completions in recent-activity feed in: query name: include_practices type: boolean produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AdminUserLearningActivityDetails' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get full learning activity for a user (admin) tags: - learning /api/v1/admin/users/{user_id}/recent-activity: get: description: 'Reverse-chronological feed for profile UI: account joined plus LMS completion milestones (lessons/modules/courses/programs). Optional practice completions via include_practices. Does not include "started learning path" unless you add persisted engagement events—the schema stores completions only.' parameters: - description: Target user ID in: path name: user_id required: true type: integer - description: Max items after merge (default 40, max 120) in: query name: limit type: integer - description: Include completed LMS practices (more verbose) in: query name: include_practices type: boolean produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.UserRecentActivityFeed' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Recent activity timeline for a user (admin) tags: - lms /api/v1/admin/users/{user_id}/sessions: get: parameters: - description: User ID in: path name: user_id required: true type: integer responses: "200": description: OK schema: properties: data: items: properties: id: type: string label: type: string last_seen_at: type: string platform: type: string type: object type: array message: type: string type: object security: - Bearer: [] summary: List a user's active device sessions tags: - admin /api/v1/admin/users/{user_id}/sessions/{id}: delete: parameters: - description: User ID in: path name: user_id required: true type: integer - description: Session UUID in: path name: id required: true type: string responses: "200": description: OK schema: properties: message: type: string type: object "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Remove a user's active device session tags: - admin /api/v1/admin/users/{user_id}/subscriptions: get: description: Returns display status, active plans by category, full subscription history, and related payments parameters: - description: Target user ID in: path name: user_id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AdminUserSubscriptionDetails' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get all subscription details for a user (admin) tags: - subscriptions /api/v1/admin/users/{user_id}/subscriptions/extend: post: consumes: - application/json description: 'Unified admin action: if the learner has no active subscription in the plan''s category, creates one (grant). If they already have an active subscription in that category, extends it by one period of the selected plan (and switches plan_id when different). Optionally records a SUCCESS payment at the plan price (record_payment, default true).' parameters: - description: Target learner user ID in: path name: user_id required: true type: integer - description: Plan to grant or extend in: body name: body required: true schema: $ref: '#/definitions/handlers.adminApplySubscriptionReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.subscriptionRes' type: object "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.subscriptionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Grant or extend a learner subscription (admin) tags: - subscriptions /api/v1/admin/users/deletion-requests: get: consumes: - application/json description: Returns account deletion requests for admin panel tracking with filtering and pagination parameters: - description: Search in first_name, last_name, email, phone_number in: query name: query type: string - description: Role filter in: query name: role type: string - description: User status filter (ACTIVE, PENDING, SUSPENDED, DEACTIVATED) in: query name: status type: string - description: Deletion state filter (PENDING, DUE, CANCELLED) in: query name: state type: string - description: Requested before (RFC3339) in: query name: requested_before type: string - description: Requested after (RFC3339) in: query name: requested_after type: string - description: Scheduled before (RFC3339) in: query name: scheduled_before type: string - description: Scheduled after (RFC3339) in: query name: scheduled_after type: string - description: Page number (default 1) in: query name: page type: integer - description: Page size (default 10, max 100) in: query name: page_size type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.ListAccountDeletionRequestsData' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: List account deletion requests tags: - user /api/v1/admin/users/export: get: produces: - text/csv - text/csv responses: "200": description: CSV export; filename is supplied in Content-Disposition headers: Content-Disposition: description: attachment; filename=export.csv type: string schema: type: file "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Export users as CSV (admin) tags: - user /api/v1/admin/users/summary: get: consumes: - application/json description: Returns total users, active users, and users who joined this month produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.UserSummary' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get user summary statistics tags: - user /api/v1/admin/vimeo/oembed: get: consumes: - application/json description: Fetches oEmbed metadata for a Vimeo video URL parameters: - description: Vimeo video URL in: query name: url required: true type: string - description: Desired width in: query name: width type: integer - description: Desired height in: query name: height type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/vimeo.OEmbedResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get oEmbed data for a Vimeo URL tags: - Vimeo /api/v1/admin/vimeo/sample: get: consumes: - application/json description: Fetches a sample video from Vimeo and returns video details along with an embeddable iframe for client-side integration parameters: - default: "76979871" description: Vimeo Video ID to use as sample in: query name: video_id type: string - default: 640 description: Player width in: query name: width type: integer - default: 360 description: Player height in: query name: height type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.documentAdminGetSampleVideoData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get a sample Vimeo video with iframe embed tags: - Vimeo /api/v1/admin/vimeo/uploads/pull: post: consumes: - application/json description: Initiates a pull upload where Vimeo fetches the video from a URL parameters: - description: Pull Upload Request in: body name: request required: true schema: $ref: '#/definitions/handlers.CreatePullUploadRequest' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.VimeoUploadResultData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a pull upload to Vimeo tags: - Vimeo /api/v1/admin/vimeo/uploads/tus: post: consumes: - application/json description: Initiates a TUS resumable upload and returns the upload link parameters: - description: TUS Upload Request in: body name: request required: true schema: $ref: '#/definitions/handlers.CreateTusUploadRequest' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.VimeoUploadResultData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create a TUS resumable upload to Vimeo tags: - Vimeo /api/v1/admin/vimeo/videos: get: consumes: - application/json description: Returns a paginated list of videos for the Vimeo API token (GET https://api.vimeo.com/me/videos) parameters: - default: 1 description: Page number (starts at 1) in: query name: page type: integer - default: 25 description: Page size (Vimeo max 100) in: query name: per_page type: integer - description: Search query in: query name: query type: string - description: Sort field (e.g. date, alphabetical, plays, likes, comments, duration, relevance) in: query name: sort type: string - description: asc or desc in: query name: direction type: string - description: Vimeo filter (e.g. embeddable, playable) in: query name: filter type: string - description: Vimeo filter_type when using filter in: query name: filter_type type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.VimeoVideoResponse' type: array metadata: $ref: '#/definitions/handlers.VimeoVideosListMetadata' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List videos stored in the Vimeo account tags: - Vimeo /api/v1/admin/vimeo/videos/{video_id}: delete: consumes: - application/json description: Deletes a video from the Vimeo account parameters: - description: Vimeo Video ID in: path name: video_id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a video from Vimeo tags: - Vimeo get: consumes: - application/json description: Retrieves video details from Vimeo by video ID parameters: - description: Vimeo Video ID in: path name: video_id required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.VimeoVideoResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get video information from Vimeo tags: - Vimeo /api/v1/admin/vimeo/videos/{video_id}/embed: get: consumes: - application/json description: Generates an embeddable player iframe for the video parameters: - description: Vimeo Video ID in: path name: video_id required: true type: string - default: 640 description: Player width in: query name: width type: integer - default: 360 description: Player height in: query name: height type: integer - description: Autoplay video in: query name: autoplay type: boolean - description: Loop video in: query name: loop type: boolean - description: Mute video in: query name: muted type: boolean - description: Background mode (no controls) in: query name: background type: boolean produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.VimeoEmbedResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get embed code for a Vimeo video tags: - Vimeo /api/v1/admin/vimeo/videos/{video_id}/status: get: consumes: - application/json description: Returns the current transcoding status of a video parameters: - description: Vimeo Video ID in: path name: video_id required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.VimeoTranscodeStatusData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get transcode status of a Vimeo video tags: - Vimeo /api/v1/admin/ws/connect: get: parameters: - description: Access token in: query name: token required: true type: string responses: "101": description: WebSocket protocol upgrade; subsequent messages are notification events schema: type: string "401": description: Authentication failed schema: type: string summary: Connect Socket tags: - ws /api/v1/affiliates/apply: post: consumes: - application/json description: Requires an active learner, accept_terms=true, the current terms_version from GET /affiliates/me, and a 10-2000 character application. New applications are PENDING. Rejected applicants may reapply; pending, approved, or suspended accounts cannot replace their application. parameters: - description: Request in: body name: body required: true schema: $ref: '#/definitions/domain.AffiliateApplicationInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateMutationData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Apply to the affiliate program tags: - affiliates /api/v1/affiliates/commissions: get: description: Returns only the authenticated learner earnings. Status is PENDING during the holding period, AVAILABLE after maturity, RESERVED for a requested payout, PAID after payout settlement, or REVERSED. Monetary values are decimal strings and never combined across currencies. parameters: - description: Page size (1-100) in: query name: limit type: integer - description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateCommissionData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List my affiliate commissions tags: - affiliates /api/v1/affiliates/me: get: description: Returns the authenticated learner application (null before applying), versioned program rules, current settings, referral counts, and separate currency balances. Approved affiliates receive a share code and, when configured, a share URL. No referred-user personal data is exposed. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateDashboard' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get my affiliate dashboard and program rules tags: - affiliates /api/v1/affiliates/payouts: get: description: Returns only the authenticated learner payout requests, including snapshotted beneficiary details and external transfer references. Optional status is REQUESTED, PAID, or REJECTED. parameters: - description: Page size (1-100) in: query name: limit type: integer - description: Offset in: query name: offset type: integer - description: Status filter in: query name: status type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliatePayoutData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List my affiliate payouts tags: - affiliates post: consumes: - application/json description: Requires an approved active affiliate. Reserves all matured available earnings in the requested currency after outstanding recovery debt. The server calculates the amount; clients cannot select an amount. One REQUESTED payout per currency is allowed. This endpoint does not transfer money. parameters: - description: Request in: body name: body required: true schema: $ref: '#/definitions/domain.AffiliatePayoutInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AffiliateMutationData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Request payout of available affiliate earnings tags: - affiliates /api/v1/app/version/check: get: description: Public endpoint for mobile clients to determine if an app update is available (force or optional) parameters: - description: 'Platform: ANDROID or IOS' in: query name: platform required: true type: string - description: Client build number (Android versionCode / iOS build number) in: query name: version_code required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.MobileAppVersionCheckResult' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Check mobile app version tags: - app-versions /api/v1/assessments: get: produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepAssessmentsData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: List Exam Prep Assessments tags: - learning /api/v1/auth/apple: post: consumes: - application/json description: Validates an Apple identity token (iOS, Android, or web). On first sign-in, include email and name if Apple only returns them to the client once. parameters: - description: Apple login payload in: body name: body required: true schema: type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Authentication failed schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' summary: Login via Sign in with Apple identity token tags: - auth /api/v1/auth/customer-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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Access denied schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Login user tags: - auth /api/v1/auth/google/android: post: parameters: - description: Google ID Token from Android in: body name: idToken required: true schema: type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Authentication failed schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Login via Google Android ID Token tags: - auth /api/v1/auth/google/callback: get: parameters: - description: Code in: query name: code type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Authentication failed schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Google login callback tags: - auth /api/v1/auth/google/login: get: produces: - text/plain responses: "302": description: Redirect to Google authorization URL; see Location header headers: Location: description: Google authorization URL type: string schema: type: string "503": description: Google OAuth is not configured schema: $ref: '#/definitions/domain.ErrorResponse' 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/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Access denied schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Refresh token tags: - auth /api/v1/auth/sessions/replace: post: consumes: - application/json parameters: - description: Session replacement challenge and active session ID in: body name: body required: true schema: properties: challenge_token: type: string session_id: type: string required: - challenge_token - session_id type: object produces: - application/json responses: "200": description: OK schema: properties: data: $ref: '#/definitions/handlers.loginUserRes' message: type: string type: object "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' summary: Replace an active learner device session tags: - auth /api/v1/catalog/courses: get: description: 'Public discovery only: titles, descriptions, thumbnails, access tiers and published content counts. Draft courses are excluded. Playback, quiz questions and progress use authenticated learning endpoints.' parameters: - description: Search course name or description (maximum 200 characters) in: query name: q type: string - default: 20 description: Page size (1-100) in: query name: limit type: integer - default: 0 description: Non-negative offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.PublicCatalogPage' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Browse published course highlights without signing in tags: - public-catalog /api/v1/catalog/courses/{id}: get: description: Returns published chapters, lesson highlights and quiz titles/counts. No video URLs, questions, answers or learner information are included. Unpublished courses return 404, even for staff tokens. parameters: - description: Published course ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.PublicCourseOutline' type: object "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: Preview a published course outline without signing in tags: - public-catalog /api/v1/chapters/{chapterId}/lessons: get: parameters: - description: Chapter ID in: path name: chapterId required: true type: integer - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.lessonListData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List lessons for a chapter tags: - learning /api/v1/chapters/{chapterId}/practices: get: parameters: - description: Exam prep unit ID in: path name: chapterId required: true type: integer - description: Page size. Omit to return all practices for the unit. in: query name: limit type: integer - description: Offset (used when limit is provided) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepPracticesByUnitData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices for a unit tags: - learning /api/v1/chapters/{chapterId}/quizzes: get: description: Returns quizzes and pagination. Admins see drafts; learners see published quizzes with published question sets in published chapters and courses. parameters: - description: Chapter ID in: path name: chapterId required: true type: integer - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.quizListData' type: object "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List quizzes in a chapter tags: - quizzes /api/v1/chapters/{id}: get: parameters: - description: Chapter ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepUnit' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get chapter by ID tags: - learning /api/v1/courses: get: parameters: - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.courseListData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List courses tags: - learning /api/v1/courses/{courseId}/chapters: get: parameters: - description: Course ID in: path name: courseId required: true type: integer - default: 20 description: Page size in: query name: limit type: integer - default: 0 description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.chapterListData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List chapters for a course tags: - learning /api/v1/courses/{courseId}/checkout: post: consumes: - application/json description: Creates a one-time Chapa checkout at the course's server-configured price. Verified payment grants permanent access to this course only. Optional referral_code applies first-touch affiliate attribution before checkout; same-code retries preserve the original expiry. Invalid or conflicting codes return 400. parameters: - description: Course ID in: path name: courseId required: true type: integer - description: Optional checkout phone in: body name: body schema: $ref: '#/definitions/domain.CourseCheckoutRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.CourseCheckoutResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Purchase a course tags: - learning /api/v1/courses/{courseId}/practices: get: parameters: - description: Exam prep course ID in: path name: courseId required: true type: integer - description: Page size. Omit to return all practices for the course. in: query name: limit type: integer - description: Offset (used when limit is provided) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepPracticesByCatalogCourseData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices for a course tags: - learning /api/v1/courses/{id}: get: parameters: - description: Course ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepCatalogCourse' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get course by ID tags: - learning /api/v1/devices/register: post: consumes: - application/json parameters: - description: Device token and platform in: body name: body required: true schema: $ref: '#/definitions/handlers.RegisterDeviceToken.Request' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Register Device Token tags: - devices /api/v1/devices/unregister: post: consumes: - application/json parameters: - description: Device token to unregister in: body name: body required: true schema: $ref: '#/definitions/handlers.UnregisterDeviceToken.Request' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Unregister Device Token tags: - devices /api/v1/faqs: get: description: Returns active FAQs for public/help center usage parameters: - description: Filter by category in: query name: category type: string - description: Limit (default 50) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listFAQsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: List published FAQs tags: - faqs /api/v1/faqs/{id}: get: description: Returns one active FAQ item parameters: - description: FAQ ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.faqRes' type: object "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 published FAQ by ID tags: - faqs /api/v1/field-options: get: description: Returns active options grouped by field_key (e.g. education_level, country) parameters: - description: Filter by field key in: query name: field_key type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ProfileFieldOptionsGrouped' type: object summary: List field options for client dropdowns tags: - field-options /api/v1/field-options/fields: get: description: Returns field_key values that have options (e.g. education_level, country) parameters: - description: If true, only keys with active options in: query name: active_only type: boolean produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListFieldKeysData' type: object summary: List distinct field keys tags: - field-options /api/v1/files/audio: post: consumes: - multipart/form-data parameters: - description: Audio file (mp3, wav, ogg, m4a, aac, webm) in: formData name: file required: true type: file produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.UploadAudioData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Upload an audio file tags: - files /api/v1/files/complete-upload: post: consumes: - application/json description: Call after PUT upload to upload_url. Returns the same file metadata shape as POST /files/upload. parameters: - description: Complete upload request in: body name: body required: true schema: $ref: '#/definitions/handlers.completePresignedUploadReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.uploadMediaRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Complete presigned MinIO upload tags: - files /api/v1/files/presign-upload: post: consumes: - application/json description: Returns a short-lived PUT URL and object key. Upload the file with HTTP PUT to upload_url using the same Content-Type, then call POST /files/complete-upload. parameters: - description: Presigned upload request in: body name: body required: true schema: $ref: '#/definitions/handlers.presignedUploadReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.presignedUploadRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Create presigned MinIO upload URL tags: - files /api/v1/files/refresh-url: post: consumes: - application/json parameters: - description: reference (object key, minio://..., or existing presigned URL) in: body name: body required: true schema: $ref: '#/definitions/handlers.refreshFileURLReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.RefreshFileURLData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Refresh presigned URL for a file tags: - files /api/v1/files/upload: post: consumes: - multipart/form-data parameters: - description: 'Media type: image|audio|video|pdf' in: formData name: media_type required: true type: string - description: Media file in: formData name: file required: true type: file produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.uploadMediaRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Upload media file tags: - files /api/v1/files/url: get: parameters: - description: MinIO object key (e.g. profile_pictures/uuid.jpg) in: query name: key required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.GetFileURLData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get presigned URL for a file tags: - files /api/v1/issues: post: consumes: - application/json description: Allows any authenticated user to report an issue they encountered parameters: - description: Issue report payload in: body name: body required: true schema: $ref: '#/definitions/handlers.createIssueReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.issueRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Report an issue tags: - issues /api/v1/issues/me: get: description: Returns paginated issues reported by the authenticated user parameters: - default: 20 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.issueListRes' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get my reported issues tags: - issues /api/v1/lessons/{id}: get: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepLesson' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get lesson by ID tags: - learning /api/v1/lessons/{lessonId}/practices: get: parameters: - description: Exam prep lesson ID in: path name: lessonId required: true type: integer - description: Page size. Omit to return all practices for the lesson. in: query name: limit type: integer - description: Offset (used when limit is provided) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListExamPrepPracticesByLessonData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices for a lesson tags: - learning /api/v1/notifications: delete: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete User Notifications tags: - notifications get: parameters: - default: 10 description: Limit in: query name: limit type: integer - default: 0 description: Offset in: query minimum: 0 name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.GetUserNotificationResponse' "400": description: Invalid request schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Get User Notification tags: - notifications /api/v1/notifications/{id}: delete: description: Deletes one in-app notification owned by the authenticated user. parameters: - description: Notification ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a single in-app notification tags: - notifications get: description: Returns a single in-app notification. Users may only fetch their own notifications unless they have list-all access. parameters: - description: Notification ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.Notification' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get in-app notification by ID tags: - notifications /api/v1/notifications/{id}/read: patch: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.Notification' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark Notification As Read tags: - notifications /api/v1/notifications/{id}/unread: patch: parameters: - description: Id format: int64 in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.Notification' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark Notification As Unread tags: - notifications /api/v1/notifications/delete-in-app: post: consumes: - application/json description: Deletes in-app notifications by ID for the authenticated user. Non-matching IDs are ignored. parameters: - description: Notification IDs in: body name: body required: true schema: type: object produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.DeleteInAppNotificationsData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete multiple in-app notifications tags: - notifications /api/v1/notifications/mark-all-read: post: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark All Notifications As Read tags: - notifications /api/v1/notifications/mark-all-unread: post: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark All Notifications As Unread tags: - notifications /api/v1/notifications/unread: get: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.CountUnreadNotificationsResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: type: string security: - Bearer: [] summary: Count Unread Notifications tags: - notifications /api/v1/payments: get: description: Returns the authenticated user's payment history parameters: - default: 20 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.paymentRes' type: array type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get payment history tags: - payments /api/v1/payments/{id}: get: description: Returns details of a specific payment parameters: - description: Payment ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.paymentRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get payment details tags: - payments /api/v1/payments/{id}/cancel: post: description: Cancels a payment that is still pending parameters: - description: Payment ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string security: - Bearer: [] summary: Cancel a pending payment tags: - payments /api/v1/payments/arifpay/success: get: description: Displays the Rezina success page after ArifPay redirects the learner back to the backend. parameters: - description: ArifPay session identifier in: query name: session_id type: string - description: ArifPay session identifier in: query name: sessionId type: string - description: Fallback payment nonce in: query name: nonce type: string - description: Sessionid in: query name: sessionID type: string produces: - text/html responses: "200": description: HTML success page schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: ArifPay payment success page tags: - payments /api/v1/payments/chapa/callback: get: description: Verifies payment after Chapa redirects to callback_url parameters: - description: Transaction reference in: query name: trx_ref type: string - description: Chapa reference ID in: query name: ref_id type: string - description: Payment status in: query name: status type: string - description: Tx ref in: query name: tx_ref type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Chapa payment callback tags: - payments /api/v1/payments/chapa/direct: post: consumes: - application/json description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Chapa direct charge request in: body name: body required: true schema: $ref: '#/definitions/handlers.initiateChapaDirectPaymentReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.InitiateChapaDirectChargeResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Initiate Chapa direct charge subscription payment tags: - payments /api/v1/payments/chapa/direct/authorize: post: consumes: - application/json description: Completes OTP authorization for Chapa direct charge methods that require it. parameters: - description: Chapa direct charge authorization request in: body name: body required: true schema: $ref: '#/definitions/handlers.authorizeChapaDirectPaymentReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.AuthorizeChapaDirectChargeResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Authorize Chapa direct charge with OTP tags: - payments /api/v1/payments/chapa/direct/methods: get: description: Returns wallet methods supported by Chapa Direct Charge API (USSD push and OTP flows). produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/domain.ChapaDirectChargeMethod' type: array type: object summary: Get Chapa direct charge payment methods tags: - payments /api/v1/payments/chapa/success: get: description: Displays the Rezina success page after Chapa redirects the learner to return_url parameters: - description: Chapa transaction reference (tx_ref) in: query name: trx_ref type: string - description: Chapa transaction reference in: query name: tx_ref type: string - description: Chapa reference ID in: query name: ref_id type: string - description: Payment status from Chapa redirect in: query name: status type: string produces: - text/html responses: "200": description: HTML success page schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Chapa payment success page tags: - payments /api/v1/payments/direct: post: consumes: - application/json description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Direct payment request in: body name: body required: true schema: $ref: '#/definitions/handlers.initiateDirectPaymentReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.InitiateDirectPaymentResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Initiate direct payment tags: - payments /api/v1/payments/direct/methods: get: description: Returns list of payment methods that support direct payment (OTP-based) produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/domain.ARIFPAYPaymentMethod' type: array type: object summary: Get direct payment methods tags: - payments /api/v1/payments/direct/verify-otp: post: consumes: - application/json description: Verifies the OTP sent for direct payment methods (Amole, HelloCash, etc.) parameters: - description: OTP verification request in: body name: body required: true schema: $ref: '#/definitions/handlers.verifyOTPReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.VerifyOTPResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Verify OTP for direct payment tags: - payments /api/v1/payments/methods: get: description: Returns payment methods available on Chapa checkout produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/domain.ChapaPaymentMethod' type: array type: object summary: Get Chapa payment methods tags: - payments /api/v1/payments/subscribe: post: consumes: - application/json description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Payment request in: body name: body required: true schema: $ref: '#/definitions/handlers.initiatePaymentReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.InitiateSubscriptionPaymentResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Initiate subscription payment tags: - payments /api/v1/payments/verify/{session_id}: get: description: Checks the payment status with the payment provider parameters: - description: Session ID in: path name: session_id required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.paymentRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Verify payment status tags: - payments /api/v1/payments/webhook: post: consumes: - application/json - application/json description: Processes payment notifications from Chapa (charge.success, etc.) parameters: - description: Exact signed Chapa webhook payload in: body name: body required: true schema: $ref: '#/definitions/domain.ChapaWebhookPayload' - description: Webhook HMAC signature. Alternatively send chapa-signature; one of these headers is required. in: header name: x-chapa-signature type: string - description: Alternative signature header in: header name: chapa-signature type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Authentication failed schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Handle Chapa webhook tags: - payments /api/v1/personas: get: parameters: - default: true description: When true (default), return only active personas in: query name: active_only type: boolean - description: Page size in: query name: limit type: integer - description: Offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.listPersonasData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List LMS personas (catalog for practice assignment) tags: - personas /api/v1/personas/{id}: get: parameters: - description: Persona ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.LmsPersona' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get LMS persona by ID tags: - personas /api/v1/practices: get: parameters: - description: Page size. Omit (with offset) to return all practices. in: query name: limit type: integer - description: Offset. Defaults to 0 when limit is provided; ignored semantics when both omitted (all rows). in: query name: offset type: integer - description: When true, return only practices with no parent links (admin) in: query name: unlinked_only type: boolean produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ListAllExamPrepPracticesData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List practices globally tags: - learning /api/v1/practices/{id}: get: parameters: - description: Exam prep practice ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get practice by ID tags: - learning /api/v1/practices/{practiceId}/questions: get: description: Returns paginated questions for an practice, including shared stimulus blocks and each question's effective dynamic payload parameters: - description: Exam-prep practice ID in: path name: practiceId required: true type: integer - description: Question type filter (e.g. AUDIO) in: query name: question_type type: string - 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.paginatedQuestionSetItemsRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get questions by practice tags: - question-set-items /api/v1/progress-summary: get: description: Returns progress for the course → unit → module → lesson learning hierarchy. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepProgressSummary' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get my learning progress summary tags: - learning /api/v1/progress/practices/{id}/complete: post: consumes: - application/json description: Marks a practice question set as completed for the authenticated learner in its exam-prep parent scope parameters: - description: Practice Question Set ID in: path name: id required: true type: integer - description: Optional practice parent scope in: body name: body schema: $ref: '#/definitions/domain.CompletePracticeInput' - description: Parent kind in: query name: parent_kind type: string - description: Parent id in: query name: parent_id type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Mark practice as completed tags: - progression /api/v1/progress/quizzes/{id}/complete: post: consumes: - application/json description: The id is the quiz shell ID, not question_set_id. The single chapter scope is inferred; optional scope must use CHAPTER and that chapter ID. Records completion for the authenticated learner. parameters: - description: Quiz shell ID in: path name: id required: true type: integer - description: Optional chapter scope in: body name: body schema: $ref: '#/definitions/domain.CompletePracticeInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Complete a chapter quiz tags: - quizzes /api/v1/questions/audio-answer: post: consumes: - multipart/form-data parameters: - description: Question ID in: formData name: question_id required: true type: integer - description: Question Set ID in: formData name: question_set_id required: true type: integer - description: Audio recording in: formData name: file required: true type: file produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.SubmitAudioAnswerData' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Submit audio answer for a question tags: - questions /api/v1/quizzes/{id}: get: description: Returns a quiz shell. Learners only see published quizzes with a published question set in a published chapter and course. parameters: - description: Quiz shell ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.ExamPrepPractice' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get a chapter quiz tags: - quizzes /api/v1/quizzes/{practiceId}/questions: get: description: Learner endpoint. Requires a published quiz and question set, accessible chapter, subscription eligibility, and learning sequence access. parameters: - description: Quiz shell ID in: path name: practiceId required: true type: integer - description: Question type filter in: query name: question_type type: string - default: 10 description: Page size (1-200) in: query name: limit type: integer - default: 0 description: Non-negative offset in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.paginatedQuestionSetItemsRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing or invalid access token schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Permission, subscription, or sequence access denied schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Quiz or published parent not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: List questions in a chapter quiz tags: - quizzes /api/v1/ratings: get: description: Returns paginated ratings for a specific target parameters: - description: Target type (app, course, sub_course) in: query name: target_type required: true type: string - description: Target ID (0 for app) in: query name: target_id required: true type: integer - description: Limit (default 20) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.ratingRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get ratings for a target tags: - ratings post: consumes: - application/json description: Submit a rating for an app, course, or sub-course parameters: - description: Submit rating payload in: body name: body required: true schema: $ref: '#/definitions/handlers.submitRatingReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ratingRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Submit a rating tags: - ratings /api/v1/ratings/{id}: delete: description: Deletes a rating by ID for the current user parameters: - description: Rating ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Delete a rating tags: - ratings /api/v1/ratings/me: get: description: Returns the current user's rating for a specific target parameters: - description: Target type (app, course, sub_course) in: query name: target_type required: true type: string - description: Target ID (0 for app) in: query name: target_id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ratingRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get my rating for a target tags: - ratings /api/v1/ratings/me/all: get: description: Returns all ratings submitted by the current user produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.ratingRes' type: array type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get all my ratings tags: - ratings /api/v1/ratings/summary: get: description: Returns the total count and average stars for a specific target parameters: - description: Target type (app, course, sub_course) in: query name: target_type required: true type: string - description: Target ID (0 for app) in: query name: target_id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ratingSummaryRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get rating summary for a target tags: - ratings /api/v1/referrals: get: description: Returns only the authenticated learner's referral history and conversion flags. Referred learners' names, emails, and phone numbers are not exposed. parameters: - default: 20 description: Page size in: query maximum: 100 minimum: 1 name: limit type: integer - default: 0 description: Number of entries to skip in: query minimum: 0 name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralHistoryData' type: object "400": description: Invalid pagination schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: List My Referrals tags: - referrals /api/v1/referrals/apply: post: consumes: - application/json description: Attributes the authenticated learner to one referrer. Apply within seven days of account creation and before any successful positive payment. Codes are case-insensitive and surrounding whitespace is ignored. Self referral, reassignment, inactive referrers, and invalid codes are rejected. parameters: - description: Referral share code in: body name: body required: true schema: $ref: '#/definitions/handlers.applyReferralReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request or ineligible referral schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Apply Referral Code tags: - referrals /api/v1/referrals/code: get: description: Returns the authenticated learner's stable share code, creating it when necessary. Codes are case-insensitive. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralCodeData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Get Referral Code tags: - referrals post: description: Creates or returns the authenticated learner's stable share code. Requires an approved affiliate with an active STUDENT or OPEN_LEARNER account. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralCodeData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Create Referral Code tags: - referrals /api/v1/referrals/me: get: description: Returns the learner's code, current commission percentage, referral/conversion counts, and commission-wallet balances by currency. produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralOverviewData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Get My Referrals tags: - referrals /api/v1/referrals/wallet: get: description: Returns wallet balances separately by currency and a paginated commission ledger. Decimal amounts and percentages are strings. Only the qualifying course payment earns a commission; duplicate callbacks and renewals do not. Reversed credits are excluded from balances. This endpoint does not initiate cash payouts. parameters: - default: 20 description: Page size in: query maximum: 100 minimum: 1 name: limit type: integer - default: 0 description: Number of entries to skip in: query minimum: 0 name: offset type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.ReferralWalletData' type: object "400": description: Invalid pagination schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Unable to process referral request schema: type: string security: - Bearer: [] summary: Get Referral Wallet tags: - referrals /api/v1/subscription-plans: get: description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - default: true description: Customer requests always return active plans; false is honored only by the admin endpoint in: query name: active_only type: boolean - description: Filter by plan category (EDUCATION) in: query name: category type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.planRes' type: array type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: List subscription plans tags: - subscriptions /api/v1/subscription-plans/{id}: get: description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Plan ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.planRes' type: object "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get a subscription plan tags: - subscriptions /api/v1/subscriptions: post: consumes: - application/json deprecated: true description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Subscribe payload in: body name: body required: true schema: $ref: '#/definitions/handlers.subscribeReq' produces: - application/json responses: "201": description: Created schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.subscriptionRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Subscribe to a plan (Admin only - bypasses payment) tags: - subscriptions /api/v1/subscriptions/{id}/auto-renew: put: consumes: - application/json description: Enables or disables auto-renewal for a subscription parameters: - description: Subscription ID in: path name: id required: true type: integer - description: Auto-renew payload in: body name: body required: true schema: $ref: '#/definitions/handlers.autoRenewReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Set auto-renew tags: - subscriptions /api/v1/subscriptions/{id}/cancel: post: description: Cancels the user's subscription parameters: - description: Subscription ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageResponse' "400": description: Invalid request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Cancel subscription tags: - subscriptions /api/v1/subscriptions/checkout: post: consumes: - application/json description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Subscribe with payment payload in: body name: body required: true schema: $ref: '#/definitions/handlers.subscribeWithPaymentReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.subscriptionCheckoutRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Resource not found schema: $ref: '#/definitions/domain.ErrorResponse' "409": description: User already has active subscription schema: $ref: '#/definitions/domain.ErrorResponse' "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Subscribe to a plan with payment tags: - subscriptions /api/v1/subscriptions/history: get: description: Returns the authenticated user's subscription history parameters: - default: 20 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.subscriptionRes' type: array type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get subscription history tags: - subscriptions /api/v1/subscriptions/me: get: description: Returns all active subscriptions for the authenticated user (one per plan category) produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: items: $ref: '#/definitions/handlers.subscriptionRes' type: array type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Get active subscriptions tags: - subscriptions /api/v1/subscriptions/request-checkout-link: post: consumes: - application/json description: 'Learner endpoint retired: returns 410 Gone. Purchase a course using POST /api/v1/courses/{courseId}/checkout. Administrative subscription history remains available.' parameters: - description: Optional plan or category for deep link in: body name: body schema: $ref: '#/definitions/handlers.requestCheckoutLinkReq' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.requestCheckoutLinkRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "409": description: Conflict schema: $ref: '#/definitions/domain.ErrorResponse' "410": description: Gone schema: $ref: '#/definitions/domain.ErrorResponse' "429": description: Too Many Requests schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Send web checkout link to learner tags: - subscriptions /api/v1/subscriptions/status: get: description: Returns whether the authenticated user has an active subscription produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.CheckSubscriptionStatusData' type: object "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Check subscription status tags: - subscriptions /api/v1/user: put: consumes: - application/json description: Updates user profile information (partial updates supported) parameters: - 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/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.UploadProfilePictureData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Upload profile picture tags: - user /api/v1/user/{user_id}/is-profile-completed: get: consumes: - application/json description: Returns the profile completion status and percentage for the specified user parameters: - description: User ID in: path name: user_id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.CheckProfileCompletedData' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Check if user profile is completed tags: - user /api/v1/user/{user_name}/is-pending: get: consumes: - application/json description: Returns whether the specified user has a status of "pending" parameters: - description: User name in: path name: user_name required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.CheckUserPendingData' type: object "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/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: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.CheckPhoneEmailExistRes' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Check if phone number or email exist tags: - user /api/v1/user/knowledge-level: put: consumes: - application/json description: Updates the authenticated learner's self-reported knowledge level. parameters: - 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/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/domain.ErrorResponse' "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Update user's knowledge level tags: - user /api/v1/user/me: delete: description: Starts account deletion with grace period before permanent purge produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/handlers.DeleteMyUserAccountData' type: object "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Plain-text error returned by the handler or authentication middleware schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Request deletion of my account tags: - user /api/v1/user/me/deletion/cancel: post: description: Cancels a pending self-deletion request during grace period produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.MessageAPIResponse' "401": description: Plain-text error returned by the handler or authentication middleware schema: type: string "403": description: Plain-text error returned by the handler or authentication middleware schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Cancel my account deletion request tags: - user /api/v1/user/me/sessions: get: produces: - application/json responses: "200": description: OK schema: properties: data: items: properties: id: type: string is_current: type: boolean label: type: string last_seen_at: type: string platform: type: string type: object type: array message: type: string type: object security: - Bearer: [] summary: List the current learner's active device sessions tags: - user /api/v1/user/me/sessions/{id}: delete: parameters: - description: Session UUID in: path name: id required: true type: string responses: "200": description: OK schema: properties: message: type: string type: object "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Remove one of the current learner's device sessions tags: - user /api/v1/user/register: post: consumes: - application/json description: Registers a learner with email or phone and password. The server assigns the learner role and selects the OTP medium from the contact method. An optional referral_code attributes the new account atomically; invalid or ineligible codes reject registration. 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/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Register user tags: - user /api/v1/user/resend-otp: 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/handlers.MessageResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Resend OTP tags: - otp /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/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Reset password tags: - user /api/v1/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/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Send register code tags: - user /api/v1/user/sendResetCode: post: consumes: - application/json description: Sends a password-reset OTP code by email or SMS for learner (mobile) accounts. Email delivers the numeric code (not a link). 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/handlers.MessageAPIResponse' "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string summary: Send reset code tags: - user /api/v1/user/user-profile: get: consumes: - application/json description: Get user profile produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.APIResponse' - properties: data: $ref: '#/definitions/domain.UserProfileResponse' type: object "400": description: Plain-text error returned by the handler or authentication middleware schema: type: string "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Account audience, status, permission, or subscription does not allow this operation schema: type: string "500": description: Plain-text error returned by the handler or authentication middleware schema: type: string security: - Bearer: [] summary: Get user profile 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: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.loginUserRes' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Verify OTP tags: - user /api/v1/videos/engagement/heartbeat: post: consumes: - application/json description: Records playback position for analytics (completion, replay, and drop-off). Send periodic heartbeats while watching; set ended=true when the viewer leaves. A new session starts after 30 minutes of inactivity or when ended=true on the prior session. parameters: - description: Playback heartbeat in: body name: body required: true schema: $ref: '#/definitions/domain.VideoEngagementHeartbeatInput' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/domain.VideoWatchSessionResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "401": description: Missing, invalid, or expired Bearer token schema: type: string "403": description: Forbidden schema: $ref: '#/definitions/domain.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' security: - Bearer: [] summary: Report video playback progress tags: - videos /api/v1/vimeo/oembed: get: consumes: - application/json description: Fetches oEmbed metadata for a Vimeo video URL parameters: - description: Vimeo video URL in: query name: url required: true type: string - description: Desired width in: query name: width type: integer - description: Desired height in: query name: height type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/vimeo.OEmbedResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/domain.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get oEmbed data for a Vimeo URL tags: - Vimeo /api/v1/vimeo/sample: get: consumes: - application/json description: Fetches a sample video from Vimeo and returns video details along with an embeddable iframe for client-side integration parameters: - default: "76979871" description: Vimeo Video ID to use as sample in: query name: video_id type: string - default: 640 description: Player width in: query name: width type: integer - default: 360 description: Player height in: query name: height type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/domain.Response' - properties: data: $ref: '#/definitions/handlers.GetSampleVideoData' type: object "500": description: Internal Server Error schema: $ref: '#/definitions/domain.ErrorResponse' "503": description: Service unavailable schema: $ref: '#/definitions/domain.ErrorResponse' summary: Get a sample Vimeo video with iframe embed tags: - Vimeo /api/v1/ws/connect: get: parameters: - description: Access token in: query name: token required: true type: string responses: "101": description: WebSocket protocol upgrade; subsequent messages are notification events schema: type: string "401": description: Authentication failed schema: type: string summary: Connect Socket tags: - ws /payment/success: get: description: Displays the Rezina success page after Chapa redirects the learner to return_url parameters: - description: Chapa transaction reference (tx_ref) in: query name: trx_ref type: string - description: Chapa transaction reference in: query name: tx_ref type: string - description: Chapa reference ID in: query name: ref_id type: string - description: Payment status from Chapa redirect in: query name: status type: string produces: - text/html responses: "200": description: HTML success page schema: type: string "500": description: Internal server error schema: $ref: '#/definitions/domain.ErrorResponse' summary: Chapa payment success page tags: - payments securityDefinitions: Bearer: in: header name: Authorization type: apiKey swagger: "2.0"