This page documents two related update endpoints. The first lets you modify any student field; the second is a focused shortcut for toggling the email reminder setting without affecting other fields.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/aakash811/Student-Progress-Tracker/llms.txt
Use this file to discover all available pages before exploring further.
PUT /api/students/:id
Updates one or more fields on an existing student record. All body fields are optional — only the fields you send are changed. IfcodeforcesHandle is included, the server immediately re-syncs all Codeforces data (ratings, contest history, submissions) for the new handle and returns the refreshed document.
Path parameter
The MongoDB ObjectId of the student to update.
Body parameters
Updated full name.
Updated email address. Must remain unique across all records.
Updated phone number.
Updated Codeforces username. Providing this field triggers a full re-sync for the new handle after the database update is applied.
Set to
true to disable inactivity emails, or false to re-enable them.If
codeforcesHandle is present in the request body, the endpoint performs a full Codeforces data sync for the new handle after saving the update. The response will contain the re-synced ratings, contestData, and submissions rather than the previous cached values.Example
Response
Returns200 OK with the updated (and optionally re-synced) student object.
Errors
| Status | Body | Cause |
|---|---|---|
404 Not Found | { "error": "No such student found" } | No student exists with the given id. |
500 Internal Server Error | { "error": "..." } | Database error or sync failure. |
PUT /api/students/:id/toggle-reminder
A focused endpoint for enabling or disabling inactivity email reminders for a single student. Only theemailRemindersDisabled field is updated; all other fields are left unchanged.
Path parameter
The MongoDB ObjectId of the student whose reminder setting you want to change.
Body parameter
Pass
true to stop sending inactivity reminder emails to this student, or false to resume them.Example
Response
Returns200 OK with the updated student object reflecting the new emailRemindersDisabled value.
Errors
| Status | Body | Cause |
|---|---|---|
500 Internal Server Error | { "error": "Failed to toggle reminder" } | Database update failed. |