posts

Create a post

Create a new post in a channel. To create the post as a comment on another post, provide root_id.

Permissions

Must have create_post permission for the channel the post is being created in.

post/api/v4/posts

Query parameters

set_onlineboolean

Whether to set the user status as online or not.

Request body

channel_idstring required

The channel ID to post in

messagestring required

The message contents, can be formatted with Markdown

root_idstring

The post ID to comment on

file_idsstring[]

A list of file IDs to associate with the post. Note that posts are limited to 5 files maximum. Please use additional posts for more files.

propsobject

A general JSON property bag to attach to the post

Example request

{
  "channel_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "root_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response

Post creation successful

idstring
create_atinteger

The time in milliseconds a post was created

update_atinteger

The time in milliseconds a post was last updated

delete_atinteger

The time in milliseconds a post was deleted

edit_atinteger
user_idstring
channel_idstring
root_idstring
original_idstring
messagestring
typestring
propsobject
hashtagstring
file_idsstring[]
pending_post_idstring

Changes