How to create application and assign access profile to application through API

There is internal tool for application building automation just like role and access profiles. You can request for it if it’s not available publicly.
It uses same API which products uses , takes CSV as input just like role/AP builder.