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=newslettersubscribe
(main | newslettersubscribe)
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: Newsletter
- License: GPL-2.0-or-later
Subscribe to or unsubscribe from a newsletter.
Specific parameters:
Other general parameters are available.
ID of the newsletter for which the subscription should be changed.
- This parameter is required.
- Type: integer
Action to do. Should be either subscribe or unsubscribe.
- This parameter is required.
- One of the following values: subscribe, unsubscribe
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
Examples:
- Subscribe to newsletter with ID 1.
- api.php?action=newslettersubscribe&id=1&do=subscribe [open in sandbox]
- Unsubscribe from newsletter with ID 2.
- api.php?action=newslettersubscribe&id=2&do=unsubscribe [open in sandbox]