Add category moderators with the API?

I am sorting through the API regarding categories. I see here that I can allow users to be moderators of categories. Is there a way to do this through the API?

If it’s possible, I assume it would be using a post call to create a new cateogory (or put to update a single category), and maybe in the “permission” or “group_permissions”?

And is there sample javascript code for making the call?

You can use How to reverse engineer the Discourse API to learn the API call format.


Thanks. That link linked to the gem, including this example file, which is really helpful.

1 Like

I’m really grateful for all the help the team and community have given me as I sort through things. Discourse is just an awesome example of what open source software and a supportive software community can be.

The API is really fun to use. Sorry for the newbie question, but: Is there a way that I can:

  1. Call the Discourse API from my Discourse forum (for example, call the API when a user hits a button on the forum), and then
  2. Display some of the API results on my discourse forum (such as call “get categories” in the API and then display the resulting category listing on my forum’s home page)?

Yes, both are possible with custom themes. Read Developer’s guide to Discourse Themes to learn more about it.