Translations:Manual:Setting user groups in MediaWiki/12/en

If you are developing a gadget, a bot (an admin bot) or other stuff that should be able to change user's groups through the API, see the page $help.