Creates a new topic, a new post, or a private message
POST/posts.json
Creates a new topic, a new post, or a private message
Request
- application/json
Body
title stringrequired
Required if creating a new topic or new private message.
raw stringrequired
topic_id integerrequired
Required if creating a new post.
category integerrequired
Optional if creating a new topic, and ignored if creating a new post.
target_recipients stringrequired
Required for private message, comma separated.
target_usernames stringdeprecated
Deprecated. Use target_recipients instead.
archetype stringrequired
Required for new private message.
created_at stringrequired
reply_to_post_number integerrequired
Optional, the post number to reply to inside a topic.
embed_url stringrequired
Provide a URL from a remote system to associate a forum topic with that URL, typically for using Discourse as a comments system for an external blog.
external_id stringrequired
Provide an external_id from a remote system to associate a forum topic with that id.
Responses
- 200
post created
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
id integerrequired
name stringnullrequired
username stringrequired
avatar_template stringrequired
created_at stringrequired
raw stringrequired
cooked stringrequired
post_number integerrequired
post_type integerrequired
updated_at stringrequired
reply_count integerrequired
reply_to_post_number stringnullrequired
quote_count integerrequired
incoming_link_count integerrequired
reads integerrequired
readers_count integerrequired
score numberrequired
yours booleanrequired
topic_id integerrequired
topic_slug stringrequired
display_username stringnullrequired
primary_group_name stringnullrequired
flair_name stringnullrequired
flair_url stringnullrequired
flair_bg_color stringnullrequired
flair_color stringnullrequired
flair_group_id stringnullrequired
version integerrequired
can_edit booleanrequired
can_delete booleanrequired
can_recover booleanrequired
can_see_hidden_post booleanrequired
can_wiki booleanrequired
user_title stringnullrequired
bookmarked booleanrequired
actions_summary object[]required
id integerrequired
can_act booleanrequired
moderator booleanrequired
admin booleanrequired
staff booleanrequired
user_id integerrequired
draft_sequence integerrequired
hidden booleanrequired
trust_level integerrequired
deleted_at stringnullrequired
user_deleted booleanrequired
edit_reason stringnullrequired
can_view_edit_history booleanrequired
wiki booleanrequired
reviewable_id stringnullrequired
reviewable_score_count integerrequired
reviewable_score_pending_count integerrequired
mentioned_users undefined[]required
{
"id": 0,
"username": "string",
"avatar_template": "string",
"created_at": "string",
"raw": "string",
"cooked": "string",
"post_number": 0,
"post_type": 0,
"updated_at": "string",
"reply_count": 0,
"quote_count": 0,
"incoming_link_count": 0,
"reads": 0,
"readers_count": 0,
"score": 0,
"yours": true,
"topic_id": 0,
"topic_slug": "string",
"version": 0,
"can_edit": true,
"can_delete": true,
"can_recover": true,
"can_see_hidden_post": true,
"can_wiki": true,
"bookmarked": true,
"actions_summary": [
{
"id": 0,
"can_act": true
}
],
"moderator": true,
"admin": true,
"staff": true,
"user_id": 0,
"draft_sequence": 0,
"hidden": true,
"trust_level": 0,
"user_deleted": true,
"can_view_edit_history": true,
"wiki": true,
"reviewable_score_count": 0,
"reviewable_score_pending_count": 0,
"mentioned_users": [
null
]
}
Loading...