How to create new topic by API

I want to know how to create new topic by API .
If there are some DEMO or samples . Should be very helpful .


I did a google search and produced this result:

Did you take a look at these topics?

Yes I know this topic . But this is not what I want .

I want the sample or demo about this .

How do you want to make the request?

Here’s a working example with Postman:

  1. Create a new POST request.
  2. In the POST field, write your forum URL, with /posts/ :
  3. In Headers tab, set two keys: Api-Key and Api-Username. For the values, use the API key you created in your Discourse administration and an administrator account username.
  4. In Params tab, set at least these 3 keys: title, raw and category. More info on the Discourse API doc:
  5. Click “Send”. The request is successful:

    And the topic created:

This what I want . Thanks so much

1 Like