Imports students from a CSV file into a class.
POST
/classes/{classId}/students/import
curl \
--request POST 'http://localhost:8080/api/classes/{classId}/students/import' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: multipart/form-data" \
--form "file=@file"
Response examples (200)
{
"code": 200,
"data": {
"errors": [],
"message": "Students imported successfully",
"success": true,
"credentials": [
{
"email": "nguyen.van.a@example.com",
"fullName": "Nguyen Van A",
"password": "Abc123!@#",
"username": "nguyen.van.a@example.com",
"studentId": "user_001"
}
],
"studentsCreated": 1
},
"message": "Students imported successfully",
"success": true
}
Response examples (400)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (404)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (500)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}