How can i create the first moderator of an app from platform api?

My goal is to create an application and private groups from platform api.
I manage to create the application to create users, but I can’t find the solution to create the first moderator to then be able to create groups.