API:Delete

Token
To man-del>Special:MyLanguage/Manual:Page deletion|delete a page, a CSRF token is required. The CSRF token is the same for all pages, but changes at every login. CSRF tokens can be obtained via   with   (MW 1.24+).

Deleting pages
Pages can be deleted with action=delete.

Parameters
The page you want to delete. The page id of the page you want to delete The CSRF token obtained in the previous request. Take care to urlencode the trailing   as  . The reason for the deletion (optional). If not provided, an automatically generated reason will be used. Add the page to your watchlist Remove the page from your watchlist The name of the old image to delete as provided by  
 * title:
 * pageid:
 * token:
 * reason:
 * watch:
 * unwatch:
 * oldimage:

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

Possible errors
In addition to api-err>Special:MyLanguage/API:Errors and warnings#Standard error messages|the usual stuff: