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

# Update User Role

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

Update a user's role from the admin dashboard.

## Path parameters

- `user_id` string, required

## Request body

- UpdateUserRoleRequest
  - `role` 'admin' | 'cpge_user' | 'student' | 'teacher', required

## Response `200`

Successful Response

- UpdateUserRoleResponse
  - `success` boolean, required
  - `user_id` string, required
  - `previous_role` string, required
  - `role` 'admin' | 'cpge_user' | 'student' | 'teacher', 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)
