Users - Roles
Revoke a specific role from a user
Overview
Revoke a specific role from an existing user.
Use Cases
- Access Reduction: Downgrade a user's permissions when they move to a different team or department.
- Security: Remove access that is no longer required as part of the principle of least privilege.
Identification
- userId: Numerical identifier of the user.
- roleName: The exact string identifier of the role (e.g., ROLE_USER_MANAGER).
Getting User ID
- To find users and their numerical IDs, use the Users Management API:
- GET /public/v1/users - Retrieve all users with their id field.
- The id field in the user response is the {userId} used in this endpoint's path parameter.
Getting Role Names
- Discover valid role names via GET /public/v1/users/roles/available.
Related Operations
- Add Roles: POST /public/v1/users/{userId}/roles
- List All Roles: GET /public/v1/users/{userId}/roles
Required Permission
manage_public_users
delete/public/v1/users/{userId}/roles/{roleName}
Path parameters
userIdinteger required
The unique numerical identifier of the target user. If you do not have this ID, you can find it by searching for the user via GET /public/v1/users.
roleNamestring required
The exact internal name of the role to remove. Discover valid names via the Available Roles endpoint.
Response
No Content - Role successfully removed.