> For the complete documentation index, see [llms.txt](https://bump.sh/logto/doc/logto-management-api/llms.txt)

# Update roles for user

> PUT /api/users/{userId}/roles
> 
> Update API resource roles assigned to the user. This will replace the existing roles.



## Servers
- Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.)


## Authentication methods
- O auth2


## Parameters

### Path parameters

- **userId** (string)
  The unique identifier of the user.



### Body: application/json (object)

- **roleIds** (array[string])
  An array of API resource role IDs to assign.



## Responses
### 200
The API resource roles has been updated for the user successfully.

### 400
Bad Request

### 401
Unauthorized

### 403
Forbidden

### 404
Not Found

### 422
Unprocessable Content


[Powered by Bump.sh](https://bump.sh)
