Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I am working on a moderation tool. One of the actions I want my moderators to be able to achieve is setting a user account as spam. I know how to do so via the UI as admin but how do I do the same via code?