We have recently added a new optional parameter to the Archive Project REST API to specify a branch to archive rather than only being able to archive master branches.
Please see documentation for more details: https://developer.playcanvas.com/en/user-manual/api/project-archive/