---
title: "Update Exercise Sharing"
method: PUT
path: "/teacher_exercises/{exercise_id}/sharing"
tags: ["teacher_exercises"]
---

# Update Exercise Sharing

`PUT /teacher_exercises/{exercise_id}/sharing`

Update sharing options for a teacher exercise with proper permission checks.

Users can update sharing if:
- They own the exercise directly, OR
- They have write access through folder inheritance

## Path parameters

- `exercise_id` string, required

## Request body

- UpdateExerciseSharingRequest
  - `sharing_options` SharingOptions, required — Model for sharing configuration across folders, exams, and exercises
    - `shared_with_school` boolean
    - `shared_with` string[]
    - `read_only` boolean

## Response `200`

Successful Response

- ShareExerciseResponse
  - `status` string, required
  - `message` string, required

## 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/8d495ed916c6/schema)
