Appearance
Chat
About 18788 wordsAbout 63 min
Curl SDK - Chat API
Table of Contents
- QueryCampaigns
- GetCampaign
- StartCampaign
- StopCampaign
- QueryChannels
- ChannelBatchUpdate
- DeleteChannels
- MarkDelivered
- MarkChannelsRead
- GetOrCreateDistinctChannel
- UpdateChannel
- UpdateChannelPartial
- DeleteChannel
- GetDraft
- DeleteDraft
- SendEvent
- UploadChannelFile
- DeleteChannelFile
- HideChannel
- UploadChannelImage
- DeleteChannelImage
- UpdateMemberPartial
- SendMessage
- GetManyMessages
- GetOrCreateChannel
- MarkRead
- ShowChannel
- TruncateChannel
- MarkUnread
- ListChannelTypes
- CreateChannelType
- GetChannelType
- UpdateChannelType
- DeleteChannelType
- ListCommands
- CreateCommand
- GetCommand
- UpdateCommand
- DeleteCommand
- QueryDrafts
- ExportChannels
- QueryMembers
- QueryMessageHistory
- GetMessage
- UpdateMessage
- UpdateMessagePartial
- DeleteMessage
- RunMessageAction
- CommitMessage
- EphemeralMessageUpdate
- SendReaction
- DeleteReaction
- GetReactions
- QueryReactions
- TranslateMessage
- UndeleteMessage
- CastPollVote
- DeletePollVote
- CreateReminder
- UpdateReminder
- DeleteReminder
- GetReplies
- QueryMessageFlags
- MuteChannel
- UnmuteChannel
- QueryBannedUsers
- QueryFutureChannelBans
- QueryReminders
- GetRetentionPolicy
- SetRetentionPolicy
- DeleteRetentionPolicy
- GetRetentionPolicyRuns
- Search
- QuerySegments
- GetSegment
- DeleteSegment
- DeleteSegmentTargets
- SegmentTargetExists
- QuerySegmentTargets
- QueryTeamUsageStats
- QueryThreads
- GetThread
- UpdateThreadPartial
- UnreadCounts
- UnreadCountsBatch
- SendUserCustomEvent
- Types Reference
QueryCampaigns
Retrieve a list of campaigns based on specific criteria, helping you manage and analyze multiple marketing efforts simultaneously.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/campaigns/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/campaigns/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 and user_limit
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/campaigns/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"next": "example_value",
"user_limit": 1
}'Response: QueryCampaignsResponse
Parameters
Request Body:
filter(object)limit(int)next(string)prev(string)sort([]SortParamRequest)user_limit(int)
GetCampaign
Obtain detailed information about a specific campaign, allowing you to review its current status and settings.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/campaigns/example-id?next=&limit=10" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Example: with prev
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/campaigns/example-id?prev=" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetCampaignResponse
Parameters
Path Parameters:
id(string) (required)
Query Parameters:
prev(string)next(string)limit(int)
StartCampaign
Initiate or schedule a campaign to begin at a designated time, enabling you to automate your marketing and outreach activities.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/campaigns/example-id/start" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"scheduled_for": 1.0,
"stop_at": 1.0
}'Response: StartCampaignResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
scheduled_for(float)stop_at(float)
StopCampaign
Stop an ongoing campaign to prevent further messages from being sent, useful when campaign objectives have been achieved or if errors are detected.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/campaigns/example-id/stop" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: CampaignResponse
Parameters
Path Parameters:
id(string) (required)
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,
"user_id": "user-123"
}'Example: with sort and filter_conditions
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": {},
"sort": [{ "direction": 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 filter_values
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_values": {},
"predefined_filter": "example_value"
}'Response: QueryChannelsResponse
Parameters
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_conditionssort([]SortParamRequest): List of sort parameterssort_values(object)state(bool): Whether to update channel state or notuser(UserRequest)user_id(string)
ChannelBatchUpdate
Update multiple channels simultaneously to save time and ensure consistency across channel settings or configurations.
Example
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/channels/batch" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"operation": "example_value",
"data": { "auto_translation_enabled": true },
"members": ["user-123", "user-456"]
}'Response: ChannelBatchUpdateResponse
Parameters
Request Body:
data(ChannelDataUpdate)filter(object) (required)members([]ChannelBatchMemberRequest)operation(string) (required)
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
Query Parameters:
user_id(string)
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 '{
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Example: with read_by_channel
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 IDuser(UserRequest)user_id(string)
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 state and thread_unread_counts
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 '{
"state": true,
"thread_unread_counts": true
}'Example: with watchers
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 '{
"watchers": { "limit": 1 }
}'Response: ChannelStateResponse
Parameters
Path Parameters:
type(string) (required)
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)state(bool): Refresh channel statethread_unread_counts(bool)watchers(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 '{
"skip_push": true,
"user_id": "user-123"
}'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 ituser(UserRequest)user_id(string)
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 '{
"unset": ["value1", "value2"],
"user_id": "user-123"
}'Example: with user and set
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": {},
"user": { "id": "example-id", "custom": {} }
}'Response: UpdateChannelPartialResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
set(object)unset([]string)user(UserRequest)user_id(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)user_id(string)
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)user_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 '{
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Example: with clear_history
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 notuser(UserRequest)user_id(string)
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?user_id=user-123" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"unset": ["value1", "value2"]
}'Example: with set
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": {}
}'Response: UpdateMemberPartialResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Query Parameters:
user_id(string)
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" }] }] },
"keep_channel_hidden": true,
"skip_push": true
}'Example: with pending and pending_message_metadata
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" }] }] },
"pending": true,
"pending_message_metadata": {}
}'Example: with skip_enrich_url and force_moderation
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" }] }] },
"force_moderation": true,
"skip_enrich_url": "https://example.com"
}'Response: SendMessageResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
force_moderation(bool)keep_channel_hidden(bool)message(MessageRequest) (required)pending(bool)pending_message_metadata(object)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 state and thread_unread_counts
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 '{
"state": true,
"thread_unread_counts": true
}'Example: with watchers
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 '{
"watchers": { "limit": 1 }
}'Response: ChannelStateResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
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)state(bool): Refresh channel statethread_unread_counts(bool)watchers(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 '{
"thread_id": "example_value",
"user_id": "user-123"
}'Example: with user and message_id
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",
"user": { "id": "example-id", "custom": {} }
}'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 readuser(UserRequest)user_id(string)
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" \
-d '{
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Response: ShowChannelResponse
Parameters
Path Parameters:
type(string) (required)id(string) (required)
Request Body:
user(UserRequest)user_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,
"user_id": "user-123"
}'Example: with skip_push 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"],
"skip_push": true
}'Example: with truncated_at and user
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,
"user": { "id": "example-id", "custom": {} }
}'Example: with message
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 '{
"message": { "attachments": [{ "custom": {}, "actions": [{ "name": "Example Name", "text": "Hello, World!", "type": "messaging", "style": "example_value" }] }] }
}'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_atuser(UserRequest)user_id(string)
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_timestamp": 1.0,
"user_id": "user-123"
}'Example: with thread_id and user
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",
"user": { "id": "example-id", "custom": {} }
}'Example: with message_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 '{
"message_id": "message-789"
}'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 iduser(UserRequest)user_id(string)
ListChannelTypes
Retrieve a list of available channel types, each defining specific settings and behaviors. Use this to explore or select from different channel configurations for your communication needs.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/channeltypes" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: ListChannelTypesResponse
CreateChannelType
Define and create a new channel type with specific settings and behaviors to suit your application's requirements. Use this to customize how channels operate and interact based on your unique use case.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channeltypes" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"name": "Example Name",
"blocklist": "example_value",
"blocklist_behavior": "example_value"
}'Example: with blocklists and chat_preferences
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channeltypes" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"name": "Example Name",
"blocklists": [{ "behavior": "example_value", "blocklist": "example_value" }],
"chat_preferences": { "channel_mentions": "example_value" }
}'Example: with commands and connect_events
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channeltypes" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"name": "Example Name",
"commands": ["value1", "value2"],
"connect_events": true
}'Example: with count_messages and custom_events
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/channeltypes" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"name": "Example Name",
"count_messages": true,
"custom_events": {}
}'Response: CreateChannelTypeResponse
Parameters
Request Body:
automod(string) (required): Automod. One of: disabled, simple, AIautomod_behavior(string) (required): Automod behavior. One of: flag, blockblocklist(string): Blocklistblocklist_behavior(string): Blocklist behavior. One of: flag, block, shadow_blockblocklists([]BlockListOptions): Blocklistschat_preferences(ChatPreferences)commands([]string): List of commands that channel supportsconnect_events(bool): Connect eventscount_messages(bool): Count messages in channel.custom_events(bool): Custom eventsdelivery_events(bool)grants(object): List of grants for the channel typemark_messages_pending(bool): Mark messages pendingmax_message_length(int) (required): Max message lengthmessage_retention(string): Message retention. One of: infinite, numericmutes(bool): Mutesname(string) (required): Channel type namepartition_size(int): Partition sizepartition_ttl(string): Partition TTLpermissions([]PolicyRequest): List of permissions for the channel typepolls(bool): Pollspush_level(string): Default push notification level for the channel type. One of: all, all_mentions, mentions, direct_mentions, nonepush_notifications(bool): Push notificationsreactions(bool): Reactionsread_events(bool): Read eventsreplies(bool): Repliessearch(bool): Searchshared_locations(bool): Enables shared location messagesskip_last_msg_update_for_system_msgs(bool)typing_events(bool): Typing eventsuploads(bool): Uploadsurl_enrichment(bool): URL enrichmentuser_message_reminders(bool)
GetChannelType
Retrieve information about a specific channel type to understand its configuration and settings, useful for reviewing or managing channel functionalities.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/channeltypes/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetChannelTypeResponse
Parameters
Path Parameters:
name(string) (required)
UpdateChannelType
Modify the properties of an existing channel type to customize or enhance channel behavior according to specific requirements.
Example
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/channeltypes/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"allowed_flag_reasons": ["value1", "value2"],
"automod_thresholds": { "explicit": { "block": 1.0 } }
}'Example: with blocklist and blocklist_behavior
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/channeltypes/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"blocklist": "example_value",
"blocklist_behavior": "example_value"
}'Example: with blocklists and chat_preferences
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/channeltypes/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"blocklists": [{ "behavior": "example_value", "blocklist": "example_value" }],
"chat_preferences": { "channel_mentions": "example_value" }
}'Example: with commands and connect_events
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/channeltypes/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"automod": "example_value",
"automod_behavior": "example_value",
"max_message_length": 1,
"commands": ["value1", "value2"],
"connect_events": true
}'Response: UpdateChannelTypeResponse
Parameters
Path Parameters:
name(string) (required)
Request Body:
allowed_flag_reasons([]string)automod(string) (required)automod_behavior(string) (required)automod_thresholds(Thresholds)blocklist(string)blocklist_behavior(string)blocklists([]BlockListOptions)chat_preferences(ChatPreferences)commands([]string): List of commands that channel supportsconnect_events(bool)count_messages(bool)custom_events(bool)delivery_events(bool)grants(object)mark_messages_pending(bool)max_message_length(int) (required)mutes(bool)partition_size(int)partition_ttl(string)permissions([]PolicyRequest)polls(bool)push_level(string)push_notifications(bool)quotes(bool)reactions(bool)read_events(bool)reminders(bool)replies(bool)search(bool)shared_locations(bool)skip_last_msg_update_for_system_msgs(bool)typing_events(bool)uploads(bool)url_enrichment(bool)user_message_reminders(bool)
DeleteChannelType
Remove a channel type from your application to streamline channel categories or eliminate unused configurations.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/channeltypes/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
name(string) (required)
ListCommands
Obtain a list of all available commands, providing a quick reference to the commands that can be used within the chat environment.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/commands" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: ListCommandsResponse
CreateCommand
Create a new command to extend chat functionalities, enabling custom actions or automations based on user input.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/commands" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"description": "example_value",
"name": "Example Name",
"args": "example_value",
"set": "example_value"
}'Response: CreateCommandResponse
Parameters
Request Body:
args(string): Arguments help text, shown in commands auto-completiondescription(string) (required): Description, shown in commands auto-completionname(string) (required): Unique command nameset(string): Set name used for grouping commands
GetCommand
Access details about a specific command to review its configuration or ensure it performs as expected within the chat.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/commands/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetCommandResponse
Parameters
Path Parameters:
name(string) (required)
UpdateCommand
Alter the properties of an existing command to refine its behavior or adapt to changing requirements in the chat application.
Example
curl -X PUT "https://chat.stream-io-api.com/api/v2/chat/commands/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"description": "example_value",
"args": "example_value",
"set": "example_value"
}'Response: UpdateCommandResponse
Parameters
Path Parameters:
name(string) (required)
Request Body:
args(string): Arguments help text, shown in commands auto-completiondescription(string) (required): Description, shown in commands auto-completionset(string): Set name used for grouping commands
DeleteCommand
Eliminate a command from your chat environment to simplify command options or remove outdated functionalities.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/commands/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: DeleteCommandResponse
Parameters
Path Parameters:
name(string) (required)
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 '{
"limit": 1,
"user_id": "user-123"
}'Example: with filter and sort
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": {},
"sort": [{ "direction": 1 }]
}'Example: with next and user
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",
"user": { "id": "example-id", "custom": {} }
}'Example: with 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"
}'Response: QueryDraftsResponse
Parameters
Request Body:
filter(object): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parametersuser(UserRequest)user_id(string)
ExportChannels
Export channel data to preserve chat history, analyze communication patterns, or integrate with external systems for broader data use.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/export_channels" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channels": [{ "cid": "example_value" }],
"clear_deleted_message_text": true,
"export_users": ["user-123", "user-456"]
}'Example: with include_soft_deleted_channels and include_truncated_messages
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/export_channels" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channels": [{ "cid": "example_value" }],
"include_soft_deleted_channels": true,
"include_truncated_messages": true
}'Example: with version
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/export_channels" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"channels": [{ "cid": "example_value" }],
"version": "example_value"
}'Response: ExportChannelsResponse
Parameters
Request Body:
channels([]ChannelExport) (required): Export options for channelsclear_deleted_message_text(bool): Set if deleted message text should be clearedexport_users(bool)include_soft_deleted_channels(bool): Set if you want to include deleted channelsinclude_truncated_messages(bool): Set if you want to include truncated messagesversion(string): Export version
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()
QueryMessageHistory
Access past messages in a chat to review previous interactions, useful for catching up on conversations or retrieving historical data.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/history" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"limit": 1,
"sort": [{ "direction": 1 }]
}'Example: with prev and next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/history" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"next": "example_value",
"prev": "example_value"
}'Response: QueryMessageHistoryResponse
Parameters
Request Body:
filter(object) (required): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parameters
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)
Query Parameters:
show_deleted_message(bool)
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_push": true,
"user_id": "user-123"
}'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"]
}'Example: with user and skip_enrich_url
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",
"user": { "id": "example-id", "custom": {} }
}'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 unsetuser(UserRequest)user_id(string)
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": {},
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Response: MessageActionResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
form_data(object) (required): ReadOnlyData to execute command withuser(UserRequest)user_id(string)
CommitMessage
Finalize and save changes made to a message, ensuring that all updates are applied and visible to chat participants.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/commit" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: MessageActionResponse
Parameters
Path Parameters:
id(string) (required)
EphemeralMessageUpdate
Update an ephemeral message, which is temporary and may disappear after a set time, useful for time-sensitive or transient information.
Example
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/ephemeral" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"skip_push": true,
"user_id": "user-123"
}'Example: with set and unset
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/ephemeral" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"set": {},
"unset": ["value1", "value2"]
}'Example: with user and skip_enrich_url
curl -X PATCH "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/ephemeral" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"skip_enrich_url": "https://example.com",
"user": { "id": "example-id", "custom": {} }
}'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 unsetuser(UserRequest)user_id(string)
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 '{
"limit": 1,
"user_id": "user-123"
}'Example: with filter and sort
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": {},
"sort": [{ "direction": 1 }]
}'Example: with next and user
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",
"user": { "id": "example-id", "custom": {} }
}'Example: with 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"
}'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 parametersuser(UserRequest)user_id(string)
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
UndeleteMessage
Restores a previously deleted message, useful for recovering important information or correcting accidental deletions.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/messages/example-id/undelete" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"undeleted_by": "example_value"
}'Response: UndeleteMessageResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
undeleted_by(string) (required): ID of the user who is undeleting the message
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 '{
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Example: with vote
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:
user(UserRequest)user_id(string)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 '{
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Example: with remind_at
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)user(UserRequest)user_id(string)
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 '{
"user": { "id": "example-id", "custom": {} },
"user_id": "user-123"
}'Example: with remind_at
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)user(UserRequest)user_id(string)
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)
Query Parameters:
user_id(string)
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 '{
"expiration": 1,
"user_id": "user-123"
}'Example: with user and channel_cids
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"],
"user": { "id": "example-id", "custom": {} }
}'Response: MuteChannelResponse
Parameters
Request Body:
channel_cids([]string): Channel CIDs to mute (if multiple channels)expiration(int): Duration of mute in millisecondsuser(UserRequest)user_id(string)
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 '{
"expiration": 1,
"user_id": "user-123"
}'Example: with user and channel_cids
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"],
"user": { "id": "example-id", "custom": {} }
}'Response: UnmuteResponse
Parameters
Request Body:
channel_cids([]string): Channel CIDs to mute (if multiple channels)expiration(int): Duration of mute in millisecondsuser(UserRequest)user_id(string)
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 '{
"limit": 1,
"user_id": "user-123"
}'Example: with filter and sort
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": {},
"sort": [{ "direction": 1 }]
}'Example: with next and user
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",
"user": { "id": "example-id", "custom": {} }
}'Example: with 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"
}'Response: QueryRemindersResponse
Parameters
Request Body:
filter(object): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parametersuser(UserRequest)user_id(string)
GetRetentionPolicy
Retrieve the current data retention policy to understand how long data is stored and managed, ensuring compliance with organizational or regulatory requirements.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/retention_policy" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetRetentionPolicyResponse
SetRetentionPolicy
Define or modify the data retention policy to control how long data is retained, helping maintain data governance and compliance.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/retention_policy" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"max_age_hours": 1,
"policy": "example_value"
}'Response: SetRetentionPolicyResponse
Parameters
Request Body:
max_age_hours(int) (required)policy(string) (required)
DeleteRetentionPolicy
Remove an existing data retention policy when it is no longer needed, helping streamline data management practices.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/retention_policy/delete" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"policy": "example_value"
}'Response: DeleteRetentionPolicyResponse
Parameters
Request Body:
policy(string) (required)
GetRetentionPolicyRuns
Access historical records of retention policy executions to monitor compliance and review data management activities over time.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/retention_policy/runs" \
-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 prev
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/retention_policy/runs" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter_conditions": {},
"prev": "example_value"
}'Example: with next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/retention_policy/runs" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"next": "example_value"
}'Response: GetRetentionPolicyRunsResponse
Parameters
Request Body:
filter_conditions(object): Filter conditions 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()
QuerySegments
Retrieve a list of user segments based on specified criteria, useful for targeted communication and analysis.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/segments/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"limit": 1,
"sort": [{ "direction": 1 }]
}'Example: with prev and next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/segments/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"filter": {},
"next": "example_value",
"prev": "example_value"
}'Response: QuerySegmentsResponse
Parameters
Request Body:
filter(object) (required): Filter to apply to the querylimit(int)next(string)prev(string)sort([]SortParamRequest): Array of sort parameters
GetSegment
Obtain detailed information about a specific user segment, aiding in personalized engagement and insights.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/segments/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: GetSegmentResponse
Parameters
Path Parameters:
id(string) (required)
DeleteSegment
Remove a specific segment from your chat application, useful for managing and organizing user groups or data collections.
Example
curl -X DELETE "https://chat.stream-io-api.com/api/v2/chat/segments/example-id" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
id(string) (required)
DeleteSegmentTargets
Remove specified targets from a segment, helpful for updating or refining the members or elements within a segment.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/segments/example-id/deletetargets" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"target_ids": ["id-1", "id-2"]
}'Response: Response
Parameters
Path Parameters:
id(string) (required)
Request Body:
target_ids([]string) (required): Target IDs
SegmentTargetExists
Verify if a particular target is part of a segment, useful for ensuring data accuracy or confirming membership before performing operations.
Example
curl -X GET "https://chat.stream-io-api.com/api/v2/chat/segments/example-id/target/example_value" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt"Response: Response
Parameters
Path Parameters:
id(string) (required)target_id(string) (required)
QuerySegmentTargets
Retrieve a list of targets within a segment, ideal for gaining insights or performing actions on specific segment members.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/segments/example-id/targets/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"Sort": [{ "direction": 1 }],
"limit": 1
}'Example: with Filter and next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/segments/example-id/targets/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"Filter": {},
"next": "example_value"
}'Example: with prev
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/segments/example-id/targets/query" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"prev": "example_value"
}'Response: QuerySegmentTargetsResponse
Parameters
Path Parameters:
id(string) (required)
Request Body:
Filter(object)Sort([]SortParamRequest)limit(int): Limitnext(string): Nextprev(string): Prev
QueryTeamUsageStats
Obtain detailed statistics on team usage to evaluate engagement levels, optimize resource allocation, and improve team performance.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/stats/team_usage" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"end_date": "example_value",
"limit": 1
}'Example: with month and next
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/stats/team_usage" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"month": "example_value",
"next": "example_value"
}'Example: with start_date
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/stats/team_usage" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"start_date": "example_value"
}'Response: QueryTeamUsageStatsResponse
Parameters
Request Body:
end_date(string): End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown.limit(int): Maximum number of teams to return per page (default: 30, max: 30)month(string): Month in YYYY-MM format (e.g., '2026-01'). Mutually exclusive with start_date/end_date. Returns aggregated monthly values.next(string): Cursor for pagination to fetch next page of teamsstart_date(string): Start date in YYYY-MM-DD format. Used with end_date for custom date range. Returns daily breakdown.
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 '{
"limit": 1,
"user_id": "user-123"
}'Example: with filter and sort
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": {},
"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
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 parametersuser(UserRequest)user_id(string)
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?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:
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 '{
"unset": ["value1", "value2"],
"user_id": "user-123"
}'Example: with user and set
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": {},
"user": { "id": "example-id", "custom": {} }
}'Response: UpdateThreadPartialResponse
Parameters
Path Parameters:
message_id(string) (required)
Request Body:
set(object): Sets new field valuesunset([]string): Array of field names to unsetuser(UserRequest)user_id(string)
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
Parameters
Query Parameters:
user_id(string)
UnreadCountsBatch
Obtain unread message counts for multiple chat threads simultaneously, providing a comprehensive overview of pending messages.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/unread_batch" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"user_ids": ["user-123", "user-456"]
}'Response: UnreadCountsBatchResponse
Parameters
Request Body:
user_ids([]string) (required)
SendUserCustomEvent
Trigger a custom event associated with a user, useful for tracking user interactions or implementing personalized features.
Example
curl -X POST "https://chat.stream-io-api.com/api/v2/chat/users/user-123/event" \
-H "Authorization: Bearer $STREAM_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"event": { "type": "messaging", "custom": {} }
}'Response: Response
Parameters
Path Parameters:
user_id(string) (required)
Request Body:
event(UserCustomEventRequest) (required)
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 |
BlockListOptions
// BlockListOptions
{
"behavior": "flag",
"blocklist": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| behavior | 'flag' | 'block' | 'shadow_block' |
| blocklist | string | Yes | Blocklist name |
CampaignChannelTemplate
// CampaignChannelTemplate
{
"custom": {},
"id": "string",
"members": [],
"members_template": [],
"team": "string",
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| type | string | Yes | |
| id | string | No | |
| members | string[] | No | |
| members_template | CampaignChannelMember[] | No | |
| team | string | No |
CampaignMessageTemplate
// CampaignMessageTemplate
{
"attachments": [],
"custom": {},
"poll_id": "string",
"searchable": false,
"text": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | Yes | |
| custom | Record<string, any> | Yes | |
| poll_id | string | Yes | |
| searchable | boolean | Yes | |
| text | string | Yes |
CampaignResponse
// CampaignResponse
{
"channel_template": CampaignChannelTemplate,
"create_channels": false,
"created_at": 0,
"description": "string",
"id": "string",
"message_template": CampaignMessageTemplate,
"name": "string",
"scheduled_for": 0,
"segment_ids": [],
"segments": [],
"sender": UserResponse,
"sender_id": "string",
"sender_mode": "string",
"sender_visibility": "string",
"show_channels": false,
"skip_push": false,
"skip_webhook": false,
"stats": CampaignStatsResponse,
"status": "string",
"stop_at": 0,
"updated_at": 0,
"user_ids": [],
"users": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| create_channels | boolean | Yes | |
| created_at | number | Yes | |
| description | string | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| segment_ids | string[] | Yes | |
| segments | Segment[] | Yes | |
| sender_id | string | Yes | |
| sender_mode | string | Yes | |
| sender_visibility | string | Yes | |
| show_channels | boolean | Yes | |
| skip_push | boolean | Yes | |
| skip_webhook | boolean | Yes | |
| stats | CampaignStatsResponse | Yes | |
| status | string | Yes | |
| updated_at | number | Yes | |
| user_ids | string[] | Yes | |
| users | UserResponse[] | Yes | |
| channel_template | CampaignChannelTemplate | No | |
| message_template | CampaignMessageTemplate | No | |
| scheduled_for | number | No | |
| sender | UserResponse | No | |
| stop_at | number | No |
CampaignStatsResponse
// CampaignStatsResponse
{
"progress": 0,
"stats_channels_created": 0,
"stats_completed_at": 0,
"stats_messages_sent": 0,
"stats_started_at": 0,
"stats_users_read": 0,
"stats_users_sent": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| progress | number | Yes | |
| stats_channels_created | number | Yes | |
| stats_completed_at | number | Yes | |
| stats_messages_sent | number | Yes | |
| stats_started_at | number | Yes | |
| stats_users_read | number | Yes | |
| stats_users_sent | number | Yes |
ChannelBatchMemberRequest
// ChannelBatchMemberRequest
{
"channel_role": "string",
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | |
| channel_role | string | No |
ChannelBatchUpdateResponse
Basic response information
// ChannelBatchUpdateResponse
{
"duration": "string",
"task_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | No |
ChannelConfig
// ChannelConfig
{
"allowed_flag_reasons": [],
"automod": "disabled",
"automod_behavior": "flag",
"automod_thresholds": Thresholds,
"blocklist": "string",
"blocklist_behavior": "flag",
"blocklists": [],
"chat_preferences": ChatPreferences,
"commands": [],
"connect_events": false,
"count_messages": false,
"created_at": 0,
"custom_events": false,
"delivery_events": false,
"mark_messages_pending": false,
"max_message_length": 0,
"mutes": false,
"name": "string",
"partition_size": 0,
"partition_ttl": "string",
"polls": false,
"push_level": "all",
"push_notifications": false,
"quotes": false,
"reactions": false,
"read_events": false,
"reminders": false,
"replies": false,
"search": false,
"shared_locations": false,
"skip_last_msg_update_for_system_msgs": false,
"typing_events": false,
"updated_at": 0,
"uploads": false,
"url_enrichment": false,
"user_message_reminders": false
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | 'disabled' | 'simple' | 'AI' |
| automod_behavior | 'flag' | 'block' | 'shadow_block' |
| commands | string[] | Yes | List of commands that channel supports |
| connect_events | boolean | Yes | |
| count_messages | boolean | Yes | |
| created_at | number | Yes | |
| custom_events | boolean | Yes | |
| delivery_events | boolean | Yes | |
| mark_messages_pending | boolean | Yes | |
| max_message_length | number | Yes | |
| mutes | boolean | Yes | |
| name | string | Yes | |
| polls | boolean | Yes | |
| push_notifications | boolean | Yes | |
| quotes | boolean | Yes | |
| reactions | boolean | Yes | |
| read_events | boolean | Yes | |
| reminders | boolean | Yes | |
| replies | boolean | Yes | |
| search | boolean | Yes | |
| shared_locations | boolean | Yes | |
| skip_last_msg_update_for_system_msgs | boolean | Yes | |
| typing_events | boolean | Yes | |
| updated_at | number | Yes | |
| uploads | boolean | Yes | |
| url_enrichment | boolean | Yes | |
| user_message_reminders | boolean | Yes | |
| allowed_flag_reasons | string[] | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | 'shadow_block' |
| blocklists | BlockListOptions[] | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | number | No | |
| partition_ttl | string | No | |
| push_level | 'all' | 'all_mentions' | 'mentions' |
ChannelDataUpdate
// ChannelDataUpdate
{
"auto_translation_enabled": false,
"auto_translation_language": "string",
"config_overrides": ChannelConfig,
"custom": {},
"disabled": false,
"frozen": false,
"team": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | boolean | No | |
| auto_translation_language | string | No | |
| config_overrides | ChannelConfig | No | |
| custom | Record<string, any> | No | |
| disabled | boolean | No | |
| frozen | boolean | No | |
| team | string | No |
ChannelExport
// ChannelExport
{
"cid": "string",
"id": "string",
"messages_since": 0,
"messages_until": 0,
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | No | |
| id | string | No | Channel ID |
| messages_since | number | No | Date to export messages since |
| messages_until | number | No | Date to export messages until |
| type | string | No | Channel type |
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 |
ChatPreferences
// ChatPreferences
{
"channel_mentions": "string",
"default_preference": "string",
"direct_mentions": "string",
"distinct_channel_messages": "string",
"group_mentions": "string",
"here_mentions": "string",
"role_mentions": "string",
"thread_replies": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_mentions | string | No | |
| default_preference | string | No | |
| direct_mentions | string | No | |
| distinct_channel_messages | string | No | |
| group_mentions | string | No | |
| here_mentions | string | No | |
| role_mentions | string | No | |
| thread_replies | string | No |
Command
Represents custom chat command
// Command
{
"args": "string",
"created_at": 0,
"description": "string",
"name": "string",
"set": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| args | string | Yes | Arguments help text, shown in commands auto-completion |
| description | string | Yes | Description, shown in commands auto-completion |
| name | string | Yes | Unique command name |
| set | string | Yes | Set name used for grouping commands |
| created_at | number | No | Date/time of creation |
| updated_at | number | No | Date/time of the last update |
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 |
CreateChannelTypeResponse
// CreateChannelTypeResponse
{
"allowed_flag_reasons": [],
"automod": "disabled",
"automod_behavior": "flag",
"automod_thresholds": Thresholds,
"blocklist": "string",
"blocklist_behavior": "flag",
"blocklists": [],
"chat_preferences": ChatPreferences,
"commands": [],
"connect_events": false,
"count_messages": false,
"created_at": 0,
"custom_events": false,
"delivery_events": false,
"duration": "string",
"grants": {},
"mark_messages_pending": false,
"max_message_length": 0,
"mutes": false,
"name": "string",
"partition_size": 0,
"partition_ttl": "string",
"permissions": [],
"polls": false,
"push_level": "all",
"push_notifications": false,
"quotes": false,
"reactions": false,
"read_events": false,
"reminders": false,
"replies": false,
"search": false,
"shared_locations": false,
"skip_last_msg_update_for_system_msgs": false,
"typing_events": false,
"updated_at": 0,
"uploads": false,
"url_enrichment": false,
"user_message_reminders": false
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | 'disabled' | 'simple' | 'AI' |
| automod_behavior | 'flag' | 'block' | 'shadow_block' |
| commands | string[] | Yes | |
| connect_events | boolean | Yes | |
| count_messages | boolean | Yes | |
| created_at | number | Yes | |
| custom_events | boolean | Yes | |
| delivery_events | boolean | Yes | |
| duration | string | Yes | |
| grants | Record<string, any> | Yes | |
| mark_messages_pending | boolean | Yes | |
| max_message_length | number | Yes | |
| mutes | boolean | Yes | |
| name | string | Yes | |
| permissions | PolicyRequest[] | Yes | |
| polls | boolean | Yes | |
| push_notifications | boolean | Yes | |
| quotes | boolean | Yes | |
| reactions | boolean | Yes | |
| read_events | boolean | Yes | |
| reminders | boolean | Yes | |
| replies | boolean | Yes | |
| search | boolean | Yes | |
| shared_locations | boolean | Yes | |
| skip_last_msg_update_for_system_msgs | boolean | Yes | |
| typing_events | boolean | Yes | |
| updated_at | number | Yes | |
| uploads | boolean | Yes | |
| url_enrichment | boolean | Yes | |
| user_message_reminders | boolean | Yes | |
| allowed_flag_reasons | string[] | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | 'shadow_block' |
| blocklists | BlockListOptions[] | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | number | No | |
| partition_ttl | string | No | |
| push_level | 'all' | 'all_mentions' | 'mentions' |
CreateCommandResponse
// CreateCommandResponse
{
"command": Command,
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| command | Command | No | Command object |
CustomEvent
// CustomEvent
{
"created_at": 0,
"custom": {},
"received_at": 0,
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| type | string | Yes | |
| received_at | number | No |
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 |
DeleteCommandResponse
// DeleteCommandResponse
{
"duration": "string",
"name": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| name | string | Yes | Command name |
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 |
DeleteRetentionPolicyResponse
Basic response information
// DeleteRetentionPolicyResponse
{
"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",
"user": UserRequest,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| custom | Record<string, any> | No | |
| parent_id | string | No | |
| user | UserRequest | No | |
| user_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 |
ExportChannelsResponse
// ExportChannelsResponse
{
"duration": "string",
"task_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes | ID of the task to export channels |
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 |
GetCampaignResponse
Basic response information
// GetCampaignResponse
{
"campaign": CampaignResponse,
"duration": "string",
"users": PagerResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| campaign | CampaignResponse | No | |
| users | PagerResponse | No |
GetChannelTypeResponse
Basic response information
// GetChannelTypeResponse
{
"allowed_flag_reasons": [],
"automod": "disabled",
"automod_behavior": "flag",
"automod_thresholds": Thresholds,
"blocklist": "string",
"blocklist_behavior": "flag",
"blocklists": [],
"chat_preferences": ChatPreferences,
"commands": [],
"connect_events": false,
"count_messages": false,
"created_at": 0,
"custom_events": false,
"delivery_events": false,
"duration": "string",
"grants": {},
"mark_messages_pending": false,
"max_message_length": 0,
"mutes": false,
"name": "string",
"partition_size": 0,
"partition_ttl": "string",
"permissions": [],
"polls": false,
"push_level": "all",
"push_notifications": false,
"quotes": false,
"reactions": false,
"read_events": false,
"reminders": false,
"replies": false,
"search": false,
"shared_locations": false,
"skip_last_msg_update_for_system_msgs": false,
"typing_events": false,
"updated_at": 0,
"uploads": false,
"url_enrichment": false,
"user_message_reminders": false
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | 'disabled' | 'simple' | 'AI' |
| automod_behavior | 'flag' | 'block' | 'shadow_block' |
| commands | Command[] | Yes | |
| connect_events | boolean | Yes | |
| count_messages | boolean | Yes | |
| created_at | number | Yes | |
| custom_events | boolean | Yes | |
| delivery_events | boolean | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| grants | Record<string, any> | Yes | |
| mark_messages_pending | boolean | Yes | |
| max_message_length | number | Yes | |
| mutes | boolean | Yes | |
| name | string | Yes | |
| permissions | PolicyRequest[] | Yes | |
| polls | boolean | Yes | |
| push_notifications | boolean | Yes | |
| quotes | boolean | Yes | |
| reactions | boolean | Yes | |
| read_events | boolean | Yes | |
| reminders | boolean | Yes | |
| replies | boolean | Yes | |
| search | boolean | Yes | |
| shared_locations | boolean | Yes | |
| skip_last_msg_update_for_system_msgs | boolean | Yes | |
| typing_events | boolean | Yes | |
| updated_at | number | Yes | |
| uploads | boolean | Yes | |
| url_enrichment | boolean | Yes | |
| user_message_reminders | boolean | Yes | |
| allowed_flag_reasons | string[] | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | 'shadow_block' |
| blocklists | BlockListOptions[] | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | number | No | |
| partition_ttl | string | No | |
| push_level | 'all' | 'all_mentions' | 'mentions' |
GetCommandResponse
// GetCommandResponse
{
"args": "string",
"created_at": 0,
"description": "string",
"duration": "string",
"name": "string",
"set": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| args | string | Yes | |
| description | string | Yes | |
| duration | string | Yes | |
| name | string | Yes | |
| set | string | Yes | |
| created_at | number | No | |
| updated_at | number | 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 |
GetRetentionPolicyResponse
Basic response information
// GetRetentionPolicyResponse
{
"duration": "string",
"policies": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| policies | RetentionPolicy[] | Yes |
GetRetentionPolicyRunsResponse
Basic response information
// GetRetentionPolicyRunsResponse
{
"duration": "string",
"next": "string",
"prev": "string",
"runs": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| runs | RetentionRunResponse[] | Yes | |
| next | string | No | |
| prev | string | No |
GetSegmentResponse
// GetSegmentResponse
{
"duration": "string",
"segment": SegmentResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| segment | SegmentResponse | No | Segment |
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 |
LabelThresholds
// LabelThresholds
{
"block": 0,
"flag": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| block | number | No | Threshold for automatic message block |
| flag | number | No | Threshold for automatic message flag |
ListChannelTypesResponse
// ListChannelTypesResponse
{
"channel_types": {},
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_types | Record<string, any> | Yes | Object with all channel types |
| duration | string | Yes |
ListCommandsResponse
// ListCommandsResponse
{
"commands": [],
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| commands | Command[] | Yes | List of commands |
| duration | string | Yes |
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 |
MessageHistoryEntryResponse
// MessageHistoryEntryResponse
{
"Custom": {},
"attachments": [],
"is_deleted": false,
"message_id": "string",
"message_updated_at": 0,
"message_updated_by_id": "string",
"text": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Custom | Record<string, any> | Yes | |
| attachments | Attachment[] | Yes | |
| is_deleted | boolean | Yes | |
| message_id | string | Yes | |
| message_updated_at | number | Yes | |
| message_updated_by_id | string | Yes | |
| text | string | Yes |
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": {},
"html": "string",
"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": "''",
"user": UserRequest,
"user_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | No | Array of message attachments |
| custom | Record<string, any> | No | |
| html | string | No | Contains HTML markup of the message. Can only be set when using server-side API |
| 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' |
| user | UserRequest | No | |
| user_id | string | No |
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 |
PagerResponse
// PagerResponse
{
"next": "string",
"prev": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | string | No | |
| prev | string | 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 |
Policy
// Policy
{
"action": 0,
"created_at": 0,
"name": "string",
"owner": false,
"priority": 0,
"resources": [],
"roles": [],
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | number | Yes | |
| created_at | number | Yes | |
| name | string | Yes | |
| owner | boolean | Yes | |
| priority | number | Yes | |
| resources | string[] | Yes | |
| roles | string[] | Yes | |
| updated_at | number | Yes |
PolicyRequest
Policy request
// PolicyRequest
{
"action": "Deny",
"name": "string",
"owner": false,
"priority": 0,
"resources": [],
"roles": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'Deny' | 'Allow' | Yes |
| name | string | Yes | User-friendly policy name |
| owner | boolean | Yes | Whether policy applies to resource owner or not |
| priority | number | Yes | Policy priority |
| resources | string[] | Yes | List of resources to apply policy to |
| roles | string[] | Yes | List of roles to apply policy to |
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 |
PrivacySettingsResponse
// PrivacySettingsResponse
{
"delivery_receipts": DeliveryReceiptsResponse,
"read_receipts": ReadReceiptsResponse,
"typing_indicators": TypingIndicatorsResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | 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 |
QueryCampaignsResponse
Basic response information
// QueryCampaignsResponse
{
"campaigns": [],
"duration": "string",
"next": "string",
"prev": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| campaigns | CampaignResponse[] | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| next | string | No | |
| prev | string | No |
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 |
QueryMessageHistoryResponse
// QueryMessageHistoryResponse
{
"duration": "string",
"message_history": [],
"next": "string",
"prev": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message_history | MessageHistoryEntryResponse[] | Yes | Message history entries |
| next | string | No | |
| prev | string | No |
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 |
QuerySegmentTargetsResponse
// QuerySegmentTargetsResponse
{
"duration": "string",
"next": "string",
"prev": "string",
"targets": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| targets | SegmentTargetResponse[] | Yes | Targets |
| next | string | No | |
| prev | string | No |
QuerySegmentsResponse
// QuerySegmentsResponse
{
"duration": "string",
"next": "string",
"prev": "string",
"segments": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| segments | SegmentResponse[] | Yes | Segments |
| next | string | No | |
| prev | string | No |
QueryTeamUsageStatsResponse
Response containing team-level usage statistics
// QueryTeamUsageStatsResponse
{
"duration": "string",
"next": "string",
"teams": []
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| teams | TeamUsageStats[] | Yes | Array of team usage statistics |
| next | string | No | Cursor for pagination to fetch next page |
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,
"user": UserRequest,
"user_id": "string"
}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 |
| user | UserRequest | No | |
| user_id | string | No |
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 |
RetentionPolicy
// RetentionPolicy
{
"app_pk": 0,
"config": PolicyConfig,
"enabled_at": 0,
"policy": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | number | Yes | |
| config | PolicyConfig | Yes | |
| enabled_at | number | Yes | |
| policy | string | Yes |
RetentionRunResponse
// RetentionRunResponse
{
"app_pk": 0,
"date": "string",
"policy": "string",
"stats": RunStats
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | number | Yes | |
| date | string | Yes | |
| policy | string | Yes | |
| stats | RunStats | Yes |
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 |
Segment
// Segment
{
"all_sender_channels": false,
"all_users": false,
"created_at": 0,
"deleted_at": 0,
"description": "string",
"filter": {},
"id": "string",
"name": "string",
"size": 0,
"task_id": "string",
"type": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | boolean | Yes | |
| all_users | boolean | Yes | |
| created_at | number | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| size | number | Yes | |
| type | string | Yes | |
| updated_at | number | Yes | |
| deleted_at | number | No | |
| description | string | No | |
| filter | Record<string, any> | No | |
| task_id | string | No |
SegmentResponse
// SegmentResponse
{
"all_sender_channels": false,
"all_users": false,
"created_at": 0,
"deleted_at": 0,
"description": "string",
"filter": {},
"id": "string",
"name": "string",
"size": 0,
"type": "string",
"updated_at": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | boolean | Yes | |
| all_users | boolean | Yes | |
| created_at | number | Yes | |
| deleted_at | number | Yes | |
| description | string | Yes | |
| filter | Record<string, any> | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| size | number | Yes | |
| type | string | Yes | |
| updated_at | number | Yes |
SegmentTargetResponse
// SegmentTargetResponse
{
"app_pk": 0,
"created_at": 0,
"segment_id": "string",
"target_id": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | number | Yes | |
| created_at | number | Yes | |
| segment_id | string | Yes | |
| target_id | string | Yes |
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 |
SetRetentionPolicyResponse
Basic response information
// SetRetentionPolicyResponse
{
"duration": "string",
"policy": RetentionPolicy
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| policy | RetentionPolicy | 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)... |
StartCampaignResponse
Basic response information
// StartCampaignResponse
{
"campaign": CampaignResponse,
"duration": "string",
"users": PagerResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| campaign | CampaignResponse | No | |
| users | PagerResponse | No |
TeamUsageStats
Usage statistics for a single team containing all 16 metrics
// TeamUsageStats
{
"concurrent_connections": MetricStats,
"concurrent_users": MetricStats,
"image_moderations_daily": MetricStats,
"messages_daily": MetricStats,
"messages_last_24_hours": MetricStats,
"messages_last_30_days": MetricStats,
"messages_month_to_date": MetricStats,
"messages_total": MetricStats,
"team": "string",
"translations_daily": MetricStats,
"users_daily": MetricStats,
"users_engaged_last_30_days": MetricStats,
"users_engaged_month_to_date": MetricStats,
"users_last_24_hours": MetricStats,
"users_last_30_days": MetricStats,
"users_month_to_date": MetricStats,
"users_total": MetricStats
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| concurrent_connections | MetricStats | Yes | Peak concurrent connections (total = MAX) |
| concurrent_users | MetricStats | Yes | Peak concurrent users (total = MAX) |
| image_moderations_daily | MetricStats | Yes | Daily image moderations (total = SUM) |
| messages_daily | MetricStats | Yes | Daily messages sent (total = SUM) |
| messages_last_24_hours | MetricStats | Yes | Messages in last 24 hours (total = LATEST) |
| messages_last_30_days | MetricStats | Yes | Messages in last 30 days (total = LATEST) |
| messages_month_to_date | MetricStats | Yes | Messages this month (total = LATEST) |
| messages_total | MetricStats | Yes | Total messages (total = LATEST) |
| team | string | Yes | Team identifier (empty string for users not assigned to any team) |
| translations_daily | MetricStats | Yes | Daily translations (total = SUM) |
| users_daily | MetricStats | Yes | Daily active users (total = SUM) |
| users_engaged_last_30_days | MetricStats | Yes | Engaged MAU (total = LATEST) |
| users_engaged_month_to_date | MetricStats | Yes | Engaged users this month (total = LATEST) |
| users_last_24_hours | MetricStats | Yes | Users active in last 24 hours (total = LATEST) |
| users_last_30_days | MetricStats | Yes | MAU - users active in last 30 days (total = LATEST) |
| users_month_to_date | MetricStats | Yes | Users active this month (total = LATEST) |
| users_total | MetricStats | Yes | Total users (total = LATEST) |
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 |
Thresholds
Sets thresholds for AI moderation
// Thresholds
{
"explicit": LabelThresholds,
"spam": LabelThresholds,
"toxic": LabelThresholds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| explicit | LabelThresholds | No | Thresholds for explicit messages |
| spam | LabelThresholds | No | Thresholds for spam |
| toxic | LabelThresholds | No | Thresholds for toxic messages |
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 |
UndeleteMessageResponse
Basic response information
// UndeleteMessageResponse
{
"duration": "string",
"message": MessageResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes |
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 |
UnreadCountsBatchResponse
Basic response information
// UnreadCountsBatchResponse
{
"counts_by_user": {},
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| counts_by_user | Record<string, any> | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
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 |
UpdateChannelTypeResponse
// UpdateChannelTypeResponse
{
"allowed_flag_reasons": [],
"automod": "disabled",
"automod_behavior": "flag",
"automod_thresholds": Thresholds,
"blocklist": "string",
"blocklist_behavior": "flag",
"blocklists": [],
"chat_preferences": ChatPreferences,
"commands": [],
"connect_events": false,
"count_messages": false,
"created_at": 0,
"custom_events": false,
"delivery_events": false,
"duration": "string",
"grants": {},
"mark_messages_pending": false,
"max_message_length": 0,
"mutes": false,
"name": "string",
"partition_size": 0,
"partition_ttl": "string",
"permissions": [],
"polls": false,
"push_level": "all",
"push_notifications": false,
"quotes": false,
"reactions": false,
"read_events": false,
"reminders": false,
"replies": false,
"search": false,
"shared_locations": false,
"skip_last_msg_update_for_system_msgs": false,
"typing_events": false,
"updated_at": 0,
"uploads": false,
"url_enrichment": false,
"user_message_reminders": false
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | 'disabled' | 'simple' | 'AI' |
| automod_behavior | 'flag' | 'block' | 'shadow_block' |
| commands | string[] | Yes | |
| connect_events | boolean | Yes | |
| count_messages | boolean | Yes | |
| created_at | number | Yes | |
| custom_events | boolean | Yes | |
| delivery_events | boolean | Yes | |
| duration | string | Yes | |
| grants | Record<string, any> | Yes | |
| mark_messages_pending | boolean | Yes | |
| max_message_length | number | Yes | |
| mutes | boolean | Yes | |
| name | string | Yes | |
| permissions | PolicyRequest[] | Yes | |
| polls | boolean | Yes | |
| push_notifications | boolean | Yes | |
| quotes | boolean | Yes | |
| reactions | boolean | Yes | |
| read_events | boolean | Yes | |
| reminders | boolean | Yes | |
| replies | boolean | Yes | |
| search | boolean | Yes | |
| shared_locations | boolean | Yes | |
| skip_last_msg_update_for_system_msgs | boolean | Yes | |
| typing_events | boolean | Yes | |
| updated_at | number | Yes | |
| uploads | boolean | Yes | |
| url_enrichment | boolean | Yes | |
| user_message_reminders | boolean | Yes | |
| allowed_flag_reasons | string[] | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | 'shadow_block' |
| blocklists | BlockListOptions[] | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | number | No | |
| partition_ttl | string | No | |
| push_level | 'all' | 'all_mentions' | 'mentions' |
UpdateCommandResponse
// UpdateCommandResponse
{
"command": Command,
"duration": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| command | Command | No | Command object |
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 |
UserCustomEventRequest
// UserCustomEventRequest
{
"custom": {},
"type": "string"
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| custom | Record<string, any> | No |
UserRequest
User request object
// UserRequest
{
"custom": {},
"id": "string",
"image": "string",
"invisible": false,
"language": "string",
"name": "string",
"privacy_settings": PrivacySettingsResponse,
"role": "string",
"teams": [],
"teams_role": {}
}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 | |
| role | string | No | User's global role |
| teams | string[] | No | List of teams the user belongs to |
| teams_role | Record<string, any> | No | Map of team-specific roles for the user |
UserResponse
User response object
// UserResponse
{
"avg_response_time": 0,
"ban_expires": 0,
"banned": false,
"blocked_user_ids": [],
"bypass_moderation": false,
"created_at": 0,
"custom": {},
"deactivated_at": 0,
"deleted_at": 0,
"devices": [],
"id": "string",
"image": "string",
"invisible": false,
"language": "string",
"last_active": 0,
"name": "string",
"online": false,
"privacy_settings": PrivacySettingsResponse,
"push_notifications": PushNotificationSettingsResponse,
"revoke_tokens_issued_before": 0,
"role": "string",
"shadow_banned": false,
"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 |
| invisible | boolean | Yes | |
| 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 |
| shadow_banned | boolean | Yes | Whether a user is shadow banned |
| 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 | |
| ban_expires | number | No | Date when ban expires |
| bypass_moderation | boolean | No | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| devices | DeviceResponse[] | No | List of devices user is using |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| 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
Represents an BaseEvent that happened in Stream Chat
// WSEvent
{
"automoderation": false,
"automoderation_scores": ModerationResponse,
"channel": ChannelResponse,
"channel_id": "string",
"channel_last_message_at": 0,
"channel_type": "string",
"cid": "string",
"connection_id": "string",
"created_at": 0,
"created_by": UserResponse,
"custom": {},
"me": OwnUserResponse,
"member": ChannelMemberResponse,
"message": MessageResponse,
"message_update": MessageUpdate,
"parent_id": "string",
"poll": PollResponseData,
"poll_vote": PollVoteResponseData,
"reaction": ReactionResponse,
"reason": "string",
"team": "string",
"thread": ThreadResponse,
"thread_id": "string",
"type": "string",
"user": UserResponse,
"user_id": "string",
"watcher_count": 0
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| type | string | Yes | |
| automoderation | boolean | No | |
| automoderation_scores | ModerationResponse | No | |
| channel | ChannelResponse | No | |
| channel_id | string | No | |
| channel_last_message_at | number | No | |
| channel_type | string | No | |
| cid | string | No | |
| connection_id | string | No | |
| created_by | UserResponse | No | |
| me | OwnUserResponse | No | |
| member | ChannelMemberResponse | No | |
| message | MessageResponse | No | |
| message_update | MessageUpdate | No | |
| parent_id | string | No | |
| poll | PollResponseData | No | |
| poll_vote | PollVoteResponseData | No | |
| reaction | ReactionResponse | No | |
| reason | string | No | |
| team | string | No | |
| thread | ThreadResponse | No | |
| thread_id | string | No | |
| user | UserResponse | No | |
| user_id | string | No | |
| watcher_count | number | No |
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 |