API:Move

Token
To move a page, a move token is required. This token is equal to the edit token and the same for all pages, but changes at every login. A move token can be obtained as follows:

Moving pages
Pages can be moved with action=move.

Parameters

 * from: The title of the page you want to move
 * to: The new title you want to move the page to
 * token: The token obtained in the previous request. Take care to urlencode the '+' as '%2B'.
 * reason: The reason for the move (optional)
 * movetalk: Move the talk page, if possible
 * noredirect: Don't create a redirect from the old title to the new one

Possible errors
All errors are formatted as:


 * code: nofrom
 * info: The from parameter must be set
 * code: noto
 * info: The to parameter must be set
 * code: notoken
 * info: The token parameter must be set
 * code: badtoken
 * info: Invalid token
 * code: permissiondenied
 * info: You don't have permission to move ``oldtitle  to ``newtitle 
 * This can mean that you either don't have permission to move at all, or that the page in question is protected
 * code: blocked
 * info: You have been blocked from editing
 * code: readonly
 * info: The wiki is in read-only mode
 * In read-only mode, absolutely nothing can be changed.
 * code: invalidtitle
 * info: bad title ``title ''
 * This means title contains invalid characters or is blank. Note that titles like Talk: and User: are also considered blank.
 * code: missingtitle
 * info: ``title '' doesn't exist
 * code: selfmove
 * info: Can't move ``title '' to itself
 * code: immobilenamespace-from
 * info: Pages in the ``fromnamespace '' namespace can't be moved
 * code: immobilenamespace-to
 * info: Pages in the ``tonamespace '' namespace can't be moved
 * code: targetexists
 * info: ``newtitle  already exists and is not a redirect to ``oldtitle 

NOTE: If moving the page itself succeeded, but moving the talk page failed, the relevant error will be returned in the talkmove-error-code and talkmove-error-info fields. The possible error codes in this case are immobilenamespace-from, immobilenamespace-to, targetexists, permissiondenied and unknownerror ("Unknown error ``errorcode '' ")