Module posts_api

Source

Enums§

CreatePostEphemeralError
struct for typed errors of method create_post_ephemeral
CreatePostError
struct for typed errors of method create_post
DeletePostError
struct for typed errors of method delete_post
DoPostActionError
struct for typed errors of method do_post_action
GetFileInfosForPostError
struct for typed errors of method get_file_infos_for_post
GetFlaggedPostsForUserError
struct for typed errors of method get_flagged_posts_for_user
GetPostError
struct for typed errors of method get_post
GetPostThreadError
struct for typed errors of method get_post_thread
GetPostsAroundLastUnreadError
struct for typed errors of method get_posts_around_last_unread
GetPostsByIdsError
struct for typed errors of method get_posts_by_ids
GetPostsForChannelError
struct for typed errors of method get_posts_for_channel
PatchPostError
struct for typed errors of method patch_post
PinPostError
struct for typed errors of method pin_post
SearchPostsError
struct for typed errors of method search_posts
SetPostReminderError
struct for typed errors of method set_post_reminder
SetPostUnreadError
struct for typed errors of method set_post_unread
UnpinPostError
struct for typed errors of method unpin_post
UpdatePostError
struct for typed errors of method update_post

Functions§

create_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.
create_post_ephemeral
Create a new ephemeral post in a channel. ##### Permissions Must have create_post_ephemeral permission (currently only given to system admin)
delete_post
Soft deletes a post, by marking the post as deleted in the database. Soft deleted posts will not be returned in post queries. ##### Permissions Must be logged in as the user or have delete_others_posts permission.
do_post_action
Perform a post action, which allows users to interact with integrations through posts. ##### Permissions Must be authenticated and have the read_channel permission to the channel the post is in.
get_file_infos_for_post
Gets a list of file information objects for the files attached to a post. ##### Permissions Must have read_channel permission for the channel the post is in.
get_flagged_posts_for_user
Get a page of flagged posts of a user provided user id string. Selects from a channel, team, or all flagged posts by a user. Will only return posts from channels in which the user is member. ##### Permissions Must be user or have manage_system permission.
get_post
Get a single post. ##### Permissions Must have read_channel permission for the channel the post is in or if the channel is public, have the read_public_channels permission for the team.
get_post_thread
Get a post and the rest of the posts in the same thread. ##### Permissions Must have read_channel permission for the channel the post is in or if the channel is public, have the read_public_channels permission for the team.
get_posts_around_last_unread
Get the oldest unread post in the channel for the given user as well as the posts around it. The returned list is sorted in descending order (most recent post first). ##### Permissions Must be logged in as the user or have edit_other_users permission, and must have read_channel permission for the channel. Minimum server version: 5.14
get_posts_by_ids
Fetch a list of posts based on the provided postIDs ##### Permissions Must have read_channel permission for the channel the post is in or if the channel is public, have the read_public_channels permission for the team.
get_posts_for_channel
Get a page of posts in a channel. Use the query parameters to modify the behaviour of this endpoint. The parameter since must not be used with any of before, after, page, and per_page parameters. If since is used, it will always return all posts modified since that time, ordered by their create time limited till 1000. A caveat with this parameter is that there is no guarantee that the returned posts will be consecutive. It is left to the clients to maintain state and fill any missing holes in the post order. ##### Permissions Must have read_channel permission for the channel.
patch_post
Partially update a post by providing only the fields you want to update. Omitted fields will not be updated. The fields that can be updated are defined in the request body, all other provided fields will be ignored. ##### Permissions Must have the edit_post permission.
pin_post
Pin a post to a channel it is in based from the provided post id string. ##### Permissions Must be authenticated and have the read_channel permission to the channel the post is in.
search_posts
Search posts in the team and from the provided terms string. ##### Permissions Must be authenticated and have the view_team permission.
set_post_reminder
Set a reminder for the user for the post. ##### Permissions Must have read_channel permission for the channel the post is in. Minimum server version: 7.2
set_post_unread
Mark a channel as being unread from a given post. ##### Permissions Must have read_channel permission for the channel the post is in or if the channel is public, have the read_public_channels permission for the team. Must have edit_other_users permission if the user is not the one marking the post for himself. Minimum server version: 5.18
unpin_post
Unpin a post to a channel it is in based from the provided post id string. ##### Permissions Must be authenticated and have the read_channel permission to the channel the post is in.
update_post
Update a post. Only the fields listed below are updatable, omitted fields will be treated as blank. ##### Permissions Must have edit_post permission for the channel the post is in.