I think you may be able to update user settings via updateUser operation:
https://docs.discourse.org/#tag/Users/operation/updateUser