> ## Documentation Index
> Fetch the complete documentation index at: https://developer.chessplay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Student from Classroom

> Remove a student from a classroom

## Path Parameters

<ParamField path="id" type="integer" required>
  Classroom ID
</ParamField>

## Body Parameters

<ParamField body="student_id" type="integer" required>
  Student ID to remove
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.chessplay.io/api/v1/classrooms/1/remove-student/ \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"student_id": 123}'
  ```

  ```python Python theme={null}
  import requests

  headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
  response = requests.post(
      "https://api.chessplay.io/api/v1/classrooms/1/remove-student/",
      headers=headers,
      json={"student_id": 123}
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "message": "Student removed successfully",
    "student": {
      "id": 123,
      "username": "FastMalamute",
      "name": "John Doe"
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Student is not in this classroom"
  }
  ```
</ResponseExample>
