Subservers are owned by an existing Virtualmin user. Sub-server indicates ownership, not domain name. You can create a subdomain that is a regular virtual server, and you can create a sub-server that is not a subdomain of the parent domain. The word “subdomain” got overloaded by the cPanel folks (and we hate them for it, because it’s confused millions of people for the past twenty years).
If this is a subserver you can’t give it a new Webmin account. It’s already got one (the parent domain). If you want it to have it’s own login, you don’t want it to be a sub-server.
Either create a new virtual server (if you want it to have its own user account), or a sub-server (if you want it to be owned by an existing virtual server). If you want to use the API call you’ve got, just remove the webmin option…a sub-server does not get its own login, because it is owned by the parent.
@asimpledeveloper - why don’t you open the whole tickets issues on virtualmin support packages? - you seems to me bright and they do support bright brains as yours… its all clear there and here and we all feel you… have a go with pro support instead of ripping off us who are genuine and help with so developed scripts… - sorry man but even I do feel your needs - your an selfish - I do not support you nor I hope anyone would not support your ideas… give us some bit of free food would ya? get lost as cancer on this forums… - you have no idea how many folks can developed free stuff for virtualmin…which was there in long time ago??? - Please enlighten us all and share, we are hungry to get it - or - really just get lost f** spam. - those so called templates virtualmin did pushed since they did even exist - even my correction templates since 2018…