Your API code is being executed under the current user accessing the site at the time the code is modified. If you want to specifically target a user, then do something like this:
TreeProvider tree = new TreeProvider(MembershipContext.AuthenticatedUser);
TreeNode parentPage = tree.SelectNodes()
.Path("/your-path")
.OnCurrentSite()
.Culture("en-us")
.TopN(1)
.FirstOrDefault();