code: public function addUserToGroup($id, array $groupIds)
      {
          $parameters = [
              'query' => [],
              'body' => json_encode(['groupIds' => $groupIds], JSON_UNESCAPED_UNICODE),
              'headers' => [],
          ];
  
          $result = $this->post('v1/accounts/users/' . $id . '/groups', $parameters);
          $result = new User($result);
  
          return $result;
      }
docs: Add the user to one or more groups.
  
  @param  int   $id
  @param  int[] $groupIds an array of int values
  @return User