π Authentication
Assign role
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.
post/users/assign-role/{userId}
Request
- Base URLhttps://api.freeapi.app/api/v1
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"role": "ADMIN"
}Response
Assign role
Example response
{
"message": "Role changed for the user",
"statusCode": 200,
"success": true
}Changes
No recorded changes to this operation across all 1 revision of this API.