API:Changing wiki content

Changing wiki content through the API is possible, but must be explicitly enabled by setting $wgEnableWriteAPI = true; in LocalSettings.php (this feature is enabled on Wikimedia wikis).

Please see appropriate subsection for detailed information for each module.
 * Edit about the action to create new articles or modify existing ones.
 * Move about the action to rename or move articles.
 * Rollback about the action to rollback the last series of contributions to a page.
 * Delete about the action to delete existing articles.
 * Undelete about the action to view and restore deleted revisions.
 * Protect about the action to change the protection levels for a page.
 * Block about the actions to block and unblock a user.
 * Watch about the action to watch and unwatch pages.

Possible errors
Some wikis restrict the use of these modules to certain groups of users, or disallow it altogether. All aforementioned modules can return the following errors:


 * code: noapiwrite
 * info: Editing of this wiki through the API is disabled. Make sure the $wgEnableWriteAPI=true; statement is included in the wiki's LocalSettings.php file
 * code: writeapidenied
 * info: You're not allowed to edit this wiki through the API