edit/save mode api