MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=tag
(main | tag)
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: MediaWiki
- License: GPL-2.0-or-later
Add or remove change tags from individual revisions or log entries.
Specific parameters:
Other general parameters are available.
- rcid
One or more recent changes IDs from which to add or remove the tag.
- Type: list of integers
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- revid
One or more revision IDs from which to add or remove the tag.
- Type: list of integers
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- logid
One or more log entry IDs from which to add or remove the tag.
- Type: list of integers
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- add
Tags to add. Only manually defined tags can be added.
- Values (separate with | or alternative): Automatic update from connected wiki, Connecting-Senses, Czech-Authorities-Sync, InfoboxExport gadget, WE-Framework gadget, WikibaseJS-cli, WikibaseJS-edit, client-automatic-update, client-linkitem-change, contenttranslation, contenttranslation-v2, data-bridge, dataDrainer, distributed-game, gadget-addsenseimage, gadget-draggablesitelinks, gadget-dragndrop, gadget-merge, gadget-move, gadget-moveclaim, gadget-rearrangevalues, openrefine, openrefine-3.4, openrefine-3.5, openrefine-3.6, openrefine-3.7, openrefine-3.8, openrefine-4.0, osm-id-sync, reference-game, sectiontranslation, svwiki-DescriptionGadget, termbox, view-it, wikibase-patcher-v1, wikidata-for-firefox, wikidata-for-web, wikidata-ui, wikimedia-commons-app, wwwyzzerdd
- remove
Tags to remove. Only tags that are either manually defined or completely undefined can be removed.
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- reason
Reason for the change.
- Default: (empty)
Tags to apply to the log entry that will be created as a result of this action.
- Values (separate with | or alternative): Automatic update from connected wiki, Connecting-Senses, Czech-Authorities-Sync, InfoboxExport gadget, WE-Framework gadget, WikibaseJS-cli, WikibaseJS-edit, client-automatic-update, client-linkitem-change, contenttranslation, contenttranslation-v2, data-bridge, dataDrainer, distributed-game, gadget-addsenseimage, gadget-draggablesitelinks, gadget-dragndrop, gadget-merge, gadget-move, gadget-moveclaim, gadget-rearrangevalues, openrefine, openrefine-3.4, openrefine-3.5, openrefine-3.6, openrefine-3.7, openrefine-3.8, openrefine-4.0, osm-id-sync, reference-game, sectiontranslation, svwiki-DescriptionGadget, termbox, view-it, wikibase-patcher-v1, wikidata-for-firefox, wikidata-for-web, wikidata-ui, wikimedia-commons-app, wwwyzzerdd
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
Examples:
- Add the vandalism tag to revision ID 123 without specifying a reason
- api.php?action=tag&revid=123&add=vandalism&token=123ABC [open in sandbox]
- Remove the spam tag from log entry ID 123 with the reason Wrongly applied
- api.php?action=tag&logid=123&remove=spam&reason=Wrongly+applied&token=123ABC [open in sandbox]