# Http trace for a post

**URL:** <https://meta.discourse.org/t/http-trace-for-a-post/62993>\
**Category:** Development\
**Created:** [19 Maggio 2017, 2:45am UTC](https://meta.discourse.org/t/http-trace-for-a-post/62993 "2017-05-19T02:45:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gchiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gchiu/32/95856_2.png) [@gchiu](https://meta.discourse.org/u/gchiu)\
**Post date:** [19 Maggio 2017, 2:45am UTC](https://meta.discourse.org/t/http-trace-for-a-post/62993/1 "2017-05-19T02:45:05Z")

</div>

I’m looking on how to do a HTTP POST to create a reply message to an existing topic.

The docs here [Discourse API Docs](http://docs.discourse.org/#) say that for a HTTP POST

`curl -X POST "Content-Type: multipart/form-data;" -F "api_key=714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" -F "api_username=discourse1" -F "name=89853c20-4409-e91a-a8ea-f6cdff96aaaa" -F "color=49d9e9" -F "text_color=f0fcfd" "http://127.0.0.1:3000/categories"`

I presume that the body of the post contains form data.

but then the example for POST shows it instead as JSON

```
{
"title": "string",
"topic_id": 0,
"raw": "string",
"category": 0,
"target_usernames": "discourse1,discourse2",
"archetype": "private_message",
"created_at": "2017-01-31"
}

```

Also the api target for a post seems to be `/posts` but other sites says it’s `/posts.json`

So, is there an example that shows this unambiguously in the documentation preferably as a HTTP trace.

Thanks,

---

_[View the full topic](https://meta.discourse.org/t/http-trace-for-a-post/62993)._
