The short answer is that it depends on the GM's wishes.
The longer answer is that some GMs are fine with the players fiddling with their NPCs, but some will throw a fit if a player dares to control a character that is not their own. This can be for pure game reasons, because NPCs are the GM's main method of affecting the player characters and the story so a player controlling them really messes with that. It could also be because the GM views those NPCs as their own characters the same way the players view their own, so they see a player controlling an NPC as exactly the same thing as a player controlling another player's character; I've found this to be the most common in games where the GM doesn't have a designated character that they are playing just like the normal player characters, because they seem to see everyone else in the world as their character(s) instead, but I've also seen it happen in games where the GM does have a normal player character. There are plenty of valid reasons besides those two, but they represent what I feel are the two main schools of thought in GMs who don't like players messing with their NPCs.
I've found that the best way to handle the NPC thing is to allow players to do whatever they want (within bounds of reason) with NPCs of no consequence to the story, so long as those interactions are not used to cheat through plot barriers. For example, I saw one person in an RP use this sort of random NPC thing to metagame by asking them where a certain tavern (which was supposed to be sort of a hidden underground place, and our first challenge of the RP was to find it) was, then had the NPC tell them it was in the location that other players had already found out, and he went on his merry way there. That's obviously not okay due to the metagaming, but anything similar to that (mugging random passerby if you need money and just assuming you get enough after a while, for instance) is still a shady thing to do. As long as players aren't using the inconsequential NPCs to lazily get through barriers it ought to be fine to use them to fill out a post, maybe to show a bit of your character's personality by how they treat the person, so on and so forth.
Then, for the NPCs that actually matter, best way to handle that is for the GM to say that players absolutely 100% cannot control them without their approval. Depending on varying GM styles they might want to do a collaborative post for the interaction, or they might just want to tell you how that NPC would respond and let you write it all up yourself, but either way those important NPCs should never be beholden to the whims of the players. The players don't know what the characters know, they probably don't know their full history and personality, so on and so forth, so letting them control that character and probably botch it is just a bad idea. There's a term used in some tabletop game communities that I think fits here: GMPC, Game Master Player Character. Some people use the term to mean a normal player character controlled by the GM in the tabletop campaign, but it's also used to mean important NPCs controlled by the GM that tag along with the party. I figure just as NPC has been adapted to forum roleplaying, so too can GMPC. Basically they're more than the run of the mill NPC, they're a non-player character wholly the GM's to control, and they may or may not be key parts of the RP's plot. This could apply to kings and innkeepers alike, depending on the GM and the story at hand, any NPC that is important enough to not let players fiddle with them.
I doubt this terminology will actually become popularly used, but that's how I view the difference between normal and important NPCs. Normal ones can be messed with by the players, GMPCs can't. I think that makes for the healthiest mix of GM control and player freedom, which helps to maximize enjoyment for everyone involved, so that's what I like to see in an RP.