# How to create new topic by API

**URL:** https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849
**Category:** Development
**Created:** [4 april 2020 om 22:49 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849 "2020-04-04T22:49:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Zhang\_Frank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zhang_frank/32/170080_2.png) [@Zhang\_Frank](https://meta.discourse.org/u/Zhang_Frank)
#### Post date: [4 april 2020 om 22:49 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849/1 "2020-04-04T22:49:35Z")

</div>

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

Thanks

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5 april 2020 om 01:53 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849/2 "2020-04-05T01:53:50Z")

</div>

I did a google search and produced this result:

[https://www.google.com/search?q=discourse+create+new+topic+api](https://www.google.com/search?q=discourse+create+new+topic+api)

Did you take a look at these topics?

---

<div class="post-metadata">

### Author: ![Zhang\_Frank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zhang_frank/32/170080_2.png) [@Zhang\_Frank](https://meta.discourse.org/u/Zhang_Frank)
#### Post date: [6 april 2020 om 16:31 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849/3 "2020-04-06T16:31:22Z")

</div>

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

I want the sample or demo about this .

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [6 april 2020 om 17:06 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849/4 "2020-04-06T17:06:41Z")

</div>

How do you want to make the request?

Here’s a working example with [Postman](https://www.postman.com/):

1. Create a new POST request.
2. In the POST field, write your forum URL, with /posts/ : `https://yourforum.com/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.  
 ![image](https://global.discourse-cdn.com/meta/original/3X/c/c/ccfa10a887d29ec0a34f95c54c1db6eed6ec3131.png)
4. In Params tab, set at least these 3 keys: title, raw and category. More info on the [Discourse API doc](https://docs.discourse.org/#tag/Posts/paths/~1posts.json/post):  
 ![image](https://global.discourse-cdn.com/meta/original/3X/6/2/624d58440812263b98ac192e713a60851e4f0f2d.png)
5. Click “Send”. The request is successful:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/d/6/d631022ecbbbbcd70dd4de35c5ef5a8037984d42.png)  
And the topic created:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/f/f/ff83d46ab0d136c3f3cc872d2777d0ffc0fff3f5.png)

---

<div class="post-metadata">

### Author: ![Zhang\_Frank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zhang_frank/32/170080_2.png) [@Zhang\_Frank](https://meta.discourse.org/u/Zhang_Frank)
#### Post date: [6 april 2020 om 17:30 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849/5 "2020-04-06T17:30:49Z")

</div>

This what I want . Thanks so much

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [27 april 2022 om 13:21 UTC](https://meta.discourse.org/t/how-to-create-new-topic-by-api/146849/6 "2022-04-27T13:21:02Z")

</div>

A post was split to a new topic: [Specify User in POST request](https://meta.discourse.org/t/specify-user-in-post-request/225426)
