Skip to main content

Classrooms

Manage physical or logical classroom definitions within a school.

All endpoints require Authorization: Bearer <token> and X-SCHOOL-ID headers.


List Classrooms

GET /classrooms

Returns all classrooms for the current school.

Example

curl -X GET https://api.vanillatots.com/classrooms \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID"

Response 200 OK

[
{
"id": "uuid",
"name": "JSS 1A",
"school": "school-uuid"
}
]

Create Classroom

POST /classrooms

Create a new classroom.

Request Body

FieldTypeRequiredDescription
namestringYesClassroom name (e.g., "JSS 1A")
levelstringYesEducation level (e.g., "Junior Secondary")

Example

curl -X POST https://api.vanillatots.com/classrooms \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "JSS 1B",
"level": "Junior Secondary"
}'

Response 200 OK — Returns the created ClassroomResponse.


Get Classroom

GET /classrooms/{id}

Retrieve a single classroom by ID.

Path Parameters

ParameterTypeDescription
iduuidClassroom ID

Response 200 OK — Returns a ClassroomResponse object.