public function getEmbeddedEditUrl($id, Template $request = null)
    {
        if ($request !== null) {
          $params = $request->toParams();
          $response = $this->rest->post(
            static::EMBEDDED_EDIT_URL_PATH . '/' . $id,
            $params
          );
        } else {
          $response = $this->rest->get(
            static::EMBEDDED_EDIT_URL_PATH . '/' . $id
          );
        }


        $this->checkResponse($response);

        return new EmbeddedResponse($response);
    }