---
title: "Reorder Exercises"
method: PUT
path: "/teacher-exams/{exam_id}/subjects/exercises/order"
tags: ["Teacher Exams Subjects"]
---

# Reorder Exercises

`PUT /teacher-exams/{exam_id}/subjects/exercises/order`

Reorder the exam's structured_exercises to match the given id sequence.

The request must list every existing exercise id exactly once — partial
reorderings or unknown ids are rejected so the new version is always a
pure permutation of the previous one (EXC-66).

The ids are then reassigned 1..n in the new order, because an exercise's
id *is* its number everywhere it is shown: the card badge, the exported
PDF heading and what the chat means by « exercice 2 ». Every other write
path already keeps that invariant — additions append `max(id) + 1`, both
deletion paths reindex — and reordering without it left a subject
numbered 4, 1, 3, 2 (EXC-835).

## Path parameters

- `exam_id` string, required

## Request body

- ReorderExercisesRequest
  - `exercise_ids` integer[], required

## Response `200`

Successful Response

- object

## 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.dev/excellence-ai/apis/excellence-learning/revisions/d367d251945b?raw)
