Rolesv1User Roles
Delete user-role assignment
Deletes a user-role assignment and responds 204 No Content. Removing an Administrator assignment is blocked with 403 when fewer than two active Administrators would remain; a caller lacking delete permission also receives 403.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/user-roles/497f6eca-6276-4993-bfeb-53cbbbba6f08"Empty
{
"status": 400,
"message": "Role name cannot be empty"
}{
"status": 401,
"message": "Unauthorized"
}{
"status": 403,
"message": "Cannot remove Administrator role. At least 2 active administrators must remain to prevent system lockout."
}{
"status": 404,
"message": "Role not found"
}{
"status": 500,
"message": "server_error"
}Handler: SetUserRole → SetUserRoleSrv / executeSetUserRole. Upserts the user's single role for a customer (updates existing customer role link or creates one). Body uses customer_id + role_basename; path {id} is the target user_id.
Handler: GetAllRolesV2. Returns models.GetAllResponseAPI envelope; data items are transform.RoleResponse.