Appearance
Chat
About 12277 wordsAbout 41 min
Curl SDK - Chat API
Table of Contents
- QueryChannels
- DeleteChannels
- MarkDelivered
- MarkChannelsRead
- GetOrCreateDistinctChannel
- UpdateChannel
- UpdateChannelPartial
- DeleteChannel
- GetDraft
- CreateDraft
- DeleteDraft
- SendEvent
- UploadChannelFile
- DeleteChannelFile
- HideChannel
- UploadChannelImage
- DeleteChannelImage
- UpdateMemberPartial
- SendMessage
- GetManyMessages
- GetOrCreateChannel
- MarkRead
- ShowChannel
- StopWatchingChannel
- TruncateChannel
- MarkUnread
- QueryDrafts
- QueryMembers
- GetMessage
- UpdateMessage
- UpdateMessagePartial
- DeleteMessage
- RunMessageAction
- SendReaction
- DeleteReaction
- GetReactions
- QueryReactions
- TranslateMessage
- CastPollVote
- DeletePollVote
- CreateReminder
- UpdateReminder
- DeleteReminder
- GetReplies
- QueryMessageFlags
- MuteChannel
- UnmuteChannel
- QueryBannedUsers
- QueryFutureChannelBans
- QueryReminders
- Search
- Sync
- QueryThreads
- GetThread
- UpdateThreadPartial
- UnreadCounts
- Types Reference
QueryChannels
Access a list of communication channels available in your account, facilitating efficient management and selection for your campaigns.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"limit": 1,
"sort": [{ "direction": 1 }]
}'Example: with filter_conditions and member_limit
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter_conditions": {},
"member_limit": 1
}'Example: with message_limit and offset
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message_limit": 1,
"offset": 1
}'Example: with predefined_filter and presence
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"predefined_filter": "example_value",
"presence": true
}'Response: QueryChannelsResponse
Parameters
Query Parameters:
connection_id(string)
Request Body:
filter_conditions(object): Filter conditions to apply to the queryfilter_values(object): Values to interpolate into the predefined filter templatelimit(int): Number of channels to limitmember_limit(int): Number of members to limitmessage_limit(int): Number of messages to limitoffset(int): Channel pagination offsetpredefined_filter(string): ID of a predefined filter to use instead of filter_conditionspresence(bool)sort([]SortParamRequest): List of sort parameterssort_values(object)state(bool): Whether to update channel state or notwatch(bool): Whether to start watching found channels or not
DeleteChannels
Asynchronously remove specific channels from your account, helping you maintain an organized and relevant channel list without immediate blocking.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/delete" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"cids": ["id-1", "id-2"],
"hard_delete": true
}'Response: DeleteChannelsResponse
Parameters
Request Body:
cids([]string) (required): All channels that should be deletedhard_delete(bool): Specify if channels and all ressources should be hard deleted
MarkDelivered
Update the delivery status of messages sent through a channel, ensuring accurate tracking and reporting of message delivery outcomes.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/delivered" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"latest_delivered_messages": [{ "cid": "example_value" }]
}'Response: MarkDeliveredResponse
Parameters
Request Body:
latest_delivered_messages([]DeliveredMessagePayload)
MarkChannelsRead
Mark all messages in selected channels as read, allowing you to streamline communication management and reduce notification clutter.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/read" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"read_by_channel": {}
}'Response: MarkReadResponse
Parameters
Request Body:
read_by_channel(object): Map of channel ID to last read message ID
GetOrCreateDistinctChannel
Retrieve an existing channel or create a new one based on unique identifiers, simplifying the process of managing distinct communication threads.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"data": { "auto_translation_enabled": true },
"hide_for_creator": true
}'Example: with members and messages
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"members": { "limit": 1 },
"messages": { "created_at_after": 1.0 }
}'Example: with presence and state
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"presence": true,
"state": true
}'Example: with thread_unread_counts and watch
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"thread_unread_counts": true,
"watch": true
}'Response: ChannelStateResponse
Parameters
Path Parameters:
type(string) (required)
Query Parameters:
connection_id(string)
Request Body:
data(ChannelInput)hide_for_creator(bool): Whether this channel will be hidden for the user who created the channel or notmembers(PaginationParams)messages(MessagePaginationParams)presence(bool): Fetch user presence infostate(bool): Refresh channel statethread_unread_counts(bool)watch(bool): Start watching the channelwatchers(PaginationParams)
UpdateChannel
Modify the settings or attributes of an existing channel to keep your communication channels up-to-date and aligned with your needs.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"add_filter_tags": ["value1", "value2"],
"skip_push": true
}'Example: with add_members and add_moderators
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"add_members": ["user-123", "user-456"],
"add_moderators": ["value1", "value2"]
}'Example: with assign_roles and cooldown
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"assign_roles": [{ "user_id": "user-123", "channel_role": "example_value" }],
"cooldown": 1
}'Example: with data and demote_moderators
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"data": { "auto_translation_enabled": true },
"demote_moderators": ["value1", "value2"]
}'Response: UpdateChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
accept_invite(bool): Set totrueto accept the inviteadd_filter_tags([]string): List of filter tags to add to the channeladd_members([]ChannelMemberRequest): List of user IDs to add to the channeladd_moderators([]string): List of user IDs to make channel moderatorsassign_roles([]ChannelMemberRequest): List of channel member role assignments. If any specified user is not part of the channel, the request will failcooldown(int): Sets cool down period for the channel in secondsdata(ChannelInputRequest)demote_moderators([]string): List of user IDs to take away moderators status fromhide_history(bool): Set totrueto hide channel's history when adding new membershide_history_before(float): If set, hides channel's history before this time when adding new members. Takes precedence overhide_historywhen both are provided. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past.invites([]ChannelMemberRequest): List of user IDs to invite to the channelmessage(MessageRequest): Message to send to the chat when channel is successfully updatedreject_invite(bool): Set totrueto reject the inviteremove_filter_tags([]string): List of filter tags to remove from the channelremove_members([]string): List of user IDs to remove from the channelskip_push(bool): Whenmessageis set disables all push notifications for it
UpdateChannelPartial
Update specific attributes of a channel without altering the entire channel configuration. Use this to make targeted changes, such as updating channel metadata or settings.
Example
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"set": {},
"unset": ["value1", "value2"]
}'Response: UpdateChannelPartialResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
set(object)unset([]string)
DeleteChannel
Remove a channel from the system entirely. Use this when you want to permanently delete a channel and its associated data.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: DeleteChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
hard_delete(bool)
GetDraft
Retrieve a draft message for editing or review. Use this to access unsent messages saved as drafts before finalizing or sending them.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/draft?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetDraftResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
parent_id(string)
CreateDraft
CreateDraft allows you to save a message as a draft before sending it, which is useful for composing messages over time or reviewing content before making it public.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/draft" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message": { "attachments": [{ "custom": {}, "actions": [{ "name": "Example Name", "text": "Hello, World!", "type": "messaging", "style": "example_value" }] }] }
}'Response: CreateDraftResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
message(MessageRequest) (required)
DeleteDraft
Remove a draft message from the system. Use this when a draft is no longer needed and you want to declutter saved drafts.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/draft?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
parent_id(string)
SendEvent
Trigger an event within a channel to notify users of actions or updates. Use this to communicate important events, such as member joins or message reactions.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/event" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"event": { "type": "messaging", "custom": {} }
}'Response: EventResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
event(EventRequest) (required)
UploadChannelFile
Upload a file to a channel for sharing with other members. Use this to share documents, images, or any relevant files within the channel.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/file" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"file": "example_value",
"user": { "id": "example-id" }
}'Response: UploadChannelFileResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
file(string): file fielduser(OnlyUserID): user for the request server side only
DeleteChannelFile
Remove a previously uploaded file from a channel. Use this to manage or clean up files that are no longer needed in the channel.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/file?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
url(string)
HideChannel
Temporarily hide a channel from the user's view without deleting it. Use this to reduce clutter while retaining access to the channel for future engagement.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/hide" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"clear_history": true
}'Response: HideChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
clear_history(bool): Whether to clear message history of the channel or not
UploadChannelImage
Upload an image to a channel, enhancing communication with visual content. Use this to share images relevant to the channel's discussions or activities.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/image" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"file": "example_value",
"upload_sizes": [{ "crop": "example_value" }]
}'Example: with user
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/image" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"user": { "id": "example-id" }
}'Response: UploadChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
file(string)upload_sizes([]ImageSize): field with JSON-encoded array of image size configurationsuser(OnlyUserID)
DeleteChannelImage
Remove an uploaded image from a channel. Use this to manage the visual content and keep the channel's media relevant and up-to-date.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/image?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
url(string)
UpdateMemberPartial
Partially update the details of a channel member, such as their role or nickname, without altering their entire profile. Use this when you need to make specific updates to a member's attributes in a channel.
Example
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/member" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"set": {},
"unset": ["value1", "value2"]
}'Response: UpdateMemberPartialResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
set(object)unset([]string)
SendMessage
Send a new message to a specified channel, allowing you to initiate or continue a conversation. Use this to communicate with channel members through text, attachments, or other supported message types.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/message" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message": { "attachments": [{ "custom": {}, "actions": [{ "name": "Example Name", "text": "Hello, World!", "type": "messaging", "style": "example_value" }] }] },
"skip_enrich_url": "https://example.com",
"skip_push": true
}'Example: with keep_channel_hidden
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/message" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message": { "attachments": [{ "custom": {}, "actions": [{ "name": "Example Name", "text": "Hello, World!", "type": "messaging", "style": "example_value" }] }] },
"keep_channel_hidden": true
}'Response: SendMessageResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
keep_channel_hidden(bool)message(MessageRequest) (required)skip_enrich_url(bool)skip_push(bool)
GetManyMessages
Retrieve a batch of messages from a channel, which can be useful for loading conversation history or displaying older messages. Use this to efficiently access multiple messages at once.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/messages?ids=value1,value2" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetManyMessagesResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
ids([]string) (required)
GetOrCreateChannel
Retrieve an existing channel or create a new one if it doesn't exist, ensuring you have a channel to work with for communication. Use this when you need to set up or access a channel dynamically.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"data": { "auto_translation_enabled": true },
"hide_for_creator": true
}'Example: with members and messages
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"members": { "limit": 1 },
"messages": { "created_at_after": 1.0 }
}'Example: with presence and state
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"presence": true,
"state": true
}'Example: with thread_unread_counts and watch
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/query?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"thread_unread_counts": true,
"watch": true
}'Response: ChannelStateResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
connection_id(string)
Request Body:
data(ChannelInput)hide_for_creator(bool): Whether this channel will be hidden for the user who created the channel or notmembers(PaginationParams)messages(MessagePaginationParams)presence(bool): Fetch user presence infostate(bool): Refresh channel statethread_unread_counts(bool)watch(bool): Start watching the channelwatchers(PaginationParams)
MarkRead
Mark messages in a channel as read to update the read status and notify other members. Use this to keep track of read messages and manage message notifications.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/read" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message_id": "message-789",
"thread_id": "example_value"
}'Response: MarkReadResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
message_id(string): ID of the message that is considered last read by clientthread_id(string): Optional Thread ID to specifically mark a given thread as read
ShowChannel
Display detailed information about a specific channel, including its settings and current members. Use this to gain insights into a channel's configuration and participant list.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/show" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: ShowChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
StopWatchingChannel
StopWatchingChannel lets you stop receiving real-time updates from a specific channel, which can help reduce distractions or manage notifications more effectively when you no longer need immediate updates.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/stop-watching?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
connection_id(string)
TruncateChannel
Clear all messages from a channel while preserving its settings and members, effectively resetting the conversation. Use this to start anew without deleting the channel entirely.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/truncate" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"hard_delete": true,
"skip_push": true
}'Example: with message and member_ids
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/truncate" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"member_ids": ["id-1", "id-2"],
"message": { "attachments": [{ "custom": {}, "actions": [{ "name": "Example Name", "text": "Hello, World!", "type": "messaging", "style": "example_value" }] }] }
}'Example: with truncated_at
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/truncate" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"truncated_at": 1.0
}'Response: TruncateChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
hard_delete(bool): Permanently delete channel data (messages, reactions, etc.)member_ids([]string): List of member IDs to hide message history for. If empty, truncates the channel for all membersmessage(MessageRequest)skip_push(bool): Whenmessageis set disables all push notifications for ittruncated_at(float): Truncate channel data up totruncated_at. The system message (if provided) creation time is always greater thantruncated_at
MarkUnread
Mark messages in a channel as unread, which can be useful for revisiting important conversations or managing notification settings. Use this to reset the read status of messages that need attention.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/unread" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message_id": "message-789",
"message_timestamp": 1.0
}'Example: with thread_id
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channels/messaging/example-id/unread" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"thread_id": "example_value"
}'Response: Response
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
message_id(string): ID of the message from where the channel is marked unreadmessage_timestamp(float): Timestamp of the message from where the channel is marked unreadthread_id(string): Mark a thread unread, specify one of the thread, message timestamp, or message id
QueryDrafts
Search for draft messages to review or manage incomplete communications before they are sent within the chat.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/drafts/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"limit": 1
}'Example: with sort and prev
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/drafts/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"prev": "example_value",
"sort": [{ "direction": 1 }]
}'Example: with next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/drafts/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"next": "example_value"
}'Response: QueryDraftsResponse
Parameters
Request Body:
filter(object): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parameters
QueryMembers
Retrieve a list of members within a chat, perfect for when you need to understand the participants in a conversation or manage member-related actions.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/members?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: MembersResponse
Parameters
Query Parameters:
payload()
GetMessage
Fetch a specific message by its identifier, ideal for when you need detailed information about a particular message.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/messages/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetMessageResponse
Parameters
Path Parameters:
id(string) (required)
UpdateMessage
Modify the content of an existing message, useful for correcting errors or updating information within a conversation.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"message": { "attachments": [{ "custom": {}, "actions": [{ "name": "Example Name", "text": "Hello, World!", "type": "messaging", "style": "example_value" }] }] },
"skip_enrich_url": "https://example.com",
"skip_push": true
}'Response: UpdateMessageResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
message(MessageRequest) (required): Messageskip_enrich_url(bool): Skip enrich URLskip_push(bool)
UpdateMessagePartial
Make selective changes to parts of a message without altering the entire content, perfect for minor edits or updates.
Example
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/messages/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"skip_enrich_url": "https://example.com",
"skip_push": true
}'Example: with set and unset
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/messages/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"set": {},
"unset": ["value1", "value2"]
}'Response: UpdateMessagePartialResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
set(object): Sets new field valuesskip_enrich_url(bool): Skip enriching the URL in the messageskip_push(bool)unset([]string): Array of field names to unset
DeleteMessage
Remove a message from the chat, useful for managing content or when you need to eliminate outdated or inappropriate information.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/messages/example-id?hard=true&deleted_by=example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with delete_for_me
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/messages/example-id?delete_for_me=true" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: DeleteMessageResponse
Parameters
Path Parameters:
id(string) (required)
Query Parameters:
hard(bool)deleted_by(string)delete_for_me(bool)
RunMessageAction
Execute a predefined action on a message, ideal for triggering automated responses or workflows based on message content.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/action" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"form_data": {}
}'Response: MessageActionResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
form_data(object) (required): ReadOnlyData to execute command with
SendReaction
Express your response or feedback to a message by sending an emoji reaction, enhancing interaction and engagement within the chat.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/reaction" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"reaction": { "type": "messaging", "created_at": 1.0 },
"enforce_unique": true,
"skip_push": true
}'Response: SendReactionResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
enforce_unique(bool): Whether to replace all existing user reactionsreaction(ReactionRequest) (required)skip_push(bool): Skips any mobile push notifications
DeleteReaction
Removes a user's reaction from a message, useful for managing or correcting reactions in a conversation.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/reaction/messaging?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: DeleteReactionResponse
Parameters
Path Parameters:
id(string) (required)type(string) (required)
Query Parameters:
user_id(string)
GetReactions
Retrieves all reactions associated with a specific message, allowing users to view collective feedback or expressions from the chat participants.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/reactions?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetReactionsResponse
Parameters
Path Parameters:
id(string) (required)
Query Parameters:
limit(int)offset(int)
QueryReactions
Fetches specific reactions based on given criteria, enabling users to filter and analyze reactions for insights or moderation.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/reactions" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"limit": 1
}'Example: with sort and prev
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/reactions" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"prev": "example_value",
"sort": [{ "direction": 1 }]
}'Example: with next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/reactions" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"next": "example_value"
}'Response: QueryReactionsResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
filter(object): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parameters
TranslateMessage
Converts a message into a different language, facilitating communication between users who speak different languages.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/translate" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"language": "example_value"
}'Response: MessageActionResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
language(string) (required): Language to translate message to
CastPollVote
Allows a user to submit their vote in a poll, enabling participation and engagement in decision-making processes.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/message-789/polls/example_value/vote" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"vote": { "answer_text": "example_value" }
}'Response: PollVoteResponse
Parameters
Path Parameters:
message_id(string) (required)poll_id(string) (required)
Request Body:
vote(VoteData): Vote data
DeletePollVote
Removes a user's vote from a poll, providing flexibility to change decisions or correct voting errors.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/messages/message-789/polls/example_value/vote/example_value?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: PollVoteResponse
Parameters
Path Parameters:
message_id(string) (required)poll_id(string) (required)vote_id(string) (required)
Query Parameters:
user_id(string)
CreateReminder
Sets up a reminder for a specific event or task, helping users stay organized and remember important dates or activities.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/message-789/reminders" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"remind_at": 1.0
}'Response: ReminderResponseData
Parameters
Path Parameters:
message_id(string) (required)
Request Body:
remind_at(float)
UpdateReminder
Modifies an existing reminder, allowing users to adjust details or schedules to accommodate changes in plans.
Example
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/messages/message-789/reminders" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"remind_at": 1.0
}'Response: UpdateReminderResponse
Parameters
Path Parameters:
message_id(string) (required)
Request Body:
remind_at(float)
DeleteReminder
Removes an existing reminder, useful for clearing completed tasks or canceling unnecessary notifications.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/messages/message-789/reminders" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: DeleteReminderResponse
Parameters
Path Parameters:
message_id(string) (required)
GetReplies
Retrieve all replies to a specific message, useful for following a conversation thread within a chat.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/messages/example_value/replies?sort=example_value&limit=10" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with id_gte and id_gt
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/messages/example_value/replies?id_gte=example_value&id_gt=example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with id_lte and id_lt
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/messages/example_value/replies?id_lte=example_value&id_lt=example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with id_around
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/messages/example_value/replies?id_around=example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetRepliesResponse
Parameters
Path Parameters:
parent_id(string) (required)
Query Parameters:
sort([]SortParamRequest)limit(int)id_gte(string)id_gt(string)id_lte(string)id_lt(string)id_around(string)
QueryMessageFlags
Check the flags associated with messages, helping to identify and manage content that requires moderation or attention.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/moderation/flags/message?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: QueryMessageFlagsResponse
Parameters
Query Parameters:
payload()
MuteChannel
Temporarily silence notifications from a specific channel, ideal for minimizing distractions without leaving the conversation.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/moderation/mute/channel" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channel_cids": ["id-1", "id-2"],
"expiration": 1
}'Response: MuteChannelResponse
Parameters
Request Body:
channel_cids([]string): Channel CIDs to mute (if multiple channels)expiration(int): Duration of mute in milliseconds
UnmuteChannel
Re-enable notifications for a previously muted channel, allowing you to stay updated on new messages.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/moderation/unmute/channel" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channel_cids": ["id-1", "id-2"],
"expiration": 1
}'Response: UnmuteResponse
Parameters
Request Body:
channel_cids([]string): Channel CIDs to mute (if multiple channels)expiration(int): Duration of mute in milliseconds
QueryBannedUsers
List the users who have been banned from a chat, useful for managing community access and enforcing rules.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/query_banned_users?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: QueryBannedUsersResponse
Parameters
Query Parameters:
payload()
QueryFutureChannelBans
View scheduled bans for a channel, helping you anticipate and manage upcoming restrictions on user access.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/query_future_channel_bans?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: QueryFutureChannelBansResponse
Parameters
Query Parameters:
payload()
QueryReminders
Access a list of reminders set within the chat, ensuring you don't miss important events or tasks.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/reminders/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"limit": 1
}'Example: with sort and prev
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/reminders/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"prev": "example_value",
"sort": [{ "direction": 1 }]
}'Example: with next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/reminders/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"next": "example_value"
}'Response: QueryRemindersResponse
Parameters
Request Body:
filter(object): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parameters
Search
Look for specific messages across channels using keywords, enabling you to quickly find relevant information or past conversations.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/search?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: SearchResponse
Parameters
Query Parameters:
payload()
Sync
Sync ensures that your local data is up-to-date with the server, providing you with the latest information and changes, which is essential for maintaining data accuracy across devices.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/sync?with_inaccessible_cids=true&watch=true" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channel_cids": ["id-1", "id-2"],
"last_sync_at": 1.0
}'Example: with connection_id
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/sync?connection_id=example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channel_cids": ["id-1", "id-2"],
"last_sync_at": 1.0
}'Response: SyncResponse
Parameters
Query Parameters:
with_inaccessible_cids(bool)watch(bool)connection_id(string)
Request Body:
channel_cids([]string) (required): List of channel CIDs to synclast_sync_at(float) (required): Date from which synchronization should happen
QueryThreads
Search and filter chat threads based on specific criteria, enabling efficient navigation and management of conversation histories.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/threads?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"limit": 1
}'Example: with sort and next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/threads?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"next": "example_value",
"sort": [{ "direction": 1 }]
}'Example: with participant_limit and prev
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/threads?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"participant_limit": 1,
"prev": "example_value"
}'Example: with reply_limit and member_limit
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/threads?" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"member_limit": 1,
"reply_limit": 1
}'Response: QueryThreadsResponse
Parameters
Query Parameters:
connection_id(string)
Request Body:
filter(object): Filter to apply to the querylimit(int)member_limit(int)next(string)participant_limit(int): Limit the number of participants returned per each threadprev(string)reply_limit(int): Limit the number of replies returned per each threadsort([]SortParamRequest): Array of sort parameterswatch(bool): Start watching the channel this thread belongs to
GetThread
Retrieve detailed information about a specific chat thread, useful for reviewing conversation content or metadata.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/threads/message-789?watch=true&connection_id=example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with reply_limit and participant_limit
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/threads/message-789?reply_limit=1&participant_limit=1" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with member_limit
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/threads/message-789?member_limit=1" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetThreadResponse
Parameters
Path Parameters:
message_id(string) (required)
Query Parameters:
watch(bool)connection_id(string)reply_limit(int)participant_limit(int)member_limit(int)
UpdateThreadPartial
Make selective updates to a chat thread without altering its entire content, useful for modifying specific details or attributes.
Example
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/threads/message-789" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"set": {},
"unset": ["value1", "value2"]
}'Response: UpdateThreadPartialResponse
Parameters
Path Parameters:
message_id(string) (required)
Request Body:
set(object): Sets new field valuesunset([]string): Array of field names to unset
UnreadCounts
Check the number of unread messages in chat threads, helping users stay informed about new activity and prioritize responses.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/unread" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: WrappedUnreadCountsResponse
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
Attachment
An attachment is a message object that represents a file uploaded by a user.
// Attachment
{
"actions": [],
"asset_url": "string",
"author_icon": "string",
"author_link": "string",
"author_name": "string",
"color": "string",
"custom": {},
"fallback": "string",
"fields": [],
"footer": "string",
"footer_icon": "string",
"giphy": Images,
"image_url": "string",
"og_scrape_url": "string",
"original_height": 0,
"original_width": 0,
"pretext": "string",
"text": "string",
"thumb_url": "string",
"title": "string",
"title_link": "string",
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| actions | Action[] | No | |
| asset_url | string | No | |
| author_icon | string | No | |
| author_link | string | No | |
| author_name | string | No | |
| color | string | No | |
| fallback | string | No | |
| fields | Field[] | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | |
| og_scrape_url | string | No | |
| original_height | number | No | |
| original_width | number | No | |
| pretext | string | No | |
| text | string | No | |
| thumb_url | string | No | |
| title | string | No | |
| title_link | string | No | |
| type | string | No | Attachment type (e.g. image, video, url) |
BanResponse
// BanResponse
{
"banned_by": UserResponse,
"channel": ChannelResponse,
"created_at": 0,
"expires": 0,
"reason": "string",
"shadow": false,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | number | No | |
| reason | string | No | |
| shadow | boolean | No | |
| user | UserResponse | No |
ChannelConfig
Channel configuration overrides
// ChannelConfig
{
"blocklist": "string",
"blocklist_behavior": "flag",
"chat_preferences": ChatPreferences,
"commands": [],
"grants": {},
"max_message_length": 0,
"push_level": "all",
"quotes": false,
"reactions": false,
"replies": false,
"typing_events": false,
"uploads": false,
"url_enrichment": false
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | No |
| chat_preferences | ChatPreferences | No | |
| commands | string[] | No | List of commands that channel supports |
| grants | Record<string, any> | No | |
| max_message_length | number | No | Overrides max message length |
| push_level | 'all' | 'all_mentions' | 'mentions' |
| quotes | boolean | No | Enables message quotes |
| reactions | boolean | No | Enables or disables reactions |
| replies | boolean | No | Enables message replies (threads) |
| typing_events | boolean | No | Enables or disables typing events |
| uploads | boolean | No | Enables or disables file uploads |
| url_enrichment | boolean | No | Enables or disables URL enrichment |
ChannelInput
// ChannelInput
{
"auto_translation_enabled": false,
"auto_translation_language": "string",
"config_overrides": ChannelConfig,
"created_by": UserRequest,
"created_by_id": "string",
"custom": {},
"disabled": false,
"filter_tags": [],
"frozen": false,
"invites": [],
"members": [],
"team": "string",
"truncated_by_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | boolean | No | Enable or disable auto translation |
| auto_translation_language | string | No | Switch auto translation language |
| config_overrides | ChannelConfig | No | |
| created_by | UserRequest | No | |
| created_by_id | string | No | |
| custom | Record<string, any> | No | |
| disabled | boolean | No | |
| filter_tags | string[] | No | |
| frozen | boolean | No | Freeze or unfreeze the channel |
| invites | ChannelMemberRequest[] | No | |
| members | ChannelMemberRequest[] | No | |
| team | string | No | Team the channel belongs to (if multi-tenant mode is enabled) |
| truncated_by_id | string | No |
ChannelInputRequest
// ChannelInputRequest
{
"auto_translation_enabled": false,
"auto_translation_language": "string",
"config_overrides": ConfigOverridesRequest,
"created_by": UserRequest,
"custom": {},
"disabled": false,
"frozen": false,
"invites": [],
"members": [],
"team": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | boolean | No | |
| auto_translation_language | string | No | |
| config_overrides | ConfigOverridesRequest | No | |
| created_by | UserRequest | No | |
| custom | Record<string, any> | No | |
| disabled | boolean | No | |
| frozen | boolean | No | |
| invites | ChannelMemberRequest[] | No | |
| members | ChannelMemberRequest[] | No | |
| team | string | No |
ChannelMemberRequest
// ChannelMemberRequest
{
"channel_role": "string",
"custom": {},
"user": UserResponse,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | |
| channel_role | string | No | Role of the member in the channel |
| custom | Record<string, any> | No | |
| user | UserResponse | No |
ChannelMemberResponse
// ChannelMemberResponse
{
"archived_at": 0,
"ban_expires": 0,
"banned": false,
"channel_role": "string",
"created_at": 0,
"custom": {},
"deleted_at": 0,
"deleted_messages": [],
"invite_accepted_at": 0,
"invite_rejected_at": 0,
"invited": false,
"is_moderator": false,
"notifications_muted": false,
"pinned_at": 0,
"role": "string",
"shadow_banned": false,
"status": "string",
"updated_at": 0,
"user": UserResponse,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | Whether member is banned this channel or not |
| channel_role | string | Yes | Role of the member in the channel |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | |
| notifications_muted | boolean | Yes | |
| shadow_banned | boolean | Yes | Whether member is shadow banned in this channel or not |
| updated_at | number | Yes | Date/time of the last update |
| archived_at | number | No | |
| ban_expires | number | No | Expiration date of the ban |
| deleted_at | number | No | |
| deleted_messages | string[] | No | |
| invite_accepted_at | number | No | Date when invite was accepted |
| invite_rejected_at | number | No | Date when invite was rejected |
| invited | boolean | No | Whether member was invited or not |
| is_moderator | boolean | No | Whether member is channel moderator or not |
| pinned_at | number | No | |
| role | string | No | Permission level of the member in the channel (DEPRECATED: use channel_role i... |
| status | string | No | |
| user | UserResponse | No | |
| user_id | string | No |
ChannelMute
// ChannelMute
{
"channel": ChannelResponse,
"created_at": 0,
"expires": 0,
"updated_at": 0,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Date/time of creation |
| updated_at | number | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel that is muted |
| expires | number | No | Date/time of mute expiration |
| user | UserResponse | No | Owner of channel mute |
ChannelPushPreferencesResponse
// ChannelPushPreferencesResponse
{
"chat_level": "string",
"chat_preferences": ChatPreferencesResponse,
"disabled_until": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| chat_level | string | No | |
| chat_preferences | ChatPreferencesResponse | No | |
| disabled_until | number | No |
ChannelResponse
Represents channel in chat
// ChannelResponse
{
"auto_translation_enabled": false,
"auto_translation_language": "string",
"blocked": false,
"cid": "string",
"config": ChannelConfigWithInfo,
"cooldown": 0,
"created_at": 0,
"created_by": UserResponse,
"custom": {},
"deleted_at": 0,
"disabled": false,
"filter_tags": [],
"frozen": false,
"hidden": false,
"hide_messages_before": 0,
"id": "string",
"last_message_at": 0,
"member_count": 0,
"members": [],
"message_count": 0,
"mute_expires_at": 0,
"muted": false,
"own_capabilities": [],
"team": "string",
"truncated_at": 0,
"truncated_by": UserResponse,
"type": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | Yes | Channel CID (<type>:<id>) |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| disabled | boolean | Yes | |
| frozen | boolean | Yes | Whether channel is frozen or not |
| id | string | Yes | Channel unique ID |
| type | string | Yes | Type of the channel |
| updated_at | number | Yes | Date/time of the last update |
| auto_translation_enabled | boolean | No | Whether auto translation is enabled or not |
| auto_translation_language | string | No | Language to translate to when auto translation is active |
| blocked | boolean | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | number | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | number | No | Date/time of deletion |
| filter_tags | string[] | No | List of filter tags associated with the channel |
| hidden | boolean | No | Whether this channel is hidden by current user or not |
| hide_messages_before | number | No | Date since when the message history is accessible |
| last_message_at | number | No | Date of the last message sent |
| member_count | number | No | Number of members in the channel |
| members | ChannelMemberResponse[] | No | List of channel members (max 100) |
| message_count | number | No | Number of messages in the channel |
| mute_expires_at | number | No | Date of mute expiration |
| muted | boolean | No | Whether this channel is muted or not |
| own_capabilities | ChannelOwnCapability[] | No | List of channel capabilities of authenticated user |
| team | string | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | number | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChannelStateResponse
// ChannelStateResponse
{
"active_live_locations": [],
"channel": ChannelResponse,
"draft": DraftResponse,
"duration": "string",
"hidden": false,
"hide_messages_before": 0,
"members": [],
"membership": ChannelMemberResponse,
"messages": [],
"pending_messages": [],
"pinned_messages": [],
"push_preferences": ChannelPushPreferencesResponse,
"read": [],
"threads": [],
"watcher_count": 0,
"watchers": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| members | ChannelMemberResponse[] | Yes | |
| messages | MessageResponse[] | Yes | |
| pinned_messages | MessageResponse[] | Yes | |
| threads | ThreadStateResponse[] | Yes | |
| active_live_locations | SharedLocationResponseData[] | No | |
| channel | ChannelResponse | No | |
| draft | DraftResponse | No | |
| hidden | boolean | No | |
| hide_messages_before | number | No | |
| membership | ChannelMemberResponse | No | |
| pending_messages | PendingMessageResponse[] | No | |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | ReadStateResponse[] | No | |
| watcher_count | number | No | |
| watchers | UserResponse[] | No |
ChannelStateResponseFields
// ChannelStateResponseFields
{
"active_live_locations": [],
"channel": ChannelResponse,
"draft": DraftResponse,
"hidden": false,
"hide_messages_before": 0,
"members": [],
"membership": ChannelMemberResponse,
"messages": [],
"pending_messages": [],
"pinned_messages": [],
"push_preferences": ChannelPushPreferencesResponse,
"read": [],
"threads": [],
"watcher_count": 0,
"watchers": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| members | ChannelMemberResponse[] | Yes | List of channel members |
| messages | MessageResponse[] | Yes | List of channel messages |
| pinned_messages | MessageResponse[] | Yes | List of pinned messages in the channel |
| threads | ThreadStateResponse[] | Yes | |
| active_live_locations | SharedLocationResponseData[] | No | Active live locations in the channel |
| channel | ChannelResponse | No | |
| draft | DraftResponse | No | |
| hidden | boolean | No | Whether this channel is hidden or not |
| hide_messages_before | number | No | Messages before this date are hidden from the user |
| membership | ChannelMemberResponse | No | Current user membership object |
| pending_messages | PendingMessageResponse[] | No | Pending messages that this user has sent |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | ReadStateResponse[] | No | List of read states |
| watcher_count | number | No | Number of channel watchers |
| watchers | UserResponse[] | No | List of user who is watching the channel |
ConfigOverridesRequest
Channel configuration overrides
// ConfigOverridesRequest
{
"blocklist": "string",
"blocklist_behavior": "flag",
"chat_preferences": ChatPreferences,
"commands": [],
"count_messages": false,
"grants": {},
"max_message_length": 0,
"push_level": "all",
"quotes": false,
"reactions": false,
"replies": false,
"shared_locations": false,
"typing_events": false,
"uploads": false,
"url_enrichment": false,
"user_message_reminders": false
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist | string | No | Blocklist name |
| blocklist_behavior | 'flag' | 'block' | No |
| chat_preferences | ChatPreferences | No | |
| commands | string[] | No | List of available commands |
| count_messages | boolean | No | Enable/disable message counting |
| grants | Record<string, any> | No | Permission grants modifiers |
| max_message_length | number | No | Maximum message length |
| push_level | 'all' | 'all_mentions' | 'mentions' |
| quotes | boolean | No | Enable/disable quotes |
| reactions | boolean | No | Enable/disable reactions |
| replies | boolean | No | Enable/disable replies |
| shared_locations | boolean | No | Enable/disable shared locations |
| typing_events | boolean | No | Enable/disable typing events |
| uploads | boolean | No | Enable/disable uploads |
| url_enrichment | boolean | No | Enable/disable URL enrichment |
| user_message_reminders | boolean | No | Enable/disable user message reminders |
CreateDraftResponse
Basic response information
// CreateDraftResponse
{
"draft": DraftResponse,
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| draft | DraftResponse | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
Data
// Data
{
"id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DeleteChannelResponse
Basic response information
// DeleteChannelResponse
{
"channel": ChannelResponse,
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| channel | ChannelResponse | No |
DeleteChannelsResponse
// DeleteChannelsResponse
{
"duration": "string",
"result": {},
"task_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| result | Record<string, any> | No | Map of channel IDs and their deletion results |
| task_id | string | No |
DeleteMessageResponse
Basic response information
// DeleteMessageResponse
{
"duration": "string",
"message": MessageResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes |
DeleteReactionResponse
Basic response information
// DeleteReactionResponse
{
"duration": "string",
"message": MessageResponse,
"reaction": ReactionResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| reaction | ReactionResponse | Yes |
DeleteReminderResponse
Basic response information
// DeleteReminderResponse
{
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeliveredMessagePayload
// DeliveredMessagePayload
{
"cid": "string",
"id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | No | |
| id | string | No |
DraftResponse
// DraftResponse
{
"channel": ChannelResponse,
"channel_cid": "string",
"created_at": 0,
"message": DraftPayloadResponse,
"parent_id": "string",
"parent_message": MessageResponse,
"quoted_message": MessageResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | number | Yes | |
| message | DraftPayloadResponse | Yes | |
| channel | ChannelResponse | No | |
| parent_id | string | No | |
| parent_message | MessageResponse | No | |
| quoted_message | MessageResponse | No |
EventRequest
// EventRequest
{
"custom": {},
"parent_id": "string",
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| custom | Record<string, any> | No | |
| parent_id | string | No |
EventResponse
Basic response information
// EventResponse
{
"duration": "string",
"event": WSEvent
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| event | WSEvent | Yes |
FutureChannelBanResponse
// FutureChannelBanResponse
{
"banned_by": UserResponse,
"created_at": 0,
"expires": 0,
"reason": "string",
"shadow": false,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| banned_by | UserResponse | No | |
| expires | number | No | |
| reason | string | No | |
| shadow | boolean | No | |
| user | UserResponse | No |
GetDraftResponse
Basic response information
// GetDraftResponse
{
"draft": DraftResponse,
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| draft | DraftResponse | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
GetManyMessagesResponse
// GetManyMessagesResponse
{
"duration": "string",
"messages": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| messages | MessageResponse[] | Yes | List of messages |
GetMessageResponse
Basic response information
// GetMessageResponse
{
"duration": "string",
"message": MessageWithChannelResponse,
"pending_message_metadata": {}
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageWithChannelResponse | Yes | |
| pending_message_metadata | Record<string, any> | No |
GetReactionsResponse
// GetReactionsResponse
{
"duration": "string",
"reactions": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| reactions | ReactionResponse[] | Yes | List of reactions |
GetRepliesResponse
Basic response information
// GetRepliesResponse
{
"duration": "string",
"messages": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| messages | MessageResponse[] | Yes |
GetThreadResponse
// GetThreadResponse
{
"duration": "string",
"thread": ThreadStateResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| thread | ThreadStateResponse | Yes | Enriched thread state |
HideChannelResponse
Basic response information
// HideChannelResponse
{
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
ImageSize
// ImageSize
{
"crop": "string",
"height": 0,
"resize": "string",
"width": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | string | No | Crop mode. One of: top, bottom, left, right, center |
| height | number | No | Target image height |
| resize | string | No | Resize method. One of: clip, crop, scale, fill |
| width | number | No | Target image width |
MarkDeliveredResponse
Basic response information
// MarkDeliveredResponse
{
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
MarkReadResponse
// MarkReadResponse
{
"duration": "string",
"event": MarkReadResponseEvent
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| event | MarkReadResponseEvent | No | Mark read event |
MarkReadResponseEvent
// MarkReadResponseEvent
{
"channel": ChannelResponse,
"channel_id": "string",
"channel_last_message_at": 0,
"channel_type": "string",
"cid": "string",
"created_at": 0,
"last_read_message_id": "string",
"team": "string",
"thread": ThreadResponse,
"type": "string",
"user": UserResponseCommonFields
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | string | Yes | |
| channel_type | string | Yes | |
| cid | string | Yes | |
| created_at | number | Yes | |
| type | string | Yes | |
| channel | ChannelResponse | No | |
| channel_last_message_at | number | No | |
| last_read_message_id | string | No | |
| team | string | No | |
| thread | ThreadResponse | No | |
| user | UserResponseCommonFields | No |
MembersResponse
// MembersResponse
{
"duration": "string",
"members": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| members | ChannelMemberResponse[] | Yes | List of found members |
MessageActionResponse
Basic response information
// MessageActionResponse
{
"duration": "string",
"message": MessageResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | No |
MessageFlagResponse
// MessageFlagResponse
{
"approved_at": 0,
"created_at": 0,
"created_by_automod": false,
"custom": {},
"details": FlagDetailsResponse,
"message": MessageResponse,
"moderation_feedback": FlagFeedbackResponse,
"moderation_result": MessageModerationResult,
"reason": "string",
"rejected_at": 0,
"reviewed_at": 0,
"reviewed_by": UserResponse,
"updated_at": 0,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| created_by_automod | boolean | Yes | |
| updated_at | number | Yes | |
| approved_at | number | No | |
| custom | Record<string, any> | No | |
| details | FlagDetailsResponse | No | |
| message | MessageResponse | No | |
| moderation_feedback | FlagFeedbackResponse | No | |
| moderation_result | MessageModerationResult | No | |
| reason | string | No | |
| rejected_at | number | No | |
| reviewed_at | number | No | |
| reviewed_by | UserResponse | No | |
| user | UserResponse | No |
MessagePaginationParams
// MessagePaginationParams
{
"created_at_after": 0,
"created_at_after_or_equal": 0,
"created_at_around": 0,
"created_at_before": 0,
"created_at_before_or_equal": 0,
"id_around": "string",
"id_gt": "string",
"id_gte": "string",
"id_lt": "string",
"id_lte": "string",
"limit": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at_after | number | No | The timestamp to get messages with a created_at timestamp greater than |
| created_at_after_or_equal | number | No | The timestamp to get messages with a created_at timestamp greater than or equ... |
| created_at_around | number | No | The result will be a set of messages, that are both older and newer than the ... |
| created_at_before | number | No | The timestamp to get messages with a created_at timestamp smaller than |
| created_at_before_or_equal | number | No | The timestamp to get messages with a created_at timestamp smaller than or equ... |
| id_around | string | No | The result will be a set of messages, that are both older and newer than the ... |
| id_gt | string | No | The ID of the message to get messages with a timestamp greater than |
| id_gte | string | No | The ID of the message to get messages with a timestamp greater than or equal to |
| id_lt | string | No | The ID of the message to get messages with a timestamp smaller than |
| id_lte | string | No | The ID of the message to get messages with a timestamp smaller than or equal to |
| limit | number | No | The maximum number of messages to return (max limit |
MessageRequest
Message data for creating or updating a message
// MessageRequest
{
"attachments": [],
"custom": {},
"id": "string",
"mentioned_channel": false,
"mentioned_group_ids": [],
"mentioned_here": false,
"mentioned_roles": [],
"mentioned_users": [],
"mml": "string",
"parent_id": "string",
"pin_expires": 0,
"pinned": false,
"pinned_at": "string",
"poll_id": "string",
"quoted_message_id": "string",
"restricted_visibility": [],
"shared_location": SharedLocation,
"show_in_channel": false,
"silent": false,
"text": "string",
"type": "''"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | No | Array of message attachments |
| custom | Record<string, any> | No | |
| id | string | No | Message ID is unique string identifier of the message |
| mentioned_channel | boolean | No | |
| mentioned_group_ids | string[] | No | List of user group IDs to mention. Group members who are also channel members... |
| mentioned_here | boolean | No | |
| mentioned_roles | string[] | No | |
| mentioned_users | string[] | No | Array of user IDs to mention |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | number | No | Date when pinned message expires |
| pinned | boolean | No | Whether message is pinned or not |
| pinned_at | string | No | Date when message got pinned |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message_id | string | No | |
| restricted_visibility | string[] | No | A list of user ids that have restricted visibility to the message |
| shared_location | SharedLocation | No | Contains shared location data |
| show_in_channel | boolean | No | Whether thread reply should be shown in the channel as well |
| silent | boolean | No | Whether message is silent or not |
| text | string | No | Text of the message. Should be empty if mml is provided |
| type | '''' | 'regular' | 'system' |
MessageResponse
Represents any chat message
// MessageResponse
{
"attachments": [],
"cid": "string",
"command": "string",
"created_at": 0,
"custom": {},
"deleted_at": 0,
"deleted_for_me": false,
"deleted_reply_count": 0,
"draft": DraftResponse,
"html": "string",
"i18n": {},
"id": "string",
"image_labels": {},
"latest_reactions": [],
"member": ChannelMemberResponse,
"mentioned_channel": false,
"mentioned_group_ids": [],
"mentioned_here": false,
"mentioned_roles": [],
"mentioned_users": [],
"message_text_updated_at": 0,
"mml": "string",
"moderation": ModerationV2Response,
"own_reactions": [],
"parent_id": "string",
"pin_expires": 0,
"pinned": false,
"pinned_at": 0,
"pinned_by": UserResponse,
"poll": PollResponseData,
"poll_id": "string",
"quoted_message": MessageResponse,
"quoted_message_id": "string",
"reaction_counts": {},
"reaction_groups": {},
"reaction_scores": {},
"reminder": ReminderResponseData,
"reply_count": 0,
"restricted_visibility": [],
"shadowed": false,
"shared_location": SharedLocationResponseData,
"show_in_channel": false,
"silent": false,
"text": "string",
"thread_participants": [],
"type": "string",
"updated_at": 0,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | Yes | Array of message attachments |
| cid | string | Yes | Channel unique identifier in <type>:<id> format |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | |
| deleted_reply_count | number | Yes | |
| html | string | Yes | Contains HTML markup of the message. Can only be set when using server-side API |
| id | string | Yes | Message ID is unique string identifier of the message |
| latest_reactions | ReactionResponse[] | Yes | List of 10 latest reactions to this message |
| mentioned_channel | boolean | Yes | Whether the message mentioned the channel tag |
| mentioned_here | boolean | Yes | Whether the message mentioned online users with @here tag |
| mentioned_users | UserResponse[] | Yes | List of mentioned users |
| own_reactions | ReactionResponse[] | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | boolean | Yes | Whether message is pinned or not |
| reaction_counts | Record<string, any> | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Record<string, any> | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | number | Yes | Number of replies to this message |
| restricted_visibility | string[] | Yes | A list of user ids that have restricted visibility to the message, if the lis... |
| shadowed | boolean | Yes | Whether the message was shadowed or not |
| silent | boolean | Yes | Whether message is silent or not |
| text | string | Yes | Text of the message. Should be empty if mml is provided |
| type | string | Yes | Contains type of the message. One of: regular, ephemeral, error, reply, syste... |
| updated_at | number | Yes | Date/time of the last update |
| user | UserResponse | Yes | Sender of the message. Required when using server-side API |
| command | string | No | Contains provided slash command |
| deleted_at | number | No | Date/time of deletion |
| deleted_for_me | boolean | No | |
| draft | DraftResponse | No | |
| i18n | Record<string, any> | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Record<string, any> | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | string[] | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | string[] | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | number | No | |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | number | No | Date when pinned message expires |
| pinned_at | number | No | Date when message got pinned |
| pinned_by | UserResponse | No | Contains user who pinned the message |
| poll | PollResponseData | No | |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message | MessageResponse | No | Contains quoted message |
| quoted_message_id | string | No | |
| reaction_groups | Record<string, any> | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | boolean | No | Whether thread reply should be shown in the channel as well |
| thread_participants | UserResponse[] | No | List of users who participate in thread |
MessageWithChannelResponse
Represents any chat message
// MessageWithChannelResponse
{
"attachments": [],
"channel": ChannelResponse,
"cid": "string",
"command": "string",
"created_at": 0,
"custom": {},
"deleted_at": 0,
"deleted_for_me": false,
"deleted_reply_count": 0,
"draft": DraftResponse,
"html": "string",
"i18n": {},
"id": "string",
"image_labels": {},
"latest_reactions": [],
"member": ChannelMemberResponse,
"mentioned_channel": false,
"mentioned_group_ids": [],
"mentioned_here": false,
"mentioned_roles": [],
"mentioned_users": [],
"message_text_updated_at": 0,
"mml": "string",
"moderation": ModerationV2Response,
"own_reactions": [],
"parent_id": "string",
"pin_expires": 0,
"pinned": false,
"pinned_at": 0,
"pinned_by": UserResponse,
"poll": PollResponseData,
"poll_id": "string",
"quoted_message": MessageResponse,
"quoted_message_id": "string",
"reaction_counts": {},
"reaction_groups": {},
"reaction_scores": {},
"reminder": ReminderResponseData,
"reply_count": 0,
"restricted_visibility": [],
"shadowed": false,
"shared_location": SharedLocationResponseData,
"show_in_channel": false,
"silent": false,
"text": "string",
"thread_participants": [],
"type": "string",
"updated_at": 0,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | Yes | Array of message attachments |
| channel | ChannelResponse | Yes | Channel object |
| cid | string | Yes | Channel unique identifier in <type>:<id> format |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | |
| deleted_reply_count | number | Yes | |
| html | string | Yes | Contains HTML markup of the message. Can only be set when using server-side API |
| id | string | Yes | Message ID is unique string identifier of the message |
| latest_reactions | ReactionResponse[] | Yes | List of 10 latest reactions to this message |
| mentioned_channel | boolean | Yes | Whether the message mentioned the channel tag |
| mentioned_here | boolean | Yes | Whether the message mentioned online users with @here tag |
| mentioned_users | UserResponse[] | Yes | List of mentioned users |
| own_reactions | ReactionResponse[] | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | boolean | Yes | Whether message is pinned or not |
| reaction_counts | Record<string, any> | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Record<string, any> | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | number | Yes | Number of replies to this message |
| restricted_visibility | string[] | Yes | A list of user ids that have restricted visibility to the message, if the lis... |
| shadowed | boolean | Yes | Whether the message was shadowed or not |
| silent | boolean | Yes | Whether message is silent or not |
| text | string | Yes | Text of the message. Should be empty if mml is provided |
| type | string | Yes | Contains type of the message. One of: regular, ephemeral, error, reply, syste... |
| updated_at | number | Yes | Date/time of the last update |
| user | UserResponse | Yes | Sender of the message. Required when using server-side API |
| command | string | No | Contains provided slash command |
| deleted_at | number | No | Date/time of deletion |
| deleted_for_me | boolean | No | |
| draft | DraftResponse | No | |
| i18n | Record<string, any> | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Record<string, any> | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | string[] | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | string[] | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | number | No | |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | number | No | Date when pinned message expires |
| pinned_at | number | No | Date when message got pinned |
| pinned_by | UserResponse | No | Contains user who pinned the message |
| poll | PollResponseData | No | |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message | MessageResponse | No | Contains quoted message |
| quoted_message_id | string | No | |
| reaction_groups | Record<string, any> | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | boolean | No | Whether thread reply should be shown in the channel as well |
| thread_participants | UserResponse[] | No | List of users who participate in thread |
MuteChannelResponse
// MuteChannelResponse
{
"channel_mute": ChannelMute,
"channel_mutes": [],
"duration": "string",
"own_user": OwnUserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| channel_mute | ChannelMute | No | Object with channel mute (if one channel was muted) |
| channel_mutes | ChannelMute[] | No | Object with mutes (if multiple channels were muted) |
| own_user | OwnUserResponse | No | Authorized user object with fresh mutes information |
OnlyUserID
// OnlyUserID
{
"id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
OwnUserResponse
// OwnUserResponse
{
"avg_response_time": 0,
"banned": false,
"blocked_user_ids": [],
"channel_mutes": [],
"created_at": 0,
"custom": {},
"deactivated_at": 0,
"deleted_at": 0,
"devices": [],
"id": "string",
"image": "string",
"invisible": false,
"language": "string",
"last_active": 0,
"latest_hidden_channels": [],
"mutes": [],
"name": "string",
"online": false,
"privacy_settings": PrivacySettingsResponse,
"push_preferences": PushPreferencesResponse,
"revoke_tokens_issued_before": 0,
"role": "string",
"teams": [],
"teams_role": {},
"total_unread_count": 0,
"total_unread_count_by_team": {},
"unread_channels": 0,
"unread_count": 0,
"unread_threads": 0,
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | |
| channel_mutes | ChannelMute[] | Yes | |
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| devices | DeviceResponse[] | Yes | |
| id | string | Yes | |
| invisible | boolean | Yes | |
| language | string | Yes | |
| mutes | UserMuteResponse[] | Yes | |
| online | boolean | Yes | |
| role | string | Yes | |
| teams | string[] | Yes | |
| total_unread_count | number | Yes | |
| unread_channels | number | Yes | |
| unread_count | number | Yes | |
| unread_threads | number | Yes | |
| updated_at | number | Yes | |
| avg_response_time | number | No | |
| blocked_user_ids | string[] | No | |
| deactivated_at | number | No | |
| deleted_at | number | No | |
| image | string | No | |
| last_active | number | No | |
| latest_hidden_channels | string[] | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | number | No | |
| teams_role | Record<string, any> | No | |
| total_unread_count_by_team | Record<string, any> | No |
PaginationParams
// PaginationParams
{
"limit": 0,
"offset": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | number | No | |
| offset | number | No |
ParsedPredefinedFilterResponse
// ParsedPredefinedFilterResponse
{
"filter": {},
"name": "string",
"sort": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | Yes | |
| name | string | Yes | |
| sort | SortParamRequest[] | No |
PendingMessageResponse
// PendingMessageResponse
{
"channel": ChannelResponse,
"message": MessageResponse,
"metadata": {},
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| metadata | Record<string, any> | No | |
| user | UserResponse | No |
PollResponseData
// PollResponseData
{
"allow_answers": false,
"allow_user_suggested_options": false,
"answers_count": 0,
"created_at": 0,
"created_by": UserResponse,
"created_by_id": "string",
"custom": {},
"description": "string",
"enforce_unique_vote": false,
"id": "string",
"is_closed": false,
"latest_answers": [],
"latest_votes_by_option": {},
"max_votes_allowed": 0,
"name": "string",
"options": [],
"own_votes": [],
"updated_at": 0,
"vote_count": 0,
"vote_counts_by_option": {},
"voting_visibility": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | boolean | Yes | |
| allow_user_suggested_options | boolean | Yes | |
| answers_count | number | Yes | |
| created_at | number | Yes | |
| created_by_id | string | Yes | |
| custom | Record<string, any> | Yes | |
| description | string | Yes | |
| enforce_unique_vote | boolean | Yes | |
| id | string | Yes | |
| latest_answers | PollVoteResponseData[] | Yes | |
| latest_votes_by_option | Record<string, any> | Yes | |
| name | string | Yes | |
| options | PollOptionResponseData[] | Yes | |
| own_votes | PollVoteResponseData[] | Yes | |
| updated_at | number | Yes | |
| vote_count | number | Yes | |
| vote_counts_by_option | Record<string, any> | Yes | |
| voting_visibility | string | Yes | |
| created_by | UserResponse | No | |
| is_closed | boolean | No | |
| max_votes_allowed | number | No |
PollVoteResponse
// PollVoteResponse
{
"duration": "string",
"poll": PollResponseData,
"vote": PollVoteResponseData
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | No | Poll |
| vote | PollVoteResponseData | No | Poll vote |
PollVoteResponseData
// PollVoteResponseData
{
"answer_text": "string",
"created_at": 0,
"id": "string",
"is_answer": false,
"option_id": "string",
"poll_id": "string",
"updated_at": 0,
"user": UserResponse,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| id | string | Yes | |
| option_id | string | Yes | |
| poll_id | string | Yes | |
| updated_at | number | Yes | |
| answer_text | string | No | |
| is_answer | boolean | No | |
| user | UserResponse | No | |
| user_id | string | No |
QueryBannedUsersResponse
// QueryBannedUsersResponse
{
"bans": [],
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bans | BanResponse[] | Yes | List of found bans |
| duration | string | Yes | Duration of the request in milliseconds |
QueryChannelsResponse
// QueryChannelsResponse
{
"channels": [],
"duration": "string",
"predefined_filter": ParsedPredefinedFilterResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channels | ChannelStateResponseFields[] | Yes | List of channels |
| duration | string | Yes | Duration of the request in milliseconds |
| predefined_filter | ParsedPredefinedFilterResponse | No | The parsed predefined filter with interpolated values, only present when usin... |
QueryDraftsResponse
// QueryDraftsResponse
{
"drafts": [],
"duration": "string",
"next": "string",
"prev": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| drafts | DraftResponse[] | Yes | Drafts |
| duration | string | Yes | Duration of the request in milliseconds |
| next | string | No | |
| prev | string | No |
QueryFutureChannelBansResponse
// QueryFutureChannelBansResponse
{
"bans": [],
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bans | FutureChannelBanResponse[] | Yes | List of found future channel bans |
| duration | string | Yes | Duration of the request in milliseconds |
QueryMessageFlagsResponse
Query message flags response
// QueryMessageFlagsResponse
{
"duration": "string",
"flags": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| flags | MessageFlagResponse[] | Yes | The flags that match the query |
QueryReactionsResponse
Basic response information
// QueryReactionsResponse
{
"duration": "string",
"next": "string",
"prev": "string",
"reactions": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reactions | ReactionResponse[] | Yes | |
| next | string | No | |
| prev | string | No |
QueryRemindersResponse
// QueryRemindersResponse
{
"duration": "string",
"next": "string",
"prev": "string",
"reminders": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reminders | ReminderResponseData[] | Yes | MessageReminders data returned by the query |
| next | string | No | |
| prev | string | No |
QueryThreadsResponse
// QueryThreadsResponse
{
"duration": "string",
"next": "string",
"prev": "string",
"threads": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| threads | ThreadStateResponse[] | Yes | List of enriched thread states |
| next | string | No | |
| prev | string | No |
Reaction
// Reaction
{
"activity_id": "string",
"children_counts": {},
"created_at": 0,
"data": {},
"deleted_at": 0,
"id": "string",
"kind": "string",
"latest_children": {},
"moderation": {},
"own_children": {},
"parent": "string",
"score": 0,
"target_feeds": [],
"target_feeds_extra_data": {},
"updated_at": 0,
"user": User,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | number | Yes | |
| kind | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| children_counts | Record<string, any> | No | |
| data | Record<string, any> | No | |
| deleted_at | number | No | |
| id | string | No | |
| latest_children | Record<string, any> | No | |
| moderation | Record<string, any> | No | |
| own_children | Record<string, any> | No | |
| parent | string | No | |
| score | number | No | |
| target_feeds | string[] | No | |
| target_feeds_extra_data | Record<string, any> | No | |
| user | User | No |
ReactionRequest
Represents user reaction to a message
// ReactionRequest
{
"created_at": 0,
"custom": {},
"score": 0,
"type": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | The type of reaction (e.g. 'like', 'laugh', 'wow') |
| created_at | number | No | Date/time of creation |
| custom | Record<string, any> | No | |
| score | number | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | number | No | Date/time of the last update |
ReactionResponse
// ReactionResponse
{
"created_at": 0,
"custom": {},
"message_id": "string",
"score": 0,
"type": "string",
"updated_at": 0,
"user": UserResponse,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| message_id | string | Yes | Message ID |
| score | number | Yes | Score of the reaction |
| type | string | Yes | Type of reaction |
| updated_at | number | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | string | Yes | User ID |
ReadStateResponse
// ReadStateResponse
{
"last_delivered_at": 0,
"last_delivered_message_id": "string",
"last_read": 0,
"last_read_message_id": "string",
"unread_messages": 0,
"user": UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | number | Yes | |
| unread_messages | number | Yes | |
| user | UserResponse | Yes | |
| last_delivered_at | number | No | |
| last_delivered_message_id | string | No | |
| last_read_message_id | string | No |
ReminderResponseData
// ReminderResponseData
{
"channel": ChannelResponse,
"channel_cid": "string",
"created_at": 0,
"message": MessageResponse,
"message_id": "string",
"remind_at": 0,
"updated_at": 0,
"user": UserResponse,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | number | Yes | |
| message_id | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| remind_at | number | No | |
| user | UserResponse | No |
Response
Basic response information
// Response
{
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
SearchResponse
// SearchResponse
{
"duration": "string",
"next": "string",
"previous": "string",
"results": [],
"results_warning": SearchWarning
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| results | SearchResult[] | Yes | Search results |
| next | string | No | Value to pass to the next search query in order to paginate |
| previous | string | No | Value that points to the previous page. Pass as the next value in a search qu... |
| results_warning | SearchWarning | No | Warning about the search results |
SearchResult
// SearchResult
{
"message": SearchResultMessage
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| message | SearchResultMessage | No | Found message |
SearchWarning
// SearchWarning
{
"channel_search_cids": [],
"channel_search_count": 0,
"warning_code": 0,
"warning_description": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| warning_code | number | Yes | Code corresponding to the warning |
| warning_description | string | Yes | Description of the warning |
| channel_search_cids | string[] | No | Channel CIDs for the searched channels |
| channel_search_count | number | No | Number of channels searched |
SendMessageResponse
// SendMessageResponse
{
"duration": "string",
"message": MessageResponse,
"pending_message_metadata": {}
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | Message response |
| pending_message_metadata | Record<string, any> | No | Pending message metadata |
SendReactionResponse
Basic response information
// SendReactionResponse
{
"duration": "string",
"message": MessageResponse,
"reaction": ReactionResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| reaction | ReactionResponse | Yes |
SharedLocation
// SharedLocation
{
"created_by_device_id": "string",
"end_at": 0,
"latitude": 0,
"longitude": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | number | Yes | |
| longitude | number | Yes | |
| created_by_device_id | string | No | |
| end_at | number | No |
SharedLocationResponseData
// SharedLocationResponseData
{
"channel": ChannelResponse,
"channel_cid": "string",
"created_at": 0,
"created_by_device_id": "string",
"end_at": 0,
"latitude": 0,
"longitude": 0,
"message": MessageResponse,
"message_id": "string",
"updated_at": 0,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | number | Yes | |
| created_by_device_id | string | Yes | |
| latitude | number | Yes | |
| longitude | number | Yes | |
| message_id | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| channel | ChannelResponse | No | |
| end_at | number | No | |
| message | MessageResponse | No |
ShowChannelResponse
Basic response information
// ShowChannelResponse
{
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
SortParamRequest
// SortParamRequest
{
"direction": 0,
"field": "string",
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | string | No | Name of field to sort by |
| type | string | No | Type of field to sort by. Empty string or omitted means string type (default)... |
SyncResponse
Sync response
// SyncResponse
{
"duration": "string",
"events": [],
"inaccessible_cids": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| events | WSEvent[] | Yes | List of events |
| inaccessible_cids | string[] | No | List of CIDs that user can't access |
ThreadResponse
// ThreadResponse
{
"active_participant_count": 0,
"channel": ChannelResponse,
"channel_cid": "string",
"created_at": 0,
"created_by": UserResponse,
"created_by_user_id": "string",
"custom": {},
"deleted_at": 0,
"last_message_at": 0,
"parent_message": MessageResponse,
"parent_message_id": "string",
"participant_count": 0,
"reply_count": 0,
"thread_participants": [],
"title": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | number | Yes | Active Participant Count |
| channel_cid | string | Yes | Channel CID |
| created_at | number | Yes | Date/time of creation |
| created_by_user_id | string | Yes | Created By User ID |
| custom | Record<string, any> | Yes | Custom data for this object |
| parent_message_id | string | Yes | Parent Message ID |
| participant_count | number | Yes | Participant Count |
| title | string | Yes | Title |
| updated_at | number | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | number | No | Deleted At |
| last_message_at | number | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| reply_count | number | No | Reply Count |
| thread_participants | ThreadParticipant[] | No | Thread Participants |
ThreadStateResponse
// ThreadStateResponse
{
"active_participant_count": 0,
"channel": ChannelResponse,
"channel_cid": "string",
"created_at": 0,
"created_by": UserResponse,
"created_by_user_id": "string",
"custom": {},
"deleted_at": 0,
"draft": DraftResponse,
"last_message_at": 0,
"latest_replies": [],
"parent_message": MessageResponse,
"parent_message_id": "string",
"participant_count": 0,
"read": [],
"reply_count": 0,
"thread_participants": [],
"title": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | number | Yes | Active Participant Count |
| channel_cid | string | Yes | Channel CID |
| created_at | number | Yes | Date/time of creation |
| created_by_user_id | string | Yes | Created By User ID |
| custom | Record<string, any> | Yes | Custom data for this object |
| latest_replies | MessageResponse[] | Yes | |
| parent_message_id | string | Yes | Parent Message ID |
| participant_count | number | Yes | Participant Count |
| title | string | Yes | Title |
| updated_at | number | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | number | No | Deleted At |
| draft | DraftResponse | No | |
| last_message_at | number | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| read | ReadStateResponse[] | No | |
| reply_count | number | No | Reply Count |
| thread_participants | ThreadParticipant[] | No | Thread Participants |
Time
// Time
{
}Timestamp
// Timestamp
{
"Time": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Time | number | No |
TruncateChannelResponse
// TruncateChannelResponse
{
"channel": ChannelResponse,
"duration": "string",
"message": MessageResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| channel | ChannelResponse | No | Truncated channel object |
| message | MessageResponse | No | Truncated message object |
UnmuteResponse
// UnmuteResponse
{
"duration": "string",
"non_existing_users": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| non_existing_users | string[] | No | A list of users that can't be found. Common cause for this is deleted users |
UnreadCountsChannel
// UnreadCountsChannel
{
"channel_id": "string",
"last_read": 0,
"unread_count": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | string | Yes | |
| last_read | number | Yes | |
| unread_count | number | Yes |
UnreadCountsChannelType
// UnreadCountsChannelType
{
"channel_count": 0,
"channel_type": "string",
"unread_count": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_count | number | Yes | |
| channel_type | string | Yes | |
| unread_count | number | Yes |
UnreadCountsThread
// UnreadCountsThread
{
"last_read": 0,
"last_read_message_id": "string",
"parent_message_id": "string",
"unread_count": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | number | Yes | |
| last_read_message_id | string | Yes | |
| parent_message_id | string | Yes | |
| unread_count | number | Yes |
UpdateChannelPartialResponse
// UpdateChannelPartialResponse
{
"channel": ChannelResponse,
"duration": "string",
"members": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| members | ChannelMemberResponse[] | Yes | List of updated members |
| channel | ChannelResponse | No | Updated channel object |
UpdateChannelResponse
// UpdateChannelResponse
{
"channel": ChannelResponse,
"duration": "string",
"members": [],
"message": MessageResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| members | ChannelMemberResponse[] | Yes | List of channel members |
| channel | ChannelResponse | No | Updated channel |
| message | MessageResponse | No | Message sent to the chat |
UpdateMemberPartialResponse
// UpdateMemberPartialResponse
{
"channel_member": ChannelMemberResponse,
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| channel_member | ChannelMemberResponse | No | Updated channel member |
UpdateMessagePartialResponse
// UpdateMessagePartialResponse
{
"duration": "string",
"message": MessageResponse,
"pending_message_metadata": {}
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | No | Updated message |
| pending_message_metadata | Record<string, any> | No | Pending message metadata |
UpdateMessageResponse
Basic response information
// UpdateMessageResponse
{
"duration": "string",
"message": MessageResponse,
"pending_message_metadata": {}
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| pending_message_metadata | Record<string, any> | No |
UpdateReminderResponse
Basic response information
// UpdateReminderResponse
{
"duration": "string",
"reminder": ReminderResponseData
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reminder | ReminderResponseData | Yes |
UpdateThreadPartialResponse
// UpdateThreadPartialResponse
{
"duration": "string",
"thread": ThreadResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| thread | ThreadResponse | Yes | Updated thread (not enriched) |
UploadChannelFileResponse
// UploadChannelFileResponse
{
"duration": "string",
"file": "string",
"moderation_action": "string",
"thumb_url": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file | string | No | URL to the uploaded asset. Should be used to put to asset_url attachment field |
| moderation_action | string | No | |
| thumb_url | string | No | URL of the file thumbnail for supported file formats. Should be put to `thumb... |
UploadChannelResponse
// UploadChannelResponse
{
"duration": "string",
"file": "string",
"moderation_action": "string",
"thumb_url": "string",
"upload_sizes": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file | string | No | |
| moderation_action | string | No | |
| thumb_url | string | No | |
| upload_sizes | ImageSize[] | No | Array of image size configurations |
User
// User
{
"data": {},
"id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | Record<string, any> | No |
UserRequest
User request object
// UserRequest
{
"custom": {},
"id": "string",
"image": "string",
"invisible": false,
"language": "string",
"name": "string",
"privacy_settings": PrivacySettingsResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | Record<string, any> | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | boolean | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No |
UserResponse
User response object
// UserResponse
{
"avg_response_time": 0,
"banned": false,
"blocked_user_ids": [],
"created_at": 0,
"custom": {},
"deactivated_at": 0,
"deleted_at": 0,
"id": "string",
"image": "string",
"language": "string",
"last_active": 0,
"name": "string",
"online": false,
"revoke_tokens_issued_before": 0,
"role": "string",
"teams": [],
"teams_role": {},
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | Whether a user is banned or not |
| blocked_user_ids | string[] | Yes | |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| language | string | Yes | Preferred language of a user |
| online | boolean | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| teams | string[] | Yes | List of teams user is a part of |
| updated_at | number | Yes | Date/time of the last update |
| avg_response_time | number | No | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| revoke_tokens_issued_before | number | No | Revocation date for tokens |
| teams_role | Record<string, any> | No |
VoteData
// VoteData
{
"answer_text": "string",
"option_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | string | No | |
| option_id | string | No |
WSEvent
The discriminator object for all websocket events, it maps events' payload to the final type
// WSEvent
{
}WrappedUnreadCountsResponse
Basic response information
// WrappedUnreadCountsResponse
{
"channel_type": [],
"channels": [],
"duration": "string",
"threads": [],
"total_unread_count": 0,
"total_unread_count_by_team": {},
"total_unread_threads_count": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_type | UnreadCountsChannelType[] | Yes | |
| channels | UnreadCountsChannel[] | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| threads | UnreadCountsThread[] | Yes | |
| total_unread_count | number | Yes | |
| total_unread_threads_count | number | Yes | |
| total_unread_count_by_team | Record<string, any> | No |