MediaWiki:Apihelp-globaluserrights-example-1/en

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