Nextcloud call function to create User through Application

Hi,
I am trying to create Users through my own application inside Nextcloud, sorry a little new still to Nextcloud Api calls.
I am using the following function to call the createUser function in IUserManager in nextcloud API.

public function createUser(string $uid, string $password): DataResponse {

   $userz = $this->userManager->createUser($uid, $password);

   return new Dataresponse($userz);

}

But this is returning me no response and no user is being created, can someone please guide me a little regarding it.

Thank you