what is the URL I should use to edit a user account? I need to edit user account data via services module 

I tried endpoint/user, endpoint/user/UID, endpoint/user/UID/edit, endpoint/user/update, endpoint/user/edit

with args like in user_resources.inc 

It returns 404user not registered

despite successfully loggedin

$cookie_session = $logged_user-&gt;session_name . '=' . $logged_user-&gt;sessid;

// User data
$user_data = array();
$user_data['uid'] = $logged_user-&gt;user-&gt;uid;
$user_data['data']['name'] = 'test4'; 

$data = json_encode($user_data);

// cURL code
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/html/mob/api-    mob/user/".$user_data['uid']);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_COOKIE, "$cookie_session"); // use the previously saved session
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
'Content-Type: application/json',                                                                                
'Content-Length: ' . strlen($data), mymodule_get_csrf_header())                                                                       
);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);


what I am missing here or if one could do it via services please provide an example
To update a user with Drupal Services, you make a PUT call to:

?q=[my-endpoint]/user/1.json


Replacing [my-endpoint] with the machine name of your Service endpoint. Here's some example JSON to PUT:

{
  "uid":"1",
  "name":"bob",
  "mail":"bob@hotmail.com",
  "current_pass":"secret",
  "pass_pass1":"new-secret",
  "pass_pass2":"new-secret"
}


You must also attach a header to your call with a name of X-CSRF-Token using a value that can be retrieved here: ?q=services/session/token