# Assign roles to user **POST /api/users/{userId}/roles** Assign API resource roles to the user. The roles will be added to 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 ### 201 The API resource roles has been assigned to the user. ### 400 Bad Request ### 401 Unauthorized ### 403 Forbidden ### 404 Not Found ### 422 Unprocessable Content [Powered by Bump.sh](https://bump.sh)