# Create topic using Discourse API

**URL:** <https://meta.discourse.org/t/create-topic-using-discourse-api/243930>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [November 2, 2022, 8:26am UTC](https://meta.discourse.org/t/create-topic-using-discourse-api/243930 "2022-11-02T08:26:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![michaelhenderson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaelhenderson/32/76069_2.png) [@michaelhenderson](https://meta.discourse.org/u/michaelhenderson)\
**Post date:** [November 3, 2022, 12:19pm UTC](https://meta.discourse.org/t/create-topic-using-discourse-api/243930/4 "2022-11-03T12:19:19Z")

</div>

Thanks for the code. It’s hard to debug it fully without seeing all of the code. I would recommend querying the API outside of the script itself. For example, you could use curl

```plaintext
curl -X GET "https://mydiscourse.com/posts.json" \
-H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \
-H "Api-Username: michael"

```

If you’re not comfortable with the command line or using curl, I would recommend using Postman to debug the issue with the API. Postman is essential for me as a developer when testing or building APIs.

Here is a Postman workspace with Discourse routes already setup. Just configure your API key and username.  
[Discourse API Documentation Postman API Network](https://www.postman.com/api-evangelist/workspace/discourse/documentation/35240-c739e2a5-3ddf-4ffc-90e9-7dd579e8a55d)

---

_[View the full topic](https://meta.discourse.org/t/create-topic-using-discourse-api/243930)._
