---
title: "Update Student"
method: PATCH
path: "/api/v1/courses/{course_id}/students/{student_id}"
tags: ["api", "api", "courses"]
---

# Update Student

`PATCH /api/v1/courses/{course_id}/students/{student_id}`

## 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}/students/{student_id}`
- Auth: HTTP bearer

## Path parameters

- `course_id` string, required
- `student_id` string, required

## Request body

- StudentUpdate: email O'ZGARMAYDI — bu modelda yo'q. group_id — admin o'quvchini shu kursning boshqa guruhiga ko'chirishi mumkin (null yuborilsa guruhdan chiqariladi). Guruh boshqa kursga tegishli bo'lsa rad etiladi. status — a'zoning rolini o'zgartiradi (student/teacher/supportTeacher/parent/staff/spam). is_course_admin — faqat kurs muallifi yoki kurs-admini o'zgartira oladi.
  - `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).
  - `phone` string, nullable
  - `contacts` StudentContact[], nullable
    - `relation` string, required
    - `phone` string, required
  - `group_id` string, nullable
  - `is_course_admin` boolean, nullable
  - `parent_of` string, nullable

## Response `200`

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)
