code: public function postAction()
      {
          $request = $this->environment->getRequestHelper();
          $id = $request->getIdentifierParam('name');
          try {
              $this->pageList->getPage($id);
          } catch (InvalidParameterException $e) {
              $page = $this->pageList->addPageFromRequest($id, $request);
              $this->environment->sendJSONResult($page->getJSON());
              return;
          }
          throw new InvalidParameterException("Page already exists");
      }
docs: Creates a new page