Create a realm from web application

Is it currently possible to create a realm and assign permissions for that realm from our custom web application?

Overall, yes.
But mind the persistence of synced realms, and try to keep on windows/mac with regards to ApprovePermissions. At least for now.

Perhaps this thread can give you some more insights:

You’ll likely find this section of our docs useful