MediaWiki:Apihelp-wbsetreference-description/en

Creates a reference or sets the value of an existing one.