Importing Workflow or Workflow Statuses in App

I would like to create an app that among other things generates new workflows. I figured that I could create new workflows using the API, however, that would be quite cumbersome + as of now, it is not possible to create custom workflow statuses via the API. I noticed, that some statuses are imported during the Jira Service Management Project creation so there should be some way to achieve this? I also learned that it is possible to export your workflows to XML or to the marketplace but I did not figure out if it is possible to import these in a programmatic way. Do you have any insights on this?

at least status creation appears to be an essential feature for app development, I am really wondering how this has not been implemented yet…