---
title: "Update User Subject"
method: PATCH
path: "/admin/users/{user_id}/subject"
tags: ["admin"]
---

# Update User Subject

`PATCH /admin/users/{user_id}/subject`

Set a teacher's matière from the admin dashboard. This is the support
escape hatch: the self-service toggle (multi-matière branch) locks as soon
as the teacher has authored content.

## Path parameters

- `user_id` string, required

## Request body

- UpdateUserSubjectRequest
  - `subject` 'maths' | 'physique-chimie', required

## Response `200`

Successful Response

- UpdateUserSubjectResponse
  - `success` boolean, required
  - `user_id` string, required
  - `previous_subject` string, nullable
  - `subject` 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/c407f3b5a05b/schema)
