API: allow create/update site with public codes