# Issues with creating a post and locking the topic via the API

**URL:** <https://meta.discourse.org/t/issues-with-creating-a-post-and-locking-the-topic-via-the-api/159003>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [July 28, 2020, 2:55am UTC](https://meta.discourse.org/t/issues-with-creating-a-post-and-locking-the-topic-via-the-api/159003 "2020-07-28T02:55:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [July 29, 2020, 12:39pm UTC](https://meta.discourse.org/t/issues-with-creating-a-post-and-locking-the-topic-via-the-api/159003/3 "2020-07-29T12:39:54Z")

</div>

Good find, I’ll investigate this when I get a chance. Combining these two api calls into a single request doesn’t strictly follow how it is done in the UI (you can’t create a new topic that is locked), so that API endpoint is likely not looking for the locked flag or it is defaulting to setting it to unlocked on topic create.

---

_[View the full topic](https://meta.discourse.org/t/issues-with-creating-a-post-and-locking-the-topic-via-the-api/159003)._
