Skip to main content
POST
/
api
/
student
/
add
curl --request POST \
  --url https://your-api-host/api/student/add \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Priya Sharma",
    "email": "priya.sharma@school.edu",
    "class": "10",
    "section": "A",
    "rollNumber": 42
  }'
{
  "_id": "64f1a2b3c4d5e6f7a8b9c0d1",
  "name": "Priya Sharma",
  "email": "priya.sharma@school.edu",
  "class": "10",
  "section": "A",
  "rollNumber": 42,
  "__v": 0
}

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 student and persists it to the database. Returns the created student object including the generated _id.
This endpoint does not require authentication. It is publicly accessible.

Request body

name
string
required
Full name of the student.
email
string
required
Email address of the student. Used for identification and communication.
class
string
required
The class (grade level) the student is enrolled in, for example "10" or "Grade 5".
section
string
required
The section within the class, for example "A" or "B".
rollNumber
number
required
The student’s unique roll number within their class and section.

Response

Returns the newly created student object.
_id
string
required
MongoDB-generated unique identifier for the student.
name
string
required
Full name of the student.
email
string
required
Email address of the student.
class
string
required
The class the student is enrolled in.
section
string
required
The section within the class.
rollNumber
number
required
The student’s roll number.
__v
number
MongoDB internal version key.
curl --request POST \
  --url https://your-api-host/api/student/add \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Priya Sharma",
    "email": "priya.sharma@school.edu",
    "class": "10",
    "section": "A",
    "rollNumber": 42
  }'
{
  "_id": "64f1a2b3c4d5e6f7a8b9c0d1",
  "name": "Priya Sharma",
  "email": "priya.sharma@school.edu",
  "class": "10",
  "section": "A",
  "rollNumber": 42,
  "__v": 0
}

Build docs developers (and LLMs) love