add switch branch on api