---
title: "Enroll"
method: POST
path: "/api/v1/courses/{course_id}/enroll"
tags: ["api", "api", "courses"]
---

# Enroll

`POST /api/v1/courses/{course_id}/enroll`

## Request

- Base URL: `https://www.faroz.uz` (the document declares no server; this is the origin it was published from)
- URL: `https://www.faroz.uz/api/v1/courses/{course_id}/enroll`
- Auth: HTTP bearer

Joriy foydalanuvchi kurs guruhiga qo'shiladi: a'zolik SO'ROVI
(status=request; kurs admini tasdiqlagach o'quvchiga aylanadi). Ochiq
darslar (is_public) uchun a'zolik shart emas.

## Path parameters

- `course_id` string, required

## Request body

- EnrollRequest: O'quvchining kursga (guruhni tanlab) qo'shilishi — ilova foydalanuvchisi o'zi. group_id ixtiyoriy: berilmasa kursning birinchi guruhi tanlanadi (ochiq kursga havola orqali bir bosishda qo'shilish uchun).
  - `group_id` string, nullable

## Response `201`

Successful Response

- CourseStudent
  - `id` string, required
  - `full_name` string, required
  - `email` string, nullable
  - `phone` string, nullable
  - `avatar_url` string, nullable
  - `mastery_percent` integer
  - `has_debt` boolean
  - `status` 'request' | 'student' | 'teacher' | 'supportTeacher' | 'parent' | 'staff' | 'spam': Kurs o'quvchisining roli/holati (COURSES_API.md §3).
  - `subscription` 'active' | 'trial' | 'debtor' | 'expired': Kurs o'quvchisining obuna (reja) holati (COURSES_API.md §3).
  - `group_id` string, nullable
  - `is_course_admin` boolean
  - `parent_of` string, nullable
  - `rank` integer, nullable
  - `contacts` StudentContact[]
    - `relation` string, required
    - `phone` string, required
  - `payments` LessonPayment[]
    - `lesson` integer, required
    - `due` integer, required
    - `paid` integer, required
  - `phone_verification_status` string, nullable
  - `enrolled_at` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/faroz/apis/edu-app-api.md) · [All operations](https://skmtc.dev/faroz/apis/edu-app-api/llms.txt) · [OpenAPI document](https://skmtc.dev/faroz/apis/edu-app-api/revisions/414a551ba773?raw)
