Manual:$wgEnableWriteAPI

Details
Allow the API to be used to perform write operations (page edits, rollback, etc.) when an authorized user accesses it.

Use the right instead to enable or disable API writes to specfic or all user groups.