# I get a 422 response when calling the create post API

**URL:** https://meta.discourse.org/t/i-get-a-422-response-when-calling-the-create-post-api/104479
**Category:** Development
**Created:** [17 בדצמבר,‏ 2018,‏ 4:17pm UTC](https://meta.discourse.org/t/i-get-a-422-response-when-calling-the-create-post-api/104479 "2018-12-17T16:17:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bswitala](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@bswitala](https://meta.discourse.org/u/bswitala)
#### Post date: [17 בדצמבר,‏ 2018,‏ 4:17pm UTC](https://meta.discourse.org/t/i-get-a-422-response-when-calling-the-create-post-api/104479/1 "2018-12-17T16:17:50Z")

</div>

Hi Discourse,

I’m pretty new to this platform, I like the way it looks and I’ve noticed some neat features so far. Cool!

I’m trying to to integrate a Discourse installation with another system, and I’m starting off by trying to create a new post by calling the API. Right now I get this response:

```
{
"action": "create_post",
"errors":[
"Title can't be blank",
"Title is too short (minimum is 15 characters)",
"Title seems unclear, is it a complete sentence?"
]
}

```

when I do this POST:

`https://forum.myDomain.com/posts.json?api_key=someApiKey&api_username=someUser`

with this data:

```
{
  "title": "This is a test title for an assignment.",
  "raw": "This is a test post for an assignment.",
  "category": 1,
  "created_at": "2018-12-17"
}

```

So, it seems my title is not blank, greater than 15 characters, and it’s a complete sentence. **So how I am supposed to deal with this 422?**

Thanks,  
Ben

---

<div class="post-metadata">

### Author: ![bswitala](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@bswitala](https://meta.discourse.org/u/bswitala)
#### Post date: [17 בדצמבר,‏ 2018,‏ 5:39pm UTC](https://meta.discourse.org/t/i-get-a-422-response-when-calling-the-create-post-api/104479/2 "2018-12-17T17:39:40Z")

</div>

Oh…I just noticed that I had content-type set to URL encoded, and because I had no URL parameter specifying the title, it was causing that 422 response. I’m sorry for my post!

Using URL encoded seems to work fine for me, but I haven’t gotten multipart form data to work yet.
