Hi Hughie
I just did a test on my local where I don't have Integration Bus setup, but just using API to create a new page. In CMS, I added basic workflow to the root. and this page is to be added to the root as well. The page is create with a red X next to it instead of green check, which means it's not published.
string pageTitle = txtInput.Text.Trim();
TreeProvider tree = new TreeProvider(MembershipContext.AuthenticatedUser); // needs some kind of permission inorder to create a page
string cultureCode = "en-us";
TreeNode node = TreeNode.New("CMS.MenuItem", tree);
node.DocumentName = pageTitle;
node.DocumentCulture = cultureCode;
NodeSelectionParameters nsp = new NodeSelectionParameters()
{
AliasPath = "/",
SelectSingleNode = true,
CultureCode = cultureCode,
SiteName = SiteContext.CurrentSiteName
};
TreeNode parentNode = DocumentHelper.GetDocument(nsp, tree);
if (parentNode != null)
{
DocumentHelper.InsertDocument(node, parentNode, tree);
}