# Failed to post a topic

**URL:** <https://meta.discourse.org/t/failed-to-post-a-topic/282471>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [October 17, 2023, 1:06am UTC](https://meta.discourse.org/t/failed-to-post-a-topic/282471 "2023-10-17T01:06:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fbpbdmin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fbpbdmin/32/300893_2.png) [@fbpbdmin](https://meta.discourse.org/u/fbpbdmin)\
**Post date:** [October 17, 2023, 1:06am UTC](https://meta.discourse.org/t/failed-to-post-a-topic/282471/1 "2023-10-17T01:06:36Z")

</div>

tried to post a topic with the API, it failed with this error msg:  
_{‘action’: ‘create\_post’, ‘errors’: [‘Body is too short (minimum is 1 character)’, ‘Body seems unclear, is it a complete sentence?’]}_

- the message to post is around 25K, a list of news  
can post it manually without error.  
but when post it with API, it fails  
the default post size is 35K(?), already increase it (in settings) to allow this longer message.
- if post a short sentence with the code below, it works fine.

changed `body min entropy` to 0, it did not help either.

searched the forum, not found a solution,  
any idea/suggestions, thanks…

here is the python code

```plaintext
import requests

# Authentication headers
headers = {
    "Api-Key": '***',
    "Api-Username": 'newsbot',
}

lines = "some news, around 25K"

# Topic data
topic_data = {
    "title":"latest news",
    "raw": lines,
    "category": 28,  
}

# Send a POST request to create the topic
response = requests.post('https://www.mydomain.com/posts.json', json=topic_data, headers=headers)

# Check if the request was successful
if response.status_code == 200:
    print("Topic created successfully!")
    topic_id = response.json().get("id")
    print(f"Topic ID: {topic_id}")
else:
    print(response.json())
    print(f"Failed to create the topic. Status code: {response.status_code}")

```

btw, the content to post is a list of news like this

```plaintext
[grid]
![](https://static01.nyt.com/images/2023/10/16/multimedia/animage.jpg)
![](https://content.api.news/v3/images/bin/image.jpg)
[/grid]

<details><summary><b>news title</b></summary>
news conentnews conentnews conentnews conentnews 
conent news conentnews conentnews conentnews conentnews 
conentnews conentnews conentnews conentnews conentnews 
conentnews conentnews conentnews conentnews conent
about this long for one news

[The New source 2023-10-16T21:16:45Z](https://www.newssource.com/live/anews)

```

---

_[View the full topic](https://meta.discourse.org/t/failed-to-post-a-topic/282471)._
