---
title: "Upload Student List"
method: POST
path: "/teacher/classes/{class_id}/upload-student-list"
tags: ["Teacher"]
---

# Upload Student List

`POST /teacher/classes/{class_id}/upload-student-list`

Parse a CSV/XLSX file and return the list of students for preview.
Checks for duplicates against existing students and pending students.
Does NOT create pending students yet - that happens on confirm.

With use_ai=True, the AI fallback reads the raw rows (capped at 60 lines)
instead of the deterministic parser — for exports whose shape we don't
recognize.

## Path parameters

- `class_id` string, required

## Request body

- UploadStudentListRequest
  - `file_content` string, required
  - `file_name` string, required
  - `content_type` string, required
  - `use_ai` boolean

## Response `200`

Successful Response

- UploadStudentListResponse
  - `parsed_students` ParsedStudentResponse[], required
    - `first_name` string, required
    - `last_name` string, required
    - `email` string, nullable
    - `status` string, required
  - `warnings` string[], required
  - `ai_available` boolean
  - `used_ai` boolean

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-02** `8d495ed916c6` — 3 info
  - added the new optional request property `use_ai`
  - added the optional property `ai_available` to the response with the `200` status
  - added the optional property `used_ai` to the response with the `200` status

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/teacher/classes/:class_id/upload-student-list/post.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/437cd8414e9e/schema)
