---
title: "Update User role"
method: PUT
path: "/roles/{id}"
tags: ["User Roles"]
---

# Update User role

`PUT /roles/{id}`

### Update Role Details

This endpoint allows the client to update the details of a specific role.

#### Request Body

- `name` (string, required): The name of the role.
    
- `level` (string, required): The level of the role.
    
- `twofa_type` (string, required): The type of two-factor authentication associated with the role.
    
- `userIds` (array of integers, required): An array of user IDs associated with the role.

## Request body

- object
  - `level` string
  - `name` string
  - `twofa_type` string
  - `userIds` number[]

## Response `201`

Successful operation

- object
  - `role` object
    - `id` string
    - `level` string
    - `name` string
    - `twofa_type` string
    - `userIds` string[]

## Other responses

- `404` — Error

---

[API](https://skmtc.net/commpeak/apis/dialer-api-v2-0-1.md) · [All operations](https://skmtc.net/commpeak/apis/dialer-api-v2-0-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/commpeak/dialer-api-v2-0-1/revisions/eacecf960bb6/schema)
