# 422 fout bij het plaatsen van een nieuw onderwerp via API

**URL:** <https://meta.discourse.org/t/422-error-when-posting-new-topic-via-api/173644>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [17 december 2020 om 20:30 UTC](https://meta.discourse.org/t/422-error-when-posting-new-topic-via-api/173644 "2020-12-17T20:30:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [17 december 2020 om 23:23 UTC](https://meta.discourse.org/t/422-error-when-posting-new-topic-via-api/173644/2 "2020-12-17T23:23:48Z")

</div>

When using the api and you see errors like “Title can’t be blank” but it looks you are actually passing in a title, this usually means that something isn’t sent to the api in the proper form and it isn’t able to read the data you are sending it. Are you sending it json instead of actual form-data?

Here is an example curl request to create a topic:

```plaintext
curl -i -sS -X POST "http://localhost:3000/posts.json" \
-H "Content-Type: multipart/form-data;" \
-H "Api-Key: 079fb2bb12d3b436bb11bde8eb58aaa9a36560fa7d79b14b3087aa40b1ebc2c4" \
-H "Api-Username: blake.erickson" \
-F "title=94214157b89 b723d7bc93f f40ec06495c" \
-F "raw=e65c9465ca693efc7b676ce4d236a6a6 1978ce887069fd2b3dbd67422f151823 fcb471fe25bae2d9f2889de60edbd06b"

HTTP/1.1 200 OK

```

---

_[View the full topic](https://meta.discourse.org/t/422-error-when-posting-new-topic-via-api/173644)._
