Documentation Index
Fetch the complete documentation index at: https://mintlify.com/praveenarya123/sps-backend/llms.txt
Use this file to discover all available pages before exploring further.
Creates a new application record and saves it to the database. The application status is automatically set to PENDING upon creation.
No authentication is required to call this endpoint.
Request body
The MongoDB ObjectId of the student submitting the application.
The MongoDB ObjectId of the teacher the application is directed to.
The category of the application. Common values: LEAVE, COMPLAINT, REQUEST.
The body text of the application describing the student’s request or complaint.
Response
Returns the newly created application object.
The unique MongoDB ObjectId assigned to the application.
The MongoDB ObjectId of the student who submitted the application.
The MongoDB ObjectId of the teacher the application is addressed to.
The application category (e.g., LEAVE, COMPLAINT, REQUEST).
The application message body.
The current status of the application. Always PENDING on creation.
Internal MongoDB document version key.
curl --request POST \
--url http://localhost:5000/api/application/send \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25."
}'
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "PENDING",
"__v": 0
}