If you look in your install you can see examples in the /CMSApiExamples directory. Here is a snippet which creates a new "Menu Item" in the /Api-Example node of the content tree.
private bool CreateDocument()
{
// Create an instance of the Tree provider first
TreeProvider tree = new TreeProvider(CMSContext.CurrentUser);
// Get the parent node - the API Example folder
TreeNode parentNode = tree.SelectSingleNode(CMSContext.CurrentSiteName, "/API-Example", "en-us");
if (parentNode != null)
{
// Create a new instance of the Tree node
TreeNode newNode = TreeNode.New("CMS.MenuItem", tree);
// Set the document's properties
newNode.DocumentName = "My new document";
newNode.DocumentCulture = "en-us";
// Insert the document into the content tree
newNode.Insert(parentNode);
return true;
}
return false;
}