Assign role to a user via API

Hello All,

I’m trying to assign a role to the user via API.

Right now my arguments are

$set_user_fields = ["name_value_list"=>array(
                array("name" => "user_name","value" => $AgentDetail['email']),
                array("name" => "first_name","value" => $AgentDetail['firstname']),
                array("name" => "last_name","value" => $AgentDetail['lastname']),
                array("name" => "email1","value" => $AgentDetail['email']),
            )];

Please tell me what index do i have to add to assign the role to user via api.

I’m using Rest API v4.1

Thanks in Advance