Skip to main content
PATCH
/
api
/
users
/
{id}
/
role
curl -X PATCH https://api-verifier-2.onrender.com/api/users/65a1b2c3d4e5f6g7h8i9j0k1/role \
  -H "Authorization: Bearer <admin-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "moderator"
  }'
{
  "success": true,
  "message": "Role updated"
}

Documentation Index

Fetch the complete documentation index at: https://docs.quader864.ir/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint requires admin role.

Path parameters

id
string
required
The user ID

Request body

role
string
required
New role for the user. Must be one of: user, moderator, admin

Response

success
boolean
Operation success status
message
string
Confirmation message
curl -X PATCH https://api-verifier-2.onrender.com/api/users/65a1b2c3d4e5f6g7h8i9j0k1/role \
  -H "Authorization: Bearer <admin-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "moderator"
  }'
{
  "success": true,
  "message": "Role updated"
}