Deploy app programmatically

In the development workflow I found sometimes exporting an app to JSON and importing in with a different name to the QA people can have a "freezed" version to test.
This procedure is long and very error prone.
will be great count with a procedure do this programmatically, something like a POST to some API REST endpoint.