Skip to main content
PUT
Update a user's department role
Admin-only endpoint to update a user’s department role by user ID.

Request

Headers

Request Body

Request Body Schema

Response

200 OK - Successfully updated department role

400 Bad Request

401 Unauthorized

404 Not Found

500 Internal Server Error

Example

Notes

  • This is an admin-only endpoint - requires administrative privileges
  • The user ID must be a valid MongoDB ObjectId
  • Department roles can include: “manager”, “supervisor”, “agent”, “admin”, etc.
  • The role may affect the user’s permissions within their department
  • Only administrators can update other users’ department roles
  • Role names should match predefined roles in your system

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
payload
object

Response

Successfully updated department role

message
string
data
object