EduCare
API Reference

Update a class

PUT
/classes/{id}

Authorization

BearerAuth
AuthorizationBearer <token>

Obtain your API key from the developer dashboard at https://dashboard.educare.com

In: header

Path Parameters

id*integer

Request Body

application/json

name*string
teacher_id*integer
schedule*string
room?string
capacity?integer
semester?string

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://api.educare.com/v1/classes/0" \  -H "Content-Type: application/json" \  -d '{    "name": "Introduction to Biology",    "teacher_id": 568,    "schedule": "Tue/Thu 13:00-14:30"  }'
{
  "id": 890,
  "name": "Advanced Physics",
  "teacher_id": 567,
  "teacher": {
    "id": 567,
    "name": "Dr. Sarah Chen",
    "email": "sarah.chen@educare.com",
    "department": "Science",
    "subjects": [
      "Physics",
      "Chemistry"
    ],
    "phone": "+1-555-222-3333",
    "office_room": "B-204",
    "hire_date": "2018-08-15",
    "created_at": "2018-08-15T09:00:00Z",
    "updated_at": "2025-11-20T16:45:00Z"
  },
  "schedule": "Mon/Wed/Fri 10:00-11:30",
  "room": "Science Lab 3",
  "capacity": 30,
  "enrolled_count": 25,
  "semester": "Spring 2026",
  "created_at": "2025-12-01T08:00:00Z"
}
{
  "error": "Validation failed: email is required",
  "code": "VALIDATION_ERROR",
  "status": 400
}
{
  "error": "Invalid API key",
  "code": "UNAUTHORIZED",
  "status": 401
}
{
  "error": "Student not found",
  "code": "NOT_FOUND",
  "status": 404
}