Just use the client_add function from the remote API. Do not add anything manually in sys_user or sys_group as this is all handled by the client_add.
function client_add($session_id, $reseller_id, $params);
$params is an array. Like in all functions of the API, the keys of this array are identical to the fields of the corresponding database table. In this case, the client table. The sys_* database fields are for ispconfigs internal use and do not go into $params.
You find all available functions in the remoting.inc.php file.