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=wbcreateredirect

(main | wbcreateredirect)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: WikibaseRepository
  • License: GPL-2.0-or-later

Creates Entity redirects.

Specific parameters:
Other general parameters are available.
from

Entity ID to make a redirect

This parameter is required.
to

Entity ID to point the redirect to

This parameter is required.
token

A "csrf" token retrieved from action=query&meta=tokens

This parameter is required.
bot

Mark this edit as bot. This URL flag will only be respected if the user belongs to the group "Bots".

Type: boolean (details)
returnto

Page title. If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to the given page, instead of the page that was edited.

Type: page title
Accepts non-existent pages.
returntoquery

URL query parameters (with leading ?). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given query parameters.

Default: (empty)
returntoanchor

URL fragment (with leading #). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given fragment.

Default: (empty)
Example:
Turn Q999999998 into a redirect to Q999999999
api.php?action=wbcreateredirect&from=Q999999998&to=Q999999999 [open in sandbox]