---
title: "Update a user's roles"
method: PUT
path: "/api/v4/users/{user_id}/roles"
tags: ["users"]
---

# Update a user's roles

`PUT /api/v4/users/{user_id}/roles`

Update a user's system-level roles. Valid user roles are "system_user", "system_admin" or both of them. Overwrites any previously assigned system-level roles.
##### Permissions
Must have the `manage_roles` permission.

## Path parameters

- `user_id` string, required

## Request body

- object
  - `roles` string, required

## Response `200`

User roles update successful

- 38cb7293StatusOK
  - `status` string — Will contain "ok" if the request was successful and there was nothing else to return

## Other responses

- `400` — Invalid or missing parameters in URL or request body
- `401` — No access token provided
- `403` — Do not have appropriate permissions

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
