Private Messages
Creates a new topic, a new post, or a private message
POST
https://discourse.example.com/posts.json
Body
application/json
titlestringRequired if creating a new topic or new private message.
rawstringrequiredtopic_ idintegerRequired if creating a new post.
categoryintegerOptional if creating a new topic, and ignored if creating a new post.
target_ recipientsstringRequired for private message, comma separated.
Example
blake,samtarget_ usernamesstringdeprecatedDeprecated. Use target_recipients instead.
archetypestringRequired for new private message.
Example
private_messagecreated_ atstringreply_ to_ post_ numberintegerOptional, the post number to reply to inside a topic.
embed_ urlstringProvide 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_ idstringProvide an external_id from a remote system to associate a forum topic with that id.
auto_ trackbooleanIf false, the user will not track the topic. By default, the user will track the topic.
Response
200OKany
post created