---
title: "Assign role"
method: POST
path: "/users/assign-role/{userId}"
tags: ["🔐 Authentication"]
---

# Assign role

`POST /users/assign-role/{userId}`

The API endpoint allows administrators to change the roles of users within the system.

This functionality is restricted to users with the `ADMIN` role, ensuring that only authorized personnel can modify user roles.

It provides an essential tool for managing user permissions and ensuring proper authorization levels within the system.

## Request body

- object
  - `role` string

## Response `200`

Assign role

- object
  - `data` object
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/revisions/a9f3a290e4dc/schema)
