API:Delete

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

Deleting pages
Pages can be deleted with action=delete.

Parameters

 * title: The page you want to delete.
 * token: The token obtained in the previous request. Take care to urlencode the '+' as '%2B'.
 * reason: The reason for the deletion (optional). If not provided, an automatically generated reason will be used.

Possible errors
All errors are formatted as:


 * code: notitle
 * info: The title parameter must be set
 * code: notoken
 * info: The token parameter must be set
 * code: permissiondenied
 * info: You don't have permission to delete pages
 * On most wikis, deleting pages is restricted to sysops, but other wikis may have stricter rules.
 * 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: badtoken
 * info: Invalid token
 * 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