---
title: "Add/Remove roles from users"
method: PUT
path: "/users/roles"
tags: ["User"]
---

# Add/Remove roles from users

`PUT /users/roles`

## Request body

- object
  - `actions` object[] — An object containing list of actions to be applied on users roles
    - `user_id` integer, required
    - `action` 'add' | 'revoke', required — The action to perform
    - `role` 'Admin', required — Name of the role that the action goes against

## Response `200`

Role updates are successfully applied, the updated list of user objects

- object
  - `users` UserWithRoles[]
    - `id` integer
    - `full_name` string
    - `display_name` string
    - `email` string
    - `role_names` string[]

## Other responses

- `400` — Required parameter is missing.
- `401` — Authorization information is missing or invalid.
- `403` — If a user without proper permissions tries to call this endpoint, the call is rejected with 403 Forbidden.
- `404` — The user(s) was not found.
- `422` — Invalid parameters.

---

[API](https://skmtc.net/instructure/apis/studio-public-api.md) · [All operations](https://skmtc.net/instructure/apis/studio-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instructure/studio-public-api/revisions/4838a5113869/schema)
