---
title: "Changes to Replace a user's manageable roles. Rejects paid/unknown roles, refuses\nself-demotion out of admin, and (in the DB tx) refuses to remove the\nlast admin. On success, the target's sessions are invalidated so the\nchange takes effect on their next request."
method: PUT
path: "/api/admin/users/{id}/roles"
---

# Changes to Replace a user's manageable roles. Rejects paid/unknown roles, refuses
self-demotion out of admin, and (in the DB tx) refuses to remove the
last admin. On success, the target's sessions are invalidated so the
change takes effect on their next request.

`PUT /api/admin/users/{id}/roles`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 1 of 81 revisions.

- **2026-07-24** `777be1d647f8`: 1 info

## Changes

- **2026-07-24** `777be1d647f8`: 1 info
  - endpoint added

---

[Operation](https://skmtc.dev/scholia-study/apis/scholia-api/docs/api/admin/users/:id/roles/put.md) - [API](https://skmtc.dev/scholia-study/apis/scholia-api.md) - [Page](https://skmtc.dev/scholia-study/apis/scholia-api/changes/api/admin/users/:id/roles/put)
