    async def post(self, group_name):
        """POST creates a group by name"""
        model = self.get_json_body()
        if model is None:
            model = {}
        else:
            self._check_group_model(model)

        existing = orm.Group.find(self.db, name=group_name)
        if existing is not None:
            raise web.HTTPError(409, f"Group {group_name} already exists")

        usernames = model.get('users', [])
        # check that users exist
        users = self._usernames_to_users(usernames)

        # create the group
        self.log.info("Creating new group %s with %i users", group_name, len(users))
        self.log.debug("Users: %s", usernames)
        group = orm.Group(name=group_name)
        self.db.add(group)
        group.users = users
        self.db.commit()
        self.write(json.dumps(self.group_model(group)))
        self.set_status(201)
POST creates a group by name
jupyterhub/apihandlers/groups.py