---
title: "Update Course Structure"
method: PUT
path: "/admin/holiday-courses/courses/{course_id}/structure"
tags: ["Admin - Holiday Courses"]
---

# Update Course Structure

`PUT /admin/holiday-courses/courses/{course_id}/structure`

Update the entire course structure by replacing the units array.

This endpoint allows admins to:
- Reorder units within a course
- Modify unit titles, summaries, types, and content
- Add or remove units
- Update the complete course structure in a single operation

The endpoint validates that the course is a holiday_workbook type to ensure
admins are only structurally editing these types of courses.

Only accessible by admin users.

## Path parameters

- `course_id` string, required — The ID of the course to update

## Request body

- UpdateCourseStructureRequest — Request model for updating entire course structure
  - `units` CourseUnit[], required
    - `unit_id` string
    - `type` 'chapter' | 'section' | 'topic' | 'concept_explanation' | 'introduction' | 'conclusion' | 'content' | 'flashcards' | 'qcm', required — Valid unit types for course content
    - `title` string, required
    - `unit_summary` string, required
    - `suggested_content_type` 'chapter' | 'section' | 'topic' | 'concept_explanation' | 'introduction' | 'conclusion' | 'content' | 'flashcards' | 'qcm' — Valid unit types for course content
    - `brief_description` string, nullable
    - `generated_content` string, nullable

## Response `200`

Successful Response

- Course — Represents a user course created through image uploads.
  - `_id` string
  - `user_id` string, required
  - `is_teacher_course` boolean
  - `folder_id` string, nullable
  - `title` string, required
  - `subject` string, nullable
  - `status` 'UPLOADING' | 'PROCESSING_IMAGES' | 'STRUCTURING' | 'GENERATING_CONTENT' | 'COMPLETED' | 'FAILED'
  - `original_image_paths` string[]
  - `raw_content_blob` string, nullable
  - `units` CourseUnit[], nullable
    - `unit_id` string
    - `type` 'chapter' | 'section' | 'topic' | 'concept_explanation' | 'introduction' | 'conclusion' | 'content' | 'flashcards' | 'qcm', required — Valid unit types for course content
    - `title` string, required
    - `unit_summary` string, required
    - `suggested_content_type` 'chapter' | 'section' | 'topic' | 'concept_explanation' | 'introduction' | 'conclusion' | 'content' | 'flashcards' | 'qcm' — Valid unit types for course content
    - `brief_description` string, nullable
    - `generated_content` string, nullable
  - `generated_course_content` string, nullable
  - `revision_deck_status` 'GENERATING' | 'COMPLETED' | 'FAILED', nullable
  - `knowledge_quiz_status` 'GENERATING' | 'COMPLETED' | 'FAILED', nullable
  - `error_message` string, nullable
  - `warnings` string[], nullable
  - `figures_crop` object, nullable
  - `processing_options` object, nullable
  - `source_type` 'student_upload' | 'teacher_assigned' | 'holiday_workbook', nullable
  - `holiday_course_context` object, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/ef67479ed898/schema)
