by Mohammed Essaid MEZERREG.
The second way is the correct one, also you should use the same name of the custom field when you created it also, the function is core_user_create_users so as the function mentions it's 'users' and not 'user' plural taking all this in mind this is how you create a new user or n users:
assuming that you have userOne to userN classes ready and you want to pass them to the in a post request:
first you should wrap them in an array like this : $users = array($userOne, $userTwo, ...., $userN);
then wrap them in the list of users (it can be an object or an array) : $param = array("users" => $users);
you can also make it short like this $param = array("users" => array($userOne, $userTwo, ..... , $userN)):
then pass the $param to your method or function that will handle the post request