# API topic post creation ordered by updated\_at or created\_at?

**URL:** <https://meta.discourse.org/t/api-topic-post-creation-ordered-by-updated-at-or-created-at/84511>\
**Category:** Product Support\
**Created:** [April 3, 2018, 11:57pm UTC](https://meta.discourse.org/t/api-topic-post-creation-ordered-by-updated-at-or-created-at/84511 "2018-04-03T23:57:53Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [April 4, 2018, 11:26pm UTC](https://meta.discourse.org/t/api-topic-post-creation-ordered-by-updated-at-or-created-at/84511/5 "2018-04-04T23:26:21Z")

</div>

So yes it is possible to create posts out of order using the API. See my example below where I added a post from 2012 after a post from 2013:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/a/ea19fb012c33f26c16acb950853456b385fde4fe.png)

But this is only possible via the API and the solution is to sort your posts first before using the API to create them so that they show up in the correct order.

I believe posts are sorted by `id` and not by `created_at` or `updated_at`.

---

_[View the full topic](https://meta.discourse.org/t/api-topic-post-creation-ordered-by-updated-at-or-created-at/84511)._
