MediaWiki:Apihelp-userrights-example-user/en

Add user FooBot to group bot, and remove from groups sysop and bureaucrat.