API:Undelete

Token
You need to obtain an undelete token through list=deletedrevs before you can restore any revisions. This token is equal to the edit token and the same for all pages, but changes at every login. The preferred method to obtain an undelete token depends on the MediaWiki version:
 * Versions 1.24 and later: action=query&meta=tokens
 * Versions 1.20-1.23: action=tokens
 * Versions 1.19 and earlier:

Restoring deleted revisions
Deleted revisions can be restored with action=undelete.

Parameters

 * You can get these timestamps through list=deletedrevs.

Example
Note: In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=undelete requires POST requests; GET requests will cause an error.

Possible errors
In addition to the usual stuff: