User roles for services

Hello,
in the admin panel I can select or create users. There on the role page I can define which role this user has for using the various services.
My users are creates in my app, when they register to this app. How can I control via API which role this new user has for the defined services?
Best Regards

You can do this in the configuration if the “user” service. There you can specify for each app which role the user should get by default.
Is that what you mean/need?

Yes that is what I mean, but I need to do it via the API and not in the control panel.