Functions
conversations-archive
fn (request: ConversationsArchiveRequest): ConversationsArchiveResponse
POST /conversations.archive - Archive a conversation. The channel will be read-only but its history is preserved.
conversations-close
fn (request: ConversationsCloseRequest): ConversationsCloseResponse
POST /conversations.close - Close a direct message or multi-person direct message. Returns already_closed: true if the conversation was not open.
conversations-create
fn (request: ConversationsCreateRequest): ConversationsCreateResponse
POST /conversations.create - Create a new channel. Set is_private: true for a private channel. Returns the new channel object.
conversations-history
fn (request: ConversationsHistoryRequest): ConversationsHistoryResponse
GET /conversations.history - Fetch message history for a conversation. Returns messages in reverse chronological order. Use latest, oldest, and limit to control the range.
Example
response ::slack::channels/conversations-history(::slack::channels/ConversationsHistoryRequest({
channel: "C1234567",
limit: 5
}))
response.messages // => [{type: "message", text: "Hello", ts: "1234567890.123456"}, ...]
response.has_more // => true
conversations-info
fn (request: ConversationsInfoRequest): ConversationsInfoResponse
GET /conversations.info - Retrieve information about a conversation. Returns the channel object with name, purpose, topic, and membership details.
Example
response ::slack::channels/conversations-info(::slack::channels/ConversationsInfoRequest({
channel: "C1234567"
}))
response.channel.id // => "C1234567"
response.channel.name // => "general"
conversations-invite
fn (request: ConversationsInviteRequest): ConversationsInviteResponse
POST /conversations.invite - Invite users to a conversation. Pass a comma-separated list of user IDs in the users field.
conversations-join
fn (request: ConversationsJoinRequest): ConversationsJoinResponse
POST /conversations.join - Join an existing conversation. Only works for public channels unless the bot has been invited.
conversations-kick
fn (request: ConversationsKickRequest): ConversationsKickResponse
POST /conversations.kick - Remove a user from a conversation. Requires appropriate permissions in the channel.
conversations-leave
fn (request: ConversationsLeaveRequest): ConversationsLeaveResponse
POST /conversations.leave - Leave a conversation. The bot/user will no longer receive messages from this channel.
conversations-list
fn (request: ConversationsListRequest): ConversationsListResponse
GET /conversations.list - List all channels in a workspace. Filter by type (public_channel, private_channel, mpim, im) and exclude archived channels. Supports cursor-based pagination.
Example
response ::slack::channels/conversations-list(::slack::channels/ConversationsListRequest({
exclude_archived: true,
types: "public_channel",
limit: 20
}))
channel first(response.channels)
channel.id // => "C1234567"
channel.name // => "general"
conversations-mark
fn (request: ConversationsMarkRequest): ConversationsMarkResponse
POST /conversations.mark - Set the read cursor in a channel. Pass the message ts to mark the conversation as read up to that point.
conversations-members
fn (request: ConversationsMembersRequest): ConversationsMembersResponse
GET /conversations.members - List members of a conversation. Returns a Vec of user IDs. Supports cursor-based pagination.
Example
response ::slack::channels/conversations-members(::slack::channels/ConversationsMembersRequest({
channel: "C1234567",
limit: 100
}))
response.members // => ["U1234567", "U2345678", ...]
conversations-open
fn (request: ConversationsOpenRequest): ConversationsOpenResponse
POST /conversations.open - Open or resume a direct message or multi-person direct message. Pass either a channel ID or a comma-separated list of users. Set prevent_creation: true to avoid creating a new conversation.
conversations-rename
fn (request: ConversationsRenameRequest): ConversationsRenameResponse
POST /conversations.rename - Rename a conversation. Channel names must be lowercase, without spaces, and 80 characters or fewer.
conversations-replies
fn (request: ConversationsRepliesRequest): ConversationsRepliesResponse
GET /conversations.replies - Retrieve a thread of messages. Pass the parent message ts to fetch all replies in the thread. Supports cursor-based pagination.
conversations-set-purpose
fn (request: ConversationsSetPurposeRequest): ConversationsSetPurposeResponse
POST /conversations.setPurpose - Set the purpose for a conversation. The purpose appears in the channel details panel.
conversations-set-topic
fn (request: ConversationsSetTopicRequest): ConversationsSetTopicResponse
POST /conversations.setTopic - Set the topic for a conversation. The topic appears at the top of the channel.
conversations-unarchive
fn (request: ConversationsUnarchiveRequest): ConversationsUnarchiveResponse
POST /conversations.unarchive - Reverse archiving of a conversation. The channel will be restored and members can post messages again.
Types
ConversationsArchiveRequest
ConversationsArchiveRequest type {
channel: Str
}
ConversationsArchiveResponse
ConversationsArchiveResponse type {
ok: Bool?,
error: Str?
}
ConversationsCloseRequest
ConversationsCloseRequest type {
channel: Str
}
ConversationsCloseResponse
ConversationsCloseResponse type {
ok: Bool?,
error: Str?,
no_op: Bool?,
already_closed: Bool?
}
ConversationsCreateRequest
ConversationsCreateRequest type {
name: Str,
is_private: Bool?,
team_id: Str?
}
ConversationsCreateResponse
ConversationsCreateResponse type {
ok: Bool?,
error: Str?,
channel: Map?
}
ConversationsHistoryRequest
ConversationsHistoryRequest type {
channel: Str,
latest: Str?,
oldest: Str?,
inclusive: Bool?,
limit: Int?,
cursor: Str?
}
ConversationsHistoryResponse
ConversationsHistoryResponse type {
ok: Bool?,
error: Str?,
messages: Vec
ConversationsInfoRequest
ConversationsInfoRequest type {
channel: Str,
include_locale: Bool?,
include_num_members: Bool?
}
ConversationsInfoResponse
ConversationsInfoResponse type {
ok: Bool?,
error: Str?,
channel: Map?
}
ConversationsInviteRequest
ConversationsInviteRequest type {
channel: Str,
users: Str
}
ConversationsInviteResponse
ConversationsInviteResponse type {
ok: Bool?,
error: Str?,
channel: Map?
}
ConversationsJoinRequest
ConversationsJoinRequest type {
channel: Str
}
ConversationsJoinResponse
ConversationsJoinResponse type {
ok: Bool?,
error: Str?,
channel: Map?,
response_metadata: Map?
}
ConversationsKickRequest
ConversationsKickRequest type {
channel: Str,
user: Str
}
ConversationsKickResponse
ConversationsKickResponse type {
ok: Bool?,
error: Str?
}
ConversationsLeaveRequest
ConversationsLeaveRequest type {
channel: Str
}
ConversationsLeaveResponse
ConversationsLeaveResponse type {
ok: Bool?,
error: Str?
}
ConversationsListRequest
ConversationsListRequest type {
exclude_archived: Bool?,
types: Str?,
limit: Int?,
cursor: Str?,
team_id: Str?
}
ConversationsListResponse
ConversationsListResponse type {
ok: Bool?,
error: Str?,
channels: Vec
ConversationsMarkRequest
ConversationsMarkRequest type {
channel: Str,
ts: Str
}
ConversationsMarkResponse
ConversationsMarkResponse type {
ok: Bool?,
error: Str?
}
ConversationsMembersRequest
ConversationsMembersRequest type {
channel: Str,
limit: Int?,
cursor: Str?
}
ConversationsMembersResponse
ConversationsMembersResponse type {
ok: Bool?,
error: Str?,
members: Vec?,
response_metadata: Map?
}
ConversationsOpenRequest
ConversationsOpenRequest type {
channel: Str?,
users: Str?,
return_im: Bool?,
prevent_creation: Bool?
}
ConversationsOpenResponse
ConversationsOpenResponse type {
ok: Bool?,
error: Str?,
channel: Map?,
no_op: Bool?,
already_open: Bool?
}
ConversationsRenameRequest
ConversationsRenameRequest type {
channel: Str,
name: Str
}
ConversationsRenameResponse
ConversationsRenameResponse type {
ok: Bool?,
error: Str?,
channel: Map?
}
ConversationsRepliesRequest
ConversationsRepliesRequest type {
channel: Str,
ts: Str,
latest: Str?,
oldest: Str?,
inclusive: Bool?,
limit: Int?,
cursor: Str?
}
ConversationsRepliesResponse
ConversationsRepliesResponse type {
ok: Bool?,
error: Str?,
messages: Vec
ConversationsSetPurposeRequest
ConversationsSetPurposeRequest type {
channel: Str,
purpose: Str
}
ConversationsSetPurposeResponse
ConversationsSetPurposeResponse type {
ok: Bool?,
error: Str?,
purpose: Str?
}
ConversationsSetTopicRequest
ConversationsSetTopicRequest type {
channel: Str,
topic: Str
}
ConversationsSetTopicResponse
ConversationsSetTopicResponse type {
ok: Bool?,
error: Str?,
topic: Str?
}
ConversationsUnarchiveRequest
ConversationsUnarchiveRequest type {
channel: Str
}
ConversationsUnarchiveResponse
ConversationsUnarchiveResponse type {
ok: Bool?,
error: Str?
}