# Discourse always posts in general using API

**URL:** <https://meta.discourse.org/t/discourse-always-posts-in-general-using-api/70276>\
**Category:** Product Support\
**Created:** [9월 18, 2017, 2:23오후 UTC](https://meta.discourse.org/t/discourse-always-posts-in-general-using-api/70276 "2017-09-18T14:23:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)\
**Post date:** [9월 18, 2017, 2:23오후 UTC](https://meta.discourse.org/t/discourse-always-posts-in-general-using-api/70276/1 "2017-09-18T14:23:36Z")

</div>

Whenever I post via the API, I tested it in Postman and it sends the right things to the right category.

However, when I more or less copy+paste the same thing with an http POST (via JavaScript), I get everything right…EXCEPT the category (which I thought was the easiest part):

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

I’m just truly stumped. Does anyone have any ideas as to why this wouldn’t send to the correct category?

- I’m posting it as a FORM data (and not JSON, like Postman/tutorial says to do)
- No special headers - it’s pretty vanilla
- I copy+pasted “category” to ensure I didn’t typo it (shown in screenshot). It IS an number, right? I’m about to try it as text

**UPDATE:**

> It IS an number, right? I’m about to try it as text

Error 422 when I try it as string. **It is definitely a number.**

**UPDATE 2:**

Wait a sec… I’m still getting 422 errors even when account is admin? I guess this is for a new post

---

_[View the full topic](https://meta.discourse.org/t/discourse-always-posts-in-general-using-api/70276)._
