Appearance
Chat
About 24128 wordsAbout 80 min
Java 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query campaigns
var response = chatClient.queryCampaigns(
new QueryCampaignsRequest()
.setLimit(25)
.setFilter(Map.of())
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with prev and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query campaigns
var response = chatClient.queryCampaigns(
new QueryCampaignsRequest()
.setPrev(null)
.setNext(null)
).execute();
System.out.println(response);
}
}Example: with user_limit
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query campaigns
var response = chatClient.queryCampaigns(
new QueryCampaignsRequest()
.setUserLimit(10)
).execute();
System.out.println(response);
}
}Response: QueryCampaignsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | No | - |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | - |
| user_limit | Integer | No | - |
getCampaign
Obtain detailed information about a specific campaign, allowing you to review its current status and settings.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get campaign
var response = chatClient.getCampaign(
"activity-123",
new GetCampaignRequest()
.setLimit(25)
.setNext(null)
).execute();
System.out.println(response);
}
}Example: with prev
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get campaign
var response = chatClient.getCampaign(
"activity-123",
new GetCampaignRequest()
.setPrev(null)
).execute();
System.out.println(response);
}
}Response: GetCampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| prev | String | No | - |
| next | String | No | - |
| limit | Integer | No | - |
startCampaign
Initiate or schedule a campaign to begin at a designated time, enabling you to automate your marketing and outreach activities.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Start/schedule campaign
var response = chatClient.startCampaign(
"activity-123",
new StartCampaignRequest()
.setScheduledFor(10)
.setStopAt(10)
).execute();
System.out.println(response);
}
}Response: StartCampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| scheduled_for | float | No | - |
| stop_at | float | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Stop campaign
var response = chatClient.stopCampaign(
"activity-123"
).execute();
System.out.println(response);
}
}Response: CampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
queryChannels
Access a list of communication channels available in your account, facilitating efficient management and selection for your campaigns.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query channels
var response = chatClient.queryChannels(
new QueryChannelsRequest()
.setUserID("john")
.setLimit(25)
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with filter_conditions and message_limit
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query channels
var response = chatClient.queryChannels(
new QueryChannelsRequest()
.setFilterConditions(Map.of())
.setMessageLimit(10)
).execute();
System.out.println(response);
}
}Example: with offset and predefined_filter
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query channels
var response = chatClient.queryChannels(
new QueryChannelsRequest()
.setOffset(0)
.setPredefinedFilter("value")
).execute();
System.out.println(response);
}
}Example: with filter_values and sort_values
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query channels
var response = chatClient.queryChannels(
new QueryChannelsRequest()
.setFilterValues(Map.of())
.setSortValues(Map.of())
).execute();
System.out.println(response);
}
}Response: QueryChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter_conditions | Map<String, Object> | No | Filter conditions to apply to the query |
| filter_values | Map<String, Object> | No | Values to interpolate into the predefined filter template |
| limit | Integer | No | Number of channels to limit |
| member_limit | Integer | No | Number of members to limit |
| message_limit | Integer | No | Number of messages to limit |
| offset | Integer | No | Channel pagination offset |
| predefined_filter | String | No | ID of a predefined filter to use instead of filter_conditions |
| sort | []SortParamRequest | No | List of sort parameters |
| sort_values | Map<String, Object> | No | - |
| state | Boolean | No | Whether to update channel state or not |
| user | UserRequest | No | - |
| user_id | String | No | - |
channelBatchUpdate
Update multiple channels simultaneously to save time and ensure consistency across channel settings or configurations.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channels in batch
var response = chatClient.channelBatchUpdate(
new ChannelBatchUpdateRequest()
.setFilter(Map.of())
.setOperation("add")
.setData(new ChannelDataUpdate().setAutoTranslationEnabled(false))
.setMembers(List.of())
).execute();
System.out.println(response);
}
}Response: ChannelBatchUpdateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | Yes | - |
| operation | String | Yes | - |
| data | ChannelDataUpdate | No | - |
| members | []ChannelBatchMemberRequest | No | - |
deleteChannels
Asynchronously remove specific channels from your account, helping you maintain an organized and relevant channel list without immediate blocking.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Deletes channels asynchronously
var response = chatClient.deleteChannels(
new DeleteChannelsRequest()
.setCids(List.of())
.setHardDelete(false)
).execute();
System.out.println(response);
}
}Response: DeleteChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| cids | []string | Yes | All channels that should be deleted |
| hard_delete | Boolean | No | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark channel message delivery status
var response = chatClient.markDelivered(
new MarkDeliveredRequest()
.setUserID("john")
.setLatestDeliveredMessages(List.of())
).execute();
System.out.println(response);
}
}Response: MarkDeliveredResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | String | No | - |
| latest_delivered_messages | []DeliveredMessagePayload | No | - |
markChannelsRead
Mark all messages in selected channels as read, allowing you to streamline communication management and reduce notification clutter.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark channels as read
var response = chatClient.markChannelsRead(
new MarkChannelsReadRequest()
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setReadByChannel(Map.of())
).execute();
System.out.println(response);
}
}Response: MarkReadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| read_by_channel | Map<String, Object> | No | Map of channel ID to last read message ID |
| user | UserRequest | No | - |
| user_id | String | No | - |
getOrCreateDistinctChannel
Retrieve an existing channel or create a new one based on unique identifiers, simplifying the process of managing distinct communication threads.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateDistinctChannel(
"like",
new GetOrCreateDistinctChannelRequest()
.setData(new ChannelInput().setAutoTranslationEnabled(false))
.setHideForCreator(false)
).execute();
System.out.println(response);
}
}Example: with members and messages
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateDistinctChannel(
"like",
new GetOrCreateDistinctChannelRequest()
.setMembers(new PaginationParams().setLimit(25))
.setMessages(new MessagePaginationParams().setCreatedAtAfter(10))
).execute();
System.out.println(response);
}
}Example: with state and thread_unread_counts
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateDistinctChannel(
"like",
new GetOrCreateDistinctChannelRequest()
.setState(false)
.setThreadUnreadCounts(false)
).execute();
System.out.println(response);
}
}Example: with watchers
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateDistinctChannel(
"like",
new GetOrCreateDistinctChannelRequest()
.setWatchers(new PaginationParams().setLimit(25))
).execute();
System.out.println(response);
}
}Response: ChannelStateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| data | ChannelInput | No | - |
| hide_for_creator | Boolean | No | Whether this channel will be hidden for the user who created the channel or not |
| members | PaginationParams | No | - |
| messages | MessagePaginationParams | No | - |
| state | Boolean | No | Refresh channel state |
| thread_unread_counts | Boolean | No | - |
| watchers | PaginationParams | No | - |
updateChannel
Modify the settings or attributes of an existing channel to keep your communication channels up-to-date and aligned with your needs.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel
var response = chatClient.updateChannel(
"like",
"activity-123",
new UpdateChannelRequest()
.setUserID("john")
.setSkipPush(false)
).execute();
System.out.println(response);
}
}Example: with add_members and add_moderators
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel
var response = chatClient.updateChannel(
"like",
"activity-123",
new UpdateChannelRequest()
.setAddMembers(List.of())
.setAddModerators(List.of())
).execute();
System.out.println(response);
}
}Example: with assign_roles and cooldown
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel
var response = chatClient.updateChannel(
"like",
"activity-123",
new UpdateChannelRequest()
.setAssignRoles(List.of())
.setCooldown(10)
).execute();
System.out.println(response);
}
}Example: with data and demote_moderators
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel
var response = chatClient.updateChannel(
"like",
"activity-123",
new UpdateChannelRequest()
.setData(new ChannelInputRequest().setAutoTranslationEnabled(false))
.setDemoteModerators(List.of())
).execute();
System.out.println(response);
}
}Response: UpdateChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| accept_invite | Boolean | No | Set to true to accept the invite |
| add_filter_tags | []string | No | List of filter tags to add to the channel |
| add_members | []ChannelMemberRequest | No | List of user IDs to add to the channel |
| add_moderators | []string | No | List of user IDs to make channel moderators |
| assign_roles | []ChannelMemberRequest | No | List of channel member role assignments. If any specified user is not part of the channel, the re... |
| cooldown | Integer | No | Sets cool down period for the channel in seconds |
| data | ChannelInputRequest | No | - |
| demote_moderators | []string | No | List of user IDs to take away moderators status from |
| hide_history | Boolean | No | Set to true to hide channel's history when adding new members |
| hide_history_before | float | No | If set, hides channel's history before this time when adding new members. Takes precedence over `... |
| invites | []ChannelMemberRequest | No | List of user IDs to invite to the channel |
| message | MessageRequest | No | Message to send to the chat when channel is successfully updated |
| reject_invite | Boolean | No | Set to true to reject the invite |
| remove_filter_tags | []string | No | List of filter tags to remove from the channel |
| remove_members | []string | No | List of user IDs to remove from the channel |
| skip_push | Boolean | No | When message is set disables all push notifications for it |
| user | UserRequest | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially update channel
var response = chatClient.updateChannelPartial(
"like",
"activity-123",
new UpdateChannelPartialRequest()
.setUserID("john")
.setUnset(List.of())
).execute();
System.out.println(response);
}
}Example: with user and set
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially update channel
var response = chatClient.updateChannelPartial(
"like",
"activity-123",
new UpdateChannelPartialRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setSet(Map.of())
).execute();
System.out.println(response);
}
}Response: UpdateChannelPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| set | Map<String, Object> | No | - |
| unset | []string | No | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
deleteChannel
Remove a channel from the system entirely. Use this when you want to permanently delete a channel and its associated data.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete channel
var response = chatClient.deleteChannel(
"like",
"activity-123",
new DeleteChannelRequest()
.setHardDelete(false)
).execute();
System.out.println(response);
}
}Response: DeleteChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| hard_delete | Boolean | No | - |
getDraft
Retrieve a draft message for editing or review. Use this to access unsent messages saved as drafts before finalizing or sending them.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get draft
var response = chatClient.getDraft(
"like",
"activity-123",
new GetDraftRequest()
.setUserID("john")
.setParentID("parent-123")
).execute();
System.out.println(response);
}
}Response: GetDraftResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| parent_id | String | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete draft
var response = chatClient.deleteDraft(
"like",
"activity-123",
new DeleteDraftRequest()
.setUserID("john")
.setParentID("parent-123")
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| parent_id | String | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Send event
var response = chatClient.sendEvent(
"like",
"activity-123",
new SendEventRequest()
.setEvent(new EventRequest().setType("like").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Response: EventResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| event | EventRequest | Yes | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Upload file
var response = chatClient.uploadChannelFile(
"like",
"activity-123",
new UploadChannelFileRequest()
.setFile("value")
.setUser(new OnlyUserID().setID("activity-123"))
).execute();
System.out.println(response);
}
}Response: UploadChannelFileResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| file | String | No | file field |
| user | OnlyUserID | No | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete file
var response = chatClient.deleteChannelFile(
"like",
"activity-123",
new DeleteChannelFileRequest()
.setURL("value")
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| url | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Hide channel
var response = chatClient.hideChannel(
"like",
"activity-123",
new HideChannelRequest()
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with clear_history
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Hide channel
var response = chatClient.hideChannel(
"like",
"activity-123",
new HideChannelRequest()
.setClearHistory(false)
).execute();
System.out.println(response);
}
}Response: HideChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| clear_history | Boolean | No | Whether to clear message history of the channel or not |
| user | UserRequest | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Upload image
var response = chatClient.uploadChannelImage(
"like",
"activity-123",
new UploadChannelImageRequest()
.setFile("value")
.setUploadSizes(List.of())
).execute();
System.out.println(response);
}
}Example: with user
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Upload image
var response = chatClient.uploadChannelImage(
"like",
"activity-123",
new UploadChannelImageRequest()
.setUser(new OnlyUserID().setID("activity-123"))
).execute();
System.out.println(response);
}
}Response: UploadChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| file | String | No | - |
| upload_sizes | []ImageSize | No | field with JSON-encoded array of image size configurations |
| user | OnlyUserID | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete image
var response = chatClient.deleteChannelImage(
"like",
"activity-123",
new DeleteChannelImageRequest()
.setURL("value")
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| url | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially channel member update
var response = chatClient.updateMemberPartial(
"like",
"activity-123",
new UpdateMemberPartialRequest()
.setUserID("john")
.setSet(Map.of())
).execute();
System.out.println(response);
}
}Example: with unset
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially channel member update
var response = chatClient.updateMemberPartial(
"like",
"activity-123",
new UpdateMemberPartialRequest()
.setUnset(List.of())
).execute();
System.out.println(response);
}
}Response: UpdateMemberPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| user_id | String | No | - |
| set | Map<String, Object> | No | - |
| unset | []string | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Send new message
var response = chatClient.sendMessage(
"like",
"activity-123",
new SendMessageRequest()
.setMessage(new MessageRequest().setAttachments(List.of()))
.setSkipPush(false)
.setKeepChannelHidden(false)
).execute();
System.out.println(response);
}
}Example: with pending and pending_message_metadata
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Send new message
var response = chatClient.sendMessage(
"like",
"activity-123",
new SendMessageRequest()
.setMessage(new MessageRequest().setAttachments(List.of()))
.setPending(false)
.setPendingMessageMetadata(Map.of())
).execute();
System.out.println(response);
}
}Example: with skip_enrich_url and force_moderation
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Send new message
var response = chatClient.sendMessage(
"like",
"activity-123",
new SendMessageRequest()
.setMessage(new MessageRequest().setAttachments(List.of()))
.setSkipEnrichURL(false)
.setForceModeration(false)
).execute();
System.out.println(response);
}
}Response: SendMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| message | MessageRequest | Yes | - |
| force_moderation | Boolean | No | - |
| keep_channel_hidden | Boolean | No | - |
| pending | Boolean | No | - |
| pending_message_metadata | Map<String, Object> | No | - |
| skip_enrich_url | Boolean | No | - |
| skip_push | Boolean | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get many messages
var response = chatClient.getManyMessages(
"like",
"activity-123",
new GetManyMessagesRequest()
.setIds(List.of("activity-1", "activity-2"))
).execute();
System.out.println(response);
}
}Response: GetManyMessagesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| ids | []string | Yes | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateChannel(
"like",
"activity-123",
new GetOrCreateChannelRequest()
.setData(new ChannelInput().setAutoTranslationEnabled(false))
.setHideForCreator(false)
).execute();
System.out.println(response);
}
}Example: with members and messages
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateChannel(
"like",
"activity-123",
new GetOrCreateChannelRequest()
.setMembers(new PaginationParams().setLimit(25))
.setMessages(new MessagePaginationParams().setCreatedAtAfter(10))
).execute();
System.out.println(response);
}
}Example: with state and thread_unread_counts
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateChannel(
"like",
"activity-123",
new GetOrCreateChannelRequest()
.setState(false)
.setThreadUnreadCounts(false)
).execute();
System.out.println(response);
}
}Example: with watchers
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get or create channel
var response = chatClient.getOrCreateChannel(
"like",
"activity-123",
new GetOrCreateChannelRequest()
.setWatchers(new PaginationParams().setLimit(25))
).execute();
System.out.println(response);
}
}Response: ChannelStateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| data | ChannelInput | No | - |
| hide_for_creator | Boolean | No | Whether this channel will be hidden for the user who created the channel or not |
| members | PaginationParams | No | - |
| messages | MessagePaginationParams | No | - |
| state | Boolean | No | Refresh channel state |
| thread_unread_counts | Boolean | No | - |
| watchers | PaginationParams | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark read
var response = chatClient.markRead(
"like",
"activity-123",
new MarkReadRequest()
.setUserID("john")
.setThreadID("value")
).execute();
System.out.println(response);
}
}Example: with user and message_id
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark read
var response = chatClient.markRead(
"like",
"activity-123",
new MarkReadRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setMessageID("value")
).execute();
System.out.println(response);
}
}Response: MarkReadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| message_id | String | No | ID of the message that is considered last read by client |
| thread_id | String | No | Optional Thread ID to specifically mark a given thread as read |
| user | UserRequest | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Show channel
var response = chatClient.showChannel(
"like",
"activity-123",
new ShowChannelRequest()
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Response: ShowChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Truncate channel
var response = chatClient.truncateChannel(
"like",
"activity-123",
new TruncateChannelRequest()
.setUserID("john")
.setHardDelete(false)
).execute();
System.out.println(response);
}
}Example: with skip_push and member_ids
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Truncate channel
var response = chatClient.truncateChannel(
"like",
"activity-123",
new TruncateChannelRequest()
.setSkipPush(false)
.setMemberIds(List.of())
).execute();
System.out.println(response);
}
}Example: with truncated_at and user
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Truncate channel
var response = chatClient.truncateChannel(
"like",
"activity-123",
new TruncateChannelRequest()
.setTruncatedAt(10)
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with message
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Truncate channel
var response = chatClient.truncateChannel(
"like",
"activity-123",
new TruncateChannelRequest()
.setMessage(new MessageRequest().setAttachments(List.of()))
).execute();
System.out.println(response);
}
}Response: TruncateChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| hard_delete | Boolean | No | Permanently delete channel data (messages, reactions, etc.) |
| member_ids | []string | No | List of member IDs to hide message history for. If empty, truncates the channel for all members |
| message | MessageRequest | No | - |
| skip_push | Boolean | No | When message is set disables all push notifications for it |
| truncated_at | float | No | Truncate channel data up to truncated_at. The system message (if provided) creation time is alw... |
| user | UserRequest | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark unread
var response = chatClient.markUnread(
"like",
"activity-123",
new MarkUnreadRequest()
.setUserID("john")
.setMessageTimestamp(10)
).execute();
System.out.println(response);
}
}Example: with thread_id and user
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark unread
var response = chatClient.markUnread(
"like",
"activity-123",
new MarkUnreadRequest()
.setThreadID("value")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with message_id
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mark unread
var response = chatClient.markUnread(
"like",
"activity-123",
new MarkUnreadRequest()
.setMessageID("value")
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| message_id | String | No | ID of the message from where the channel is marked unread |
| message_timestamp | float | No | Timestamp of the message from where the channel is marked unread |
| thread_id | String | No | Mark a thread unread, specify one of the thread, message timestamp, or message id |
| user | UserRequest | No | - |
| user_id | String | No | - |
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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// List channel types
var response = chatClient.listChannelTypes().execute();
System.out.println(response);
}
}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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create channel type
var response = chatClient.createChannelType(
new CreateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setName("My Feed")
.setBlocklist("value")
.setBlocklistBehavior("value")
).execute();
System.out.println(response);
}
}Example: with blocklists and chat_preferences
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create channel type
var response = chatClient.createChannelType(
new CreateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setName("My Feed")
.setBlocklists(List.of())
.setChatPreferences(new ChatPreferences().setChannelMentions("value"))
).execute();
System.out.println(response);
}
}Example: with commands and connect_events
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create channel type
var response = chatClient.createChannelType(
new CreateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setName("My Feed")
.setCommands(List.of())
.setConnectEvents(false)
).execute();
System.out.println(response);
}
}Example: with count_messages and custom_events
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create channel type
var response = chatClient.createChannelType(
new CreateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setName("My Feed")
.setCountMessages(false)
.setCustomEvents(false)
).execute();
System.out.println(response);
}
}Response: CreateChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | Automod. One of: disabled, simple, AI |
| automod_behavior | String | Yes | Automod behavior. One of: flag, block |
| max_message_length | Integer | Yes | Max message length |
| name | String | Yes | Channel type name |
| blocklist | String | No | Blocklist |
| blocklist_behavior | String | No | Blocklist behavior. One of: flag, block, shadow_block |
| blocklists | []BlockListOptions | No | Blocklists |
| chat_preferences | ChatPreferences | No | - |
| commands | []string | No | List of commands that channel supports |
| connect_events | Boolean | No | Connect events |
| count_messages | Boolean | No | Count messages in channel. |
| custom_events | Boolean | No | Custom events |
| delivery_events | Boolean | No | - |
| grants | Map<String, Object> | No | List of grants for the channel type |
| mark_messages_pending | Boolean | No | Mark messages pending |
| message_retention | String | No | Message retention. One of: infinite, numeric |
| mutes | Boolean | No | Mutes |
| partition_size | Integer | No | Partition size |
| partition_ttl | String | No | Partition TTL |
| permissions | []PolicyRequest | No | List of permissions for the channel type |
| polls | Boolean | No | Polls |
| push_level | String | No | Default push notification level for the channel type. One of: all, all_mentions, mentions, direct... |
| push_notifications | Boolean | No | Push notifications |
| reactions | Boolean | No | Reactions |
| read_events | Boolean | No | Read events |
| replies | Boolean | No | Replies |
| search | Boolean | No | Search |
| shared_locations | Boolean | No | Enables shared location messages |
| skip_last_msg_update_for_system_msgs | Boolean | No | - |
| typing_events | Boolean | No | Typing events |
| uploads | Boolean | No | Uploads |
| url_enrichment | Boolean | No | URL enrichment |
| user_message_reminders | Boolean | No | - |
getChannelType
Retrieve information about a specific channel type to understand its configuration and settings, useful for reviewing or managing channel functionalities.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get channel type
var response = chatClient.getChannelType(
"My Feed"
).execute();
System.out.println(response);
}
}Response: GetChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
updateChannelType
Modify the properties of an existing channel type to customize or enhance channel behavior according to specific requirements.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel type
var response = chatClient.updateChannelType(
"My Feed",
new UpdateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setAllowedFlagReasons(List.of())
.setAutomodThresholds(new Thresholds().setExplicit(new LabelThresholds().setBlock(10)))
).execute();
System.out.println(response);
}
}Example: with blocklist and blocklist_behavior
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel type
var response = chatClient.updateChannelType(
"My Feed",
new UpdateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setBlocklist("value")
.setBlocklistBehavior("value")
).execute();
System.out.println(response);
}
}Example: with blocklists and chat_preferences
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel type
var response = chatClient.updateChannelType(
"My Feed",
new UpdateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setBlocklists(List.of())
.setChatPreferences(new ChatPreferences().setChannelMentions("value"))
).execute();
System.out.println(response);
}
}Example: with commands and connect_events
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update channel type
var response = chatClient.updateChannelType(
"My Feed",
new UpdateChannelTypeRequest()
.setAutomod("value")
.setAutomodBehavior("value")
.setMaxMessageLength(10)
.setCommands(List.of())
.setConnectEvents(false)
).execute();
System.out.println(response);
}
}Response: UpdateChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
| automod | String | Yes | - |
| automod_behavior | String | Yes | - |
| max_message_length | Integer | Yes | - |
| allowed_flag_reasons | []string | No | - |
| automod_thresholds | Thresholds | No | - |
| blocklist | String | No | - |
| blocklist_behavior | String | No | - |
| blocklists | []BlockListOptions | No | - |
| chat_preferences | ChatPreferences | No | - |
| commands | []string | No | List of commands that channel supports |
| connect_events | Boolean | No | - |
| count_messages | Boolean | No | - |
| custom_events | Boolean | No | - |
| delivery_events | Boolean | No | - |
| grants | Map<String, Object> | No | - |
| mark_messages_pending | Boolean | No | - |
| mutes | Boolean | No | - |
| partition_size | Integer | No | - |
| partition_ttl | String | No | - |
| permissions | []PolicyRequest | No | - |
| polls | Boolean | No | - |
| push_level | String | No | - |
| push_notifications | Boolean | No | - |
| quotes | Boolean | No | - |
| reactions | Boolean | No | - |
| read_events | Boolean | No | - |
| reminders | Boolean | No | - |
| replies | Boolean | No | - |
| search | Boolean | No | - |
| shared_locations | Boolean | No | - |
| skip_last_msg_update_for_system_msgs | Boolean | No | - |
| typing_events | Boolean | No | - |
| uploads | Boolean | No | - |
| url_enrichment | Boolean | No | - |
| user_message_reminders | Boolean | No | - |
deleteChannelType
Remove a channel type from your application to streamline channel categories or eliminate unused configurations.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete channel type
var response = chatClient.deleteChannelType(
"My Feed"
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
listCommands
Obtain a list of all available commands, providing a quick reference to the commands that can be used within the chat environment.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// List commands
var response = chatClient.listCommands().execute();
System.out.println(response);
}
}Response: ListCommandsResponse
createCommand
Create a new command to extend chat functionalities, enabling custom actions or automations based on user input.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create command
var response = chatClient.createCommand(
new CreateCommandRequest()
.setDescription("A description")
.setName("My Feed")
.setArgs("value")
.setSet("value")
).execute();
System.out.println(response);
}
}Response: CreateCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| description | String | Yes | Description, shown in commands auto-completion |
| name | String | Yes | Unique command name |
| args | String | No | Arguments help text, shown in commands auto-completion |
| set | String | No | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get command
var response = chatClient.getCommand(
"My Feed"
).execute();
System.out.println(response);
}
}Response: GetCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
updateCommand
Alter the properties of an existing command to refine its behavior or adapt to changing requirements in the chat application.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update command
var response = chatClient.updateCommand(
"My Feed",
new UpdateCommandRequest()
.setDescription("A description")
.setArgs("value")
.setSet("value")
).execute();
System.out.println(response);
}
}Response: UpdateCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
| description | String | Yes | Description, shown in commands auto-completion |
| args | String | No | Arguments help text, shown in commands auto-completion |
| set | String | No | Set name used for grouping commands |
deleteCommand
Eliminate a command from your chat environment to simplify command options or remove outdated functionalities.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete command
var response = chatClient.deleteCommand(
"My Feed"
).execute();
System.out.println(response);
}
}Response: DeleteCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
queryDrafts
Search for draft messages to review or manage incomplete communications before they are sent within the chat.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query draft messages
var response = chatClient.queryDrafts(
new QueryDraftsRequest()
.setUserID("john")
.setLimit(25)
.setFilter(Map.of())
).execute();
System.out.println(response);
}
}Example: with sort and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query draft messages
var response = chatClient.queryDrafts(
new QueryDraftsRequest()
.setSort(List.of())
.setNext(null)
).execute();
System.out.println(response);
}
}Example: with user and prev
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query draft messages
var response = chatClient.queryDrafts(
new QueryDraftsRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setPrev(null)
).execute();
System.out.println(response);
}
}Response: QueryDraftsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | No | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | String | No | - |
exportChannels
Export channel data to preserve chat history, analyze communication patterns, or integrate with external systems for broader data use.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Export channels
var response = chatClient.exportChannels(
new ExportChannelsRequest()
.setChannels(List.of())
.setClearDeletedMessageText(false)
.setExportUsers(false)
).execute();
System.out.println(response);
}
}Example: with include_soft_deleted_channels and include_truncated_messages
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Export channels
var response = chatClient.exportChannels(
new ExportChannelsRequest()
.setChannels(List.of())
.setIncludeSoftDeletedChannels(false)
.setIncludeTruncatedMessages(false)
).execute();
System.out.println(response);
}
}Example: with version
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Export channels
var response = chatClient.exportChannels(
new ExportChannelsRequest()
.setChannels(List.of())
.setVersion("value")
).execute();
System.out.println(response);
}
}Response: ExportChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| channels | []ChannelExport | Yes | Export options for channels |
| clear_deleted_message_text | Boolean | No | Set if deleted message text should be cleared |
| export_users | Boolean | No | - |
| include_soft_deleted_channels | Boolean | No | Set if you want to include deleted channels |
| include_truncated_messages | Boolean | No | Set if you want to include truncated messages |
| version | String | No | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query members
var response = chatClient.queryMembers(
new QueryMembersRequest()
.setPayload("value")
).execute();
System.out.println(response);
}
}Response: MembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
queryMessageHistory
Access past messages in a chat to review previous interactions, useful for catching up on conversations or retrieving historical data.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query message history
var response = chatClient.queryMessageHistory(
new QueryMessageHistoryRequest()
.setFilter(Map.of())
.setLimit(25)
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with prev and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query message history
var response = chatClient.queryMessageHistory(
new QueryMessageHistoryRequest()
.setFilter(Map.of())
.setPrev(null)
.setNext(null)
).execute();
System.out.println(response);
}
}Response: QueryMessageHistoryResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | Yes | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
getMessage
Fetch a specific message by its identifier, ideal for when you need detailed information about a particular message.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get message
var response = chatClient.getMessage(
"activity-123",
new GetMessageRequest()
.setShowDeletedMessage(false)
).execute();
System.out.println(response);
}
}Response: GetMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| show_deleted_message | Boolean | No | - |
updateMessage
Modify the content of an existing message, useful for correcting errors or updating information within a conversation.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Update message
var response = chatClient.updateMessage(
"activity-123",
new UpdateMessageRequest()
.setMessage(new MessageRequest().setAttachments(List.of()))
.setSkipPush(false)
.setSkipEnrichURL(false)
).execute();
System.out.println(response);
}
}Response: UpdateMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| message | MessageRequest | Yes | Message |
| skip_enrich_url | Boolean | No | Skip enrich URL |
| skip_push | Boolean | No | - |
updateMessagePartial
Make selective changes to parts of a message without altering the entire content, perfect for minor edits or updates.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially message update
var response = chatClient.updateMessagePartial(
"activity-123",
new UpdateMessagePartialRequest()
.setUserID("john")
.setSkipPush(false)
).execute();
System.out.println(response);
}
}Example: with set and unset
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially message update
var response = chatClient.updateMessagePartial(
"activity-123",
new UpdateMessagePartialRequest()
.setSet(Map.of())
.setUnset(List.of())
).execute();
System.out.println(response);
}
}Example: with user and skip_enrich_url
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially message update
var response = chatClient.updateMessagePartial(
"activity-123",
new UpdateMessagePartialRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setSkipEnrichURL(false)
).execute();
System.out.println(response);
}
}Response: UpdateMessagePartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| set | Map<String, Object> | No | Sets new field values |
| skip_enrich_url | Boolean | No | Skip enriching the URL in the message |
| skip_push | Boolean | No | - |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | String | No | - |
deleteMessage
Remove a message from the chat, useful for managing content or when you need to eliminate outdated or inappropriate information.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete message
var response = chatClient.deleteMessage(
"activity-123",
new DeleteMessageRequest()
.setHard(false)
.setDeletedBy("value")
).execute();
System.out.println(response);
}
}Example: with delete_for_me
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete message
var response = chatClient.deleteMessage(
"activity-123",
new DeleteMessageRequest()
.setDeleteForMe(false)
).execute();
System.out.println(response);
}
}Response: DeleteMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| hard | Boolean | No | - |
| deleted_by | String | No | - |
| delete_for_me | Boolean | No | - |
runMessageAction
Execute a predefined action on a message, ideal for triggering automated responses or workflows based on message content.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Run message command action
var response = chatClient.runMessageAction(
"activity-123",
new RunMessageActionRequest()
.setFormData(Map.of())
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Response: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| form_data | Map<String, Object> | Yes | ReadOnlyData to execute command with |
| user | UserRequest | No | - |
| user_id | String | No | - |
commitMessage
Finalize and save changes made to a message, ensuring that all updates are applied and visible to chat participants.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Commit message
var response = chatClient.commitMessage(
"activity-123"
).execute();
System.out.println(response);
}
}Response: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
ephemeralMessageUpdate
Update an ephemeral message, which is temporary and may disappear after a set time, useful for time-sensitive or transient information.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Ephemeral message update
var response = chatClient.ephemeralMessageUpdate(
"activity-123",
new EphemeralMessageUpdateRequest()
.setUserID("john")
.setSkipPush(false)
).execute();
System.out.println(response);
}
}Example: with set and unset
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Ephemeral message update
var response = chatClient.ephemeralMessageUpdate(
"activity-123",
new EphemeralMessageUpdateRequest()
.setSet(Map.of())
.setUnset(List.of())
).execute();
System.out.println(response);
}
}Example: with user and skip_enrich_url
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Ephemeral message update
var response = chatClient.ephemeralMessageUpdate(
"activity-123",
new EphemeralMessageUpdateRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setSkipEnrichURL(false)
).execute();
System.out.println(response);
}
}Response: UpdateMessagePartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| set | Map<String, Object> | No | Sets new field values |
| skip_enrich_url | Boolean | No | Skip enriching the URL in the message |
| skip_push | Boolean | No | - |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | String | No | - |
sendReaction
Express your response or feedback to a message by sending an emoji reaction, enhancing interaction and engagement within the chat.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Send reaction
var response = chatClient.sendReaction(
"activity-123",
new SendReactionRequest()
.setReaction(new ReactionRequest().setType("like").setCreatedAt(10))
.setSkipPush(false)
.setEnforceUnique(true)
).execute();
System.out.println(response);
}
}Response: SendReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| reaction | ReactionRequest | Yes | - |
| enforce_unique | Boolean | No | Whether to replace all existing user reactions |
| skip_push | Boolean | No | Skips any mobile push notifications |
deleteReaction
Removes a user's reaction from a message, useful for managing or correcting reactions in a conversation.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete reaction
var response = chatClient.deleteReaction(
"activity-123",
"like",
new DeleteReactionRequest()
.setUserID("john")
).execute();
System.out.println(response);
}
}Response: DeleteReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| type | String | Yes | - |
| user_id | String | No | - |
getReactions
Retrieves all reactions associated with a specific message, allowing users to view collective feedback or expressions from the chat participants.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get reactions
var response = chatClient.getReactions(
"activity-123",
new GetReactionsRequest()
.setLimit(25)
.setOffset(0)
).execute();
System.out.println(response);
}
}Response: GetReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| limit | Integer | No | - |
| offset | Integer | No | - |
queryReactions
Fetches specific reactions based on given criteria, enabling users to filter and analyze reactions for insights or moderation.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
//
var response = chatClient.queryReactions(
"activity-123",
new QueryReactionsRequest()
.setUserID("john")
.setLimit(25)
).execute();
System.out.println(response);
}
}Example: with filter and sort
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
//
var response = chatClient.queryReactions(
"activity-123",
new QueryReactionsRequest()
.setFilter(Map.of())
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with next and user
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
//
var response = chatClient.queryReactions(
"activity-123",
new QueryReactionsRequest()
.setNext(null)
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with prev
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
//
var response = chatClient.queryReactions(
"activity-123",
new QueryReactionsRequest()
.setPrev(null)
).execute();
System.out.println(response);
}
}Response: QueryReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| filter | Map<String, Object> | No | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | String | No | - |
translateMessage
Converts a message into a different language, facilitating communication between users who speak different languages.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Translate message
var response = chatClient.translateMessage(
"activity-123",
new TranslateMessageRequest()
.setLanguage("value")
).execute();
System.out.println(response);
}
}Response: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| language | String | Yes | Language to translate message to |
undeleteMessage
Restores a previously deleted message, useful for recovering important information or correcting accidental deletions.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Undelete message
var response = chatClient.undeleteMessage(
"activity-123",
new UndeleteMessageRequest()
.setUndeletedBy("value")
).execute();
System.out.println(response);
}
}Response: UndeleteMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| undeleted_by | String | Yes | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Cast vote
var response = chatClient.castPollVote(
"value",
"poll-123",
new CastPollVoteRequest()
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with vote
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Cast vote
var response = chatClient.castPollVote(
"value",
"poll-123",
new CastPollVoteRequest()
.setVote(new VoteData().setAnswerText("value"))
).execute();
System.out.println(response);
}
}Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| poll_id | String | Yes | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
| vote | VoteData | No | Vote data |
deletePollVote
Removes a user's vote from a poll, providing flexibility to change decisions or correct voting errors.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete vote
var response = chatClient.deletePollVote(
"value",
"poll-123",
"vote-123",
new DeletePollVoteRequest()
.setUserID("john")
).execute();
System.out.println(response);
}
}Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| poll_id | String | Yes | - |
| vote_id | String | Yes | - |
| user_id | String | No | - |
createReminder
Sets up a reminder for a specific event or task, helping users stay organized and remember important dates or activities.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create reminder
var response = chatClient.createReminder(
"value",
new CreateReminderRequest()
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with remind_at
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Create reminder
var response = chatClient.createReminder(
"value",
new CreateReminderRequest()
.setRemindAt(10)
).execute();
System.out.println(response);
}
}Response: ReminderResponseData
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| remind_at | float | No | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
updateReminder
Modifies an existing reminder, allowing users to adjust details or schedules to accommodate changes in plans.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Updates Reminder
var response = chatClient.updateReminder(
"value",
new UpdateReminderRequest()
.setUserID("john")
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with remind_at
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Updates Reminder
var response = chatClient.updateReminder(
"value",
new UpdateReminderRequest()
.setRemindAt(10)
).execute();
System.out.println(response);
}
}Response: UpdateReminderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| remind_at | float | No | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
deleteReminder
Removes an existing reminder, useful for clearing completed tasks or canceling unnecessary notifications.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete reminder
var response = chatClient.deleteReminder(
"value",
new DeleteReminderRequest()
.setUserID("john")
).execute();
System.out.println(response);
}
}Response: DeleteReminderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| user_id | String | No | - |
getReplies
Retrieve all replies to a specific message, useful for following a conversation thread within a chat.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get replies
var response = chatClient.getReplies(
"parent-123",
new GetRepliesRequest()
.setLimit(25)
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with id_gte and id_gt
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get replies
var response = chatClient.getReplies(
"parent-123",
new GetRepliesRequest()
.setIDGte("value")
.setIDGt("value")
).execute();
System.out.println(response);
}
}Example: with id_lte and id_lt
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get replies
var response = chatClient.getReplies(
"parent-123",
new GetRepliesRequest()
.setIDLte("value")
.setIDLt("value")
).execute();
System.out.println(response);
}
}Example: with id_around
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get replies
var response = chatClient.getReplies(
"parent-123",
new GetRepliesRequest()
.setIDAround("value")
).execute();
System.out.println(response);
}
}Response: GetRepliesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| parent_id | String | Yes | - |
| sort | []SortParamRequest | No | - |
| limit | Integer | No | - |
| id_gte | String | No | - |
| id_gt | String | No | - |
| id_lte | String | No | - |
| id_lt | String | No | - |
| id_around | String | No | - |
queryMessageFlags
Check the flags associated with messages, helping to identify and manage content that requires moderation or attention.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Message Flags
var response = chatClient.queryMessageFlags(
new QueryMessageFlagsRequest()
.setPayload("value")
).execute();
System.out.println(response);
}
}Response: QueryMessageFlagsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
muteChannel
Temporarily silence notifications from a specific channel, ideal for minimizing distractions without leaving the conversation.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mute channel
var response = chatClient.muteChannel(
new MuteChannelRequest()
.setUserID("john")
.setExpiration(10)
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with channel_cids
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Mute channel
var response = chatClient.muteChannel(
new MuteChannelRequest()
.setChannelCids(List.of())
).execute();
System.out.println(response);
}
}Response: MuteChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel_cids | []string | No | Channel CIDs to mute (if multiple channels) |
| expiration | Integer | No | Duration of mute in milliseconds |
| user | UserRequest | No | - |
| user_id | String | No | - |
unmuteChannel
Re-enable notifications for a previously muted channel, allowing you to stay updated on new messages.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Unmute channel
var response = chatClient.unmuteChannel(
new UnmuteChannelRequest()
.setUserID("john")
.setExpiration(10)
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Example: with channel_cids
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Unmute channel
var response = chatClient.unmuteChannel(
new UnmuteChannelRequest()
.setChannelCids(List.of())
).execute();
System.out.println(response);
}
}Response: UnmuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel_cids | []string | No | Channel CIDs to mute (if multiple channels) |
| expiration | Integer | No | Duration of mute in milliseconds |
| user | UserRequest | No | - |
| user_id | String | No | - |
queryBannedUsers
List the users who have been banned from a chat, useful for managing community access and enforcing rules.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Banned Users
var response = chatClient.queryBannedUsers(
new QueryBannedUsersRequest()
.setPayload("value")
).execute();
System.out.println(response);
}
}Response: QueryBannedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
queryFutureChannelBans
View scheduled bans for a channel, helping you anticipate and manage upcoming restrictions on user access.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Future Channel Bans
var response = chatClient.queryFutureChannelBans(
new QueryFutureChannelBansRequest()
.setPayload("value")
).execute();
System.out.println(response);
}
}Response: QueryFutureChannelBansResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
queryReminders
Access a list of reminders set within the chat, ensuring you don't miss important events or tasks.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query reminders
var response = chatClient.queryReminders(
new QueryRemindersRequest()
.setUserID("john")
.setLimit(25)
.setFilter(Map.of())
).execute();
System.out.println(response);
}
}Example: with sort and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query reminders
var response = chatClient.queryReminders(
new QueryRemindersRequest()
.setSort(List.of())
.setNext(null)
).execute();
System.out.println(response);
}
}Example: with user and prev
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query reminders
var response = chatClient.queryReminders(
new QueryRemindersRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setPrev(null)
).execute();
System.out.println(response);
}
}Response: QueryRemindersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | No | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | String | No | - |
getRetentionPolicy
Retrieve the current data retention policy to understand how long data is stored and managed, ensuring compliance with organizational or regulatory requirements.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get retention policy
var response = chatClient.getRetentionPolicy().execute();
System.out.println(response);
}
}Response: GetRetentionPolicyResponse
setRetentionPolicy
Define or modify the data retention policy to control how long data is retained, helping maintain data governance and compliance.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Set retention policy
var response = chatClient.setRetentionPolicy(
new SetRetentionPolicyRequest()
.setMaxAgeHours(10)
.setPolicy("value")
).execute();
System.out.println(response);
}
}Response: SetRetentionPolicyResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| max_age_hours | Integer | Yes | - |
| policy | String | Yes | - |
deleteRetentionPolicy
Remove an existing data retention policy when it is no longer needed, helping streamline data management practices.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete retention policy
var response = chatClient.deleteRetentionPolicy(
new DeleteRetentionPolicyRequest()
.setPolicy("value")
).execute();
System.out.println(response);
}
}Response: DeleteRetentionPolicyResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| policy | String | Yes | - |
getRetentionPolicyRuns
Access historical records of retention policy executions to monitor compliance and review data management activities over time.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get retention policy runs
var response = chatClient.getRetentionPolicyRuns(
new GetRetentionPolicyRunsRequest()
.setLimit(25)
.setSort(List.of())
.setFilterConditions(Map.of())
).execute();
System.out.println(response);
}
}Example: with prev and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get retention policy runs
var response = chatClient.getRetentionPolicyRuns(
new GetRetentionPolicyRunsRequest()
.setPrev(null)
.setNext(null)
).execute();
System.out.println(response);
}
}Response: GetRetentionPolicyRunsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter_conditions | Map<String, Object> | No | Filter conditions to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
search
Look for specific messages across channels using keywords, enabling you to quickly find relevant information or past conversations.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Search messages
var response = chatClient.search(
new SearchRequest()
.setPayload("value")
).execute();
System.out.println(response);
}
}Response: SearchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
querySegments
Retrieve a list of user segments based on specified criteria, useful for targeted communication and analysis.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query segments
var response = chatClient.querySegments(
new QuerySegmentsRequest()
.setFilter(Map.of())
.setLimit(25)
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with prev and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query segments
var response = chatClient.querySegments(
new QuerySegmentsRequest()
.setFilter(Map.of())
.setPrev(null)
.setNext(null)
).execute();
System.out.println(response);
}
}Response: QuerySegmentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | Yes | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
getSegment
Obtain detailed information about a specific user segment, aiding in personalized engagement and insights.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get segment
var response = chatClient.getSegment(
"activity-123"
).execute();
System.out.println(response);
}
}Response: GetSegmentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
deleteSegment
Remove a specific segment from your chat application, useful for managing and organizing user groups or data collections.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete segment
var response = chatClient.deleteSegment(
"activity-123"
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
deleteSegmentTargets
Remove specified targets from a segment, helpful for updating or refining the members or elements within a segment.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Delete targets from a segment
var response = chatClient.deleteSegmentTargets(
"activity-123",
new DeleteSegmentTargetsRequest()
.setTargetIds(List.of())
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| target_ids | []string | Yes | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Check whether a target exists in a segment
var response = chatClient.segmentTargetExists(
"activity-123",
"value"
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| target_id | String | Yes | - |
querySegmentTargets
Retrieve a list of targets within a segment, ideal for gaining insights or performing actions on specific segment members.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query segment targets
var response = chatClient.querySegmentTargets(
"activity-123",
new QuerySegmentTargetsRequest()
.setLimit(25)
.setSort(List.of())
).execute();
System.out.println(response);
}
}Example: with Filter and next
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query segment targets
var response = chatClient.querySegmentTargets(
"activity-123",
new QuerySegmentTargetsRequest()
.setFilter(Map.of())
.setNext(null)
).execute();
System.out.println(response);
}
}Example: with prev
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query segment targets
var response = chatClient.querySegmentTargets(
"activity-123",
new QuerySegmentTargetsRequest()
.setPrev(null)
).execute();
System.out.println(response);
}
}Response: QuerySegmentTargetsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| Filter | Map<String, Object> | No | - |
| Sort | []SortParamRequest | No | - |
| limit | Integer | No | Limit |
| next | String | No | Next |
| prev | String | No | Prev |
queryTeamUsageStats
Obtain detailed statistics on team usage to evaluate engagement levels, optimize resource allocation, and improve team performance.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Team Usage Statistics
var response = chatClient.queryTeamUsageStats(
new QueryTeamUsageStatsRequest()
.setLimit(25)
.setEndDate("value")
.setMonth("value")
).execute();
System.out.println(response);
}
}Example: with next and start_date
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Team Usage Statistics
var response = chatClient.queryTeamUsageStats(
new QueryTeamUsageStatsRequest()
.setNext(null)
.setStartDate("value")
).execute();
System.out.println(response);
}
}Response: QueryTeamUsageStatsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| end_date | String | No | End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown. |
| limit | Integer | No | Maximum number of teams to return per page (default: 30, max: 30) |
| month | String | No | Month in YYYY-MM format (e.g., '2026-01'). Mutually exclusive with start_date/end_date. Returns a... |
| next | String | No | Cursor for pagination to fetch next page of teams |
| start_date | String | No | 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
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Threads
var response = chatClient.queryThreads(
new QueryThreadsRequest()
.setUserID("john")
.setLimit(25)
.setFilter(Map.of())
).execute();
System.out.println(response);
}
}Example: with sort and participant_limit
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Threads
var response = chatClient.queryThreads(
new QueryThreadsRequest()
.setSort(List.of())
.setParticipantLimit(10)
).execute();
System.out.println(response);
}
}Example: with prev and reply_limit
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Threads
var response = chatClient.queryThreads(
new QueryThreadsRequest()
.setPrev(null)
.setReplyLimit(10)
).execute();
System.out.println(response);
}
}Example: with member_limit and user
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Query Threads
var response = chatClient.queryThreads(
new QueryThreadsRequest()
.setMemberLimit(10)
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Response: QueryThreadsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | No | Filter to apply to the query |
| limit | Integer | No | - |
| member_limit | Integer | No | - |
| next | String | No | - |
| participant_limit | Integer | No | Limit the number of participants returned per each thread |
| prev | String | No | - |
| reply_limit | Integer | No | Limit the number of replies returned per each thread |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | String | No | - |
getThread
Retrieve detailed information about a specific chat thread, useful for reviewing conversation content or metadata.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get Thread
var response = chatClient.getThread(
"value",
new GetThreadRequest()
.setReplyLimit(10)
.setParticipantLimit(10)
).execute();
System.out.println(response);
}
}Example: with member_limit
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Get Thread
var response = chatClient.getThread(
"value",
new GetThreadRequest()
.setMemberLimit(10)
).execute();
System.out.println(response);
}
}Response: GetThreadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| reply_limit | Integer | No | - |
| participant_limit | Integer | No | - |
| member_limit | Integer | No | - |
updateThreadPartial
Make selective updates to a chat thread without altering its entire content, useful for modifying specific details or attributes.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially update thread
var response = chatClient.updateThreadPartial(
"value",
new UpdateThreadPartialRequest()
.setUserID("john")
.setUnset(List.of())
).execute();
System.out.println(response);
}
}Example: with user and set
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Partially update thread
var response = chatClient.updateThreadPartial(
"value",
new UpdateThreadPartialRequest()
.setUser(new UserRequest().setID("activity-123").setCustom(Map.of()))
.setSet(Map.of())
).execute();
System.out.println(response);
}
}Response: UpdateThreadPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| set | Map<String, Object> | No | Sets new field values |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | String | No | - |
unreadCounts
Check the number of unread messages in chat threads, helping users stay informed about new activity and prioritize responses.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Unread counts
var response = chatClient.unreadCounts(
new UnreadCountsRequest()
.setUserID("john")
).execute();
System.out.println(response);
}
}Response: WrappedUnreadCountsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | String | No | - |
unreadCountsBatch
Obtain unread message counts for multiple chat threads simultaneously, providing a comprehensive overview of pending messages.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Batch unread counts
var response = chatClient.unreadCountsBatch(
new UnreadCountsBatchRequest()
.setUserIds(List.of("user-1", "user-2"))
).execute();
System.out.println(response);
}
}Response: UnreadCountsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
sendUserCustomEvent
Trigger a custom event associated with a user, useful for tracking user interactions or implementing personalized features.
Example
import io.getstream.services.ChatImpl;
import io.getstream.services.framework.StreamHTTPClient;
import io.getstream.models.*;
import io.getstream.models.framework.StreamResponse;
public class Example {
public static void main(String[] args) throws Exception {
StreamHTTPClient httpClient = new StreamHTTPClient(apiKey, apiSecret);
ChatImpl chatClient = new ChatImpl(httpClient);
// Send user event
var response = chatClient.sendUserCustomEvent(
"john",
new SendUserCustomEventRequest()
.setEvent(new UserCustomEventRequest().setType("like").setCustom(Map.of()))
).execute();
System.out.println(response);
}
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | - |
| event | UserCustomEventRequest | Yes | - |
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.
public class Attachment {
private List<Action> actions;
private String asset_url;
private String author_icon;
private String author_link;
private String author_name;
private String color;
private Map<String, Object> custom;
private String fallback;
private List<Field> fields;
private String footer;
private String footer_icon;
private Images giphy;
private String image_url;
private String og_scrape_url;
private Integer original_height;
private Integer original_width;
private String pretext;
private String text;
private String thumb_url;
private String title;
private String title_link;
private String type;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Map<String, Object> | Yes | |
| actions | List<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 | List<Field> | No | |
| footer | String | No | |
| footer_icon | String | No | |
| giphy | Images | No | |
| image_url | String | No | |
| og_scrape_url | String | No | |
| original_height | Integer | No | |
| original_width | Integer | 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
public class BanResponse {
private UserResponse banned_by;
private ChannelResponse channel;
private Double created_at;
private Double expires;
private String reason;
private Boolean shadow;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | Double | No | |
| reason | String | No | |
| shadow | Boolean | No | |
| user | UserResponse | No |
BlockListOptions
public class BlockListOptions {
private String behavior;
private String blocklist;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| behavior | String | Yes | Blocklist behavior. One of: flag, block, shadow_block |
| blocklist | String | Yes | Blocklist name |
CampaignChannelTemplate
public class CampaignChannelTemplate {
private Map<String, Object> custom;
private String id;
private List<String> members;
private List<CampaignChannelMember> members_template;
private String team;
private String type;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Map<String, Object> | Yes | |
| type | String | Yes | |
| id | String | No | |
| members | List<String> | No | |
| members_template | List<CampaignChannelMember> | No | |
| team | String | No |
CampaignMessageTemplate
public class CampaignMessageTemplate {
private List<Attachment> attachments;
private Map<String, Object> custom;
private String poll_id;
private Boolean searchable;
private String text;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List<Attachment> | Yes | |
| custom | Map<String, Object> | Yes | |
| poll_id | String | Yes | |
| searchable | Boolean | Yes | |
| text | String | Yes |
CampaignResponse
public class CampaignResponse {
private CampaignChannelTemplate channel_template;
private Boolean create_channels;
private Double created_at;
private String description;
private String id;
private CampaignMessageTemplate message_template;
private String name;
private Double scheduled_for;
private List<String> segment_ids;
private List<Segment> segments;
private UserResponse sender;
private String sender_id;
private String sender_mode;
private String sender_visibility;
private Boolean show_channels;
private Boolean skip_push;
private Boolean skip_webhook;
private CampaignStatsResponse stats;
private String status;
private Double stop_at;
private Double updated_at;
private List<String> user_ids;
private List<UserResponse> users;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| create_channels | Boolean | Yes | |
| created_at | Double | Yes | |
| description | String | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| segment_ids | List<String> | Yes | |
| segments | List<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 | Double | Yes | |
| user_ids | List<String> | Yes | |
| users | List<UserResponse> | Yes | |
| channel_template | CampaignChannelTemplate | No | |
| message_template | CampaignMessageTemplate | No | |
| scheduled_for | Double | No | |
| sender | UserResponse | No | |
| stop_at | Double | No |
CampaignStatsResponse
public class CampaignStatsResponse {
private Double progress;
private Integer stats_channels_created;
private Double stats_completed_at;
private Integer stats_messages_sent;
private Double stats_started_at;
private Integer stats_users_read;
private Integer stats_users_sent;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| progress | Double | Yes | |
| stats_channels_created | Integer | Yes | |
| stats_completed_at | Double | Yes | |
| stats_messages_sent | Integer | Yes | |
| stats_started_at | Double | Yes | |
| stats_users_read | Integer | Yes | |
| stats_users_sent | Integer | Yes |
ChannelBatchMemberRequest
public class ChannelBatchMemberRequest {
private String channel_role;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | |
| channel_role | String | No |
ChannelBatchUpdateResponse
Basic response information
public class ChannelBatchUpdateResponse {
private String duration;
private String task_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| task_id | String | No |
ChannelConfig
public class ChannelConfig {
private List<String> allowed_flag_reasons;
private String automod;
private String automod_behavior;
private Thresholds automod_thresholds;
private String blocklist;
private String blocklist_behavior;
private List<BlockListOptions> blocklists;
private ChatPreferences chat_preferences;
private List<String> commands;
private Boolean connect_events;
private Boolean count_messages;
private Double created_at;
private Boolean custom_events;
private Boolean delivery_events;
private Boolean mark_messages_pending;
private Integer max_message_length;
private Boolean mutes;
private String name;
private Integer partition_size;
private String partition_ttl;
private Boolean polls;
private String push_level;
private Boolean push_notifications;
private Boolean quotes;
private Boolean reactions;
private Boolean read_events;
private Boolean reminders;
private Boolean replies;
private Boolean search;
private Boolean shared_locations;
private Boolean skip_last_msg_update_for_system_msgs;
private Boolean typing_events;
private Double updated_at;
private Boolean uploads;
private Boolean url_enrichment;
private Boolean user_message_reminders;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | List<String> | Yes | List of commands that channel supports |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Double | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Integer | 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 | Double | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | List<String> | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | List<BlockListOptions> | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Integer | No | |
| partition_ttl | String | No | |
| push_level | String | No |
ChannelDataUpdate
public class ChannelDataUpdate {
private Boolean auto_translation_enabled;
private String auto_translation_language;
private ChannelConfig config_overrides;
private Map<String, Object> custom;
private Boolean disabled;
private Boolean frozen;
private String team;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | Boolean | No | |
| auto_translation_language | String | No | |
| config_overrides | ChannelConfig | No | |
| custom | Map<String, Object> | No | |
| disabled | Boolean | No | |
| frozen | Boolean | No | |
| team | String | No |
ChannelExport
public class ChannelExport {
private String cid;
private String id;
private Double messages_since;
private Double messages_until;
private String type;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | No | |
| id | String | No | Channel ID |
| messages_since | Double | No | Date to export messages since |
| messages_until | Double | No | Date to export messages until |
| type | String | No | Channel type |
ChannelInput
public class ChannelInput {
private Boolean auto_translation_enabled;
private String auto_translation_language;
private ChannelConfig config_overrides;
private UserRequest created_by;
private String created_by_id;
private Map<String, Object> custom;
private Boolean disabled;
private List<String> filter_tags;
private Boolean frozen;
private List<ChannelMemberRequest> invites;
private List<ChannelMemberRequest> members;
private String team;
private String truncated_by_id;
}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 | Map<String, Object> | No | |
| disabled | Boolean | No | |
| filter_tags | List<String> | No | |
| frozen | Boolean | No | Freeze or unfreeze the channel |
| invites | List<ChannelMemberRequest> | No | |
| members | List<ChannelMemberRequest> | No | |
| team | String | No | Team the channel belongs to (if multi-tenant mode is enabled) |
| truncated_by_id | String | No |
ChannelInputRequest
public class ChannelInputRequest {
private Boolean auto_translation_enabled;
private String auto_translation_language;
private ConfigOverridesRequest config_overrides;
private UserRequest created_by;
private Map<String, Object> custom;
private Boolean disabled;
private Boolean frozen;
private List<ChannelMemberRequest> invites;
private List<ChannelMemberRequest> members;
private String team;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | Boolean | No | |
| auto_translation_language | String | No | |
| config_overrides | ConfigOverridesRequest | No | |
| created_by | UserRequest | No | |
| custom | Map<String, Object> | No | |
| disabled | Boolean | No | |
| frozen | Boolean | No | |
| invites | List<ChannelMemberRequest> | No | |
| members | List<ChannelMemberRequest> | No | |
| team | String | No |
ChannelMemberRequest
public class ChannelMemberRequest {
private String channel_role;
private Map<String, Object> custom;
private UserResponse user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | |
| channel_role | String | No | Role of the member in the channel |
| custom | Map<String, Object> | No | |
| user | UserResponse | No |
ChannelMemberResponse
public class ChannelMemberResponse {
private Double archived_at;
private Double ban_expires;
private Boolean banned;
private String channel_role;
private Double created_at;
private Map<String, Object> custom;
private Double deleted_at;
private List<String> deleted_messages;
private Double invite_accepted_at;
private Double invite_rejected_at;
private Boolean invited;
private Boolean is_moderator;
private Boolean notifications_muted;
private Double pinned_at;
private String role;
private Boolean shadow_banned;
private String status;
private Double updated_at;
private UserResponse user;
private String user_id;
}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 | Double | Yes | Date/time of creation |
| custom | Map<String, Object> | Yes | |
| notifications_muted | Boolean | Yes | |
| shadow_banned | Boolean | Yes | Whether member is shadow banned in this channel or not |
| updated_at | Double | Yes | Date/time of the last update |
| archived_at | Double | No | |
| ban_expires | Double | No | Expiration date of the ban |
| deleted_at | Double | No | |
| deleted_messages | List<String> | No | |
| invite_accepted_at | Double | No | Date when invite was accepted |
| invite_rejected_at | Double | 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 | Double | 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
public class ChannelMute {
private ChannelResponse channel;
private Double created_at;
private Double expires;
private Double updated_at;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | Date/time of creation |
| updated_at | Double | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel that is muted |
| expires | Double | No | Date/time of mute expiration |
| user | UserResponse | No | Owner of channel mute |
ChannelPushPreferencesResponse
public class ChannelPushPreferencesResponse {
private String chat_level;
private ChatPreferencesResponse chat_preferences;
private Double disabled_until;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| chat_level | String | No | |
| chat_preferences | ChatPreferencesResponse | No | |
| disabled_until | Double | No |
ChannelResponse
Represents channel in chat
public class ChannelResponse {
private Boolean auto_translation_enabled;
private String auto_translation_language;
private Boolean blocked;
private String cid;
private ChannelConfigWithInfo config;
private Integer cooldown;
private Double created_at;
private UserResponse created_by;
private Map<String, Object> custom;
private Double deleted_at;
private Boolean disabled;
private List<String> filter_tags;
private Boolean frozen;
private Boolean hidden;
private Double hide_messages_before;
private String id;
private Double last_message_at;
private Integer member_count;
private List<ChannelMemberResponse> members;
private Integer message_count;
private Double mute_expires_at;
private Boolean muted;
private List<ChannelOwnCapability> own_capabilities;
private String team;
private Double truncated_at;
private UserResponse truncated_by;
private String type;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | Yes | Channel CID (<type>:<id>) |
| created_at | Double | Yes | Date/time of creation |
| custom | Map<String, Object> | 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 | Double | 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 | Integer | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | Double | No | Date/time of deletion |
| filter_tags | List<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 | Double | No | Date since when the message history is accessible |
| last_message_at | Double | No | Date of the last message sent |
| member_count | Integer | No | Number of members in the channel |
| members | List<ChannelMemberResponse> | No | List of channel members (max 100) |
| message_count | Integer | No | Number of messages in the channel |
| mute_expires_at | Double | No | Date of mute expiration |
| muted | Boolean | No | Whether this channel is muted or not |
| own_capabilities | List<ChannelOwnCapability> | No | List of channel capabilities of authenticated user |
| team | String | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | Double | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChannelStateResponse
public class ChannelStateResponse {
private List<SharedLocationResponseData> active_live_locations;
private ChannelResponse channel;
private DraftResponse draft;
private String duration;
private Boolean hidden;
private Double hide_messages_before;
private List<ChannelMemberResponse> members;
private ChannelMemberResponse membership;
private List<MessageResponse> messages;
private List<PendingMessageResponse> pending_messages;
private List<MessageResponse> pinned_messages;
private ChannelPushPreferencesResponse push_preferences;
private List<ReadStateResponse> read;
private List<ThreadStateResponse> threads;
private Integer watcher_count;
private List<UserResponse> watchers;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| members | List<ChannelMemberResponse> | Yes | |
| messages | List<MessageResponse> | Yes | |
| pinned_messages | List<MessageResponse> | Yes | |
| threads | List<ThreadStateResponse> | Yes | |
| active_live_locations | List<SharedLocationResponseData> | No | |
| channel | ChannelResponse | No | |
| draft | DraftResponse | No | |
| hidden | Boolean | No | |
| hide_messages_before | Double | No | |
| membership | ChannelMemberResponse | No | |
| pending_messages | List<PendingMessageResponse> | No | |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | List<ReadStateResponse> | No | |
| watcher_count | Integer | No | |
| watchers | List<UserResponse> | No |
ChannelStateResponseFields
public class ChannelStateResponseFields {
private List<SharedLocationResponseData> active_live_locations;
private ChannelResponse channel;
private DraftResponse draft;
private Boolean hidden;
private Double hide_messages_before;
private List<ChannelMemberResponse> members;
private ChannelMemberResponse membership;
private List<MessageResponse> messages;
private List<PendingMessageResponse> pending_messages;
private List<MessageResponse> pinned_messages;
private ChannelPushPreferencesResponse push_preferences;
private List<ReadStateResponse> read;
private List<ThreadStateResponse> threads;
private Integer watcher_count;
private List<UserResponse> watchers;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| members | List<ChannelMemberResponse> | Yes | List of channel members |
| messages | List<MessageResponse> | Yes | List of channel messages |
| pinned_messages | List<MessageResponse> | Yes | List of pinned messages in the channel |
| threads | List<ThreadStateResponse> | Yes | |
| active_live_locations | List<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 | Double | No | Messages before this date are hidden from the user |
| membership | ChannelMemberResponse | No | Current user membership object |
| pending_messages | List<PendingMessageResponse> | No | Pending messages that this user has sent |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | List<ReadStateResponse> | No | List of read states |
| watcher_count | Integer | No | Number of channel watchers |
| watchers | List<UserResponse> | No | List of user who is watching the channel |
ChatPreferences
public class ChatPreferences {
private String channel_mentions;
private String default_preference;
private String direct_mentions;
private String distinct_channel_messages;
private String group_mentions;
private String here_mentions;
private String role_mentions;
private String thread_replies;
}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
public class Command {
private String args;
private Double created_at;
private String description;
private String name;
private String set;
private Double updated_at;
}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 | Double | No | Date/time of creation |
| updated_at | Double | No | Date/time of the last update |
ConfigOverridesRequest
Channel configuration overrides
public class ConfigOverridesRequest {
private String blocklist;
private String blocklist_behavior;
private ChatPreferences chat_preferences;
private List<String> commands;
private Boolean count_messages;
private Map<String, Object> grants;
private Integer max_message_length;
private String push_level;
private Boolean quotes;
private Boolean reactions;
private Boolean replies;
private Boolean shared_locations;
private Boolean typing_events;
private Boolean uploads;
private Boolean url_enrichment;
private Boolean user_message_reminders;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist | String | No | Blocklist name |
| blocklist_behavior | String | No | Blocklist behavior. One of: flag, block |
| chat_preferences | ChatPreferences | No | |
| commands | List<String> | No | List of available commands |
| count_messages | Boolean | No | Enable/disable message counting |
| grants | Map<String, Object> | No | Permission grants modifiers |
| max_message_length | Integer | No | Maximum message length |
| push_level | String | No | |
| 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
public class CreateChannelTypeResponse {
private List<String> allowed_flag_reasons;
private String automod;
private String automod_behavior;
private Thresholds automod_thresholds;
private String blocklist;
private String blocklist_behavior;
private List<BlockListOptions> blocklists;
private ChatPreferences chat_preferences;
private List<String> commands;
private Boolean connect_events;
private Boolean count_messages;
private Double created_at;
private Boolean custom_events;
private Boolean delivery_events;
private String duration;
private Map<String, Object> grants;
private Boolean mark_messages_pending;
private Integer max_message_length;
private Boolean mutes;
private String name;
private Integer partition_size;
private String partition_ttl;
private List<PolicyRequest> permissions;
private Boolean polls;
private String push_level;
private Boolean push_notifications;
private Boolean quotes;
private Boolean reactions;
private Boolean read_events;
private Boolean reminders;
private Boolean replies;
private Boolean search;
private Boolean shared_locations;
private Boolean skip_last_msg_update_for_system_msgs;
private Boolean typing_events;
private Double updated_at;
private Boolean uploads;
private Boolean url_enrichment;
private Boolean user_message_reminders;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | List<String> | Yes | |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Double | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| duration | String | Yes | |
| grants | Map<String, Object> | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Integer | Yes | |
| mutes | Boolean | Yes | |
| name | String | Yes | |
| permissions | List<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 | Double | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | List<String> | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | List<BlockListOptions> | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Integer | No | |
| partition_ttl | String | No | |
| push_level | String | No |
CreateCommandResponse
public class CreateCommandResponse {
private Command command;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| command | Command | No | Command object |
CustomEvent
public class CustomEvent {
private Double created_at;
private Map<String, Object> custom;
private Double received_at;
private String type;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| custom | Map<String, Object> | Yes | |
| type | String | Yes | |
| received_at | Double | No |
Data
public class Data {
private String id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes |
DeleteChannelResponse
Basic response information
public class DeleteChannelResponse {
private ChannelResponse channel;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| channel | ChannelResponse | No |
DeleteChannelsResponse
public class DeleteChannelsResponse {
private String duration;
private Map<String, Object> result;
private String task_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| result | Map<String, Object> | No | Map of channel IDs and their deletion results |
| task_id | String | No |
DeleteCommandResponse
public class DeleteCommandResponse {
private String duration;
private String name;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| name | String | Yes | Command name |
DeleteMessageResponse
Basic response information
public class DeleteMessageResponse {
private String duration;
private MessageResponse message;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes |
DeleteReactionResponse
Basic response information
public class DeleteReactionResponse {
private String duration;
private MessageResponse message;
private ReactionResponse reaction;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| reaction | ReactionResponse | Yes |
DeleteReminderResponse
Basic response information
public class DeleteReminderResponse {
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
DeleteRetentionPolicyResponse
Basic response information
public class DeleteRetentionPolicyResponse {
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
DeliveredMessagePayload
public class DeliveredMessagePayload {
private String cid;
private String id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | No | |
| id | String | No |
DraftResponse
public class DraftResponse {
private ChannelResponse channel;
private String channel_cid;
private Double created_at;
private DraftPayloadResponse message;
private String parent_id;
private MessageResponse parent_message;
private MessageResponse quoted_message;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Double | Yes | |
| message | DraftPayloadResponse | Yes | |
| channel | ChannelResponse | No | |
| parent_id | String | No | |
| parent_message | MessageResponse | No | |
| quoted_message | MessageResponse | No |
EventRequest
public class EventRequest {
private Map<String, Object> custom;
private String parent_id;
private String type;
private UserRequest user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | |
| custom | Map<String, Object> | No | |
| parent_id | String | No | |
| user | UserRequest | No | |
| user_id | String | No |
EventResponse
Basic response information
public class EventResponse {
private String duration;
private WSEvent event;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| event | WSEvent | Yes |
ExportChannelsResponse
public class ExportChannelsResponse {
private String duration;
private String task_id;
}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
public class FutureChannelBanResponse {
private UserResponse banned_by;
private Double created_at;
private Double expires;
private String reason;
private Boolean shadow;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| banned_by | UserResponse | No | |
| expires | Double | No | |
| reason | String | No | |
| shadow | Boolean | No | |
| user | UserResponse | No |
GetCampaignResponse
Basic response information
public class GetCampaignResponse {
private CampaignResponse campaign;
private String duration;
private PagerResponse users;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| campaign | CampaignResponse | No | |
| users | PagerResponse | No |
GetChannelTypeResponse
Basic response information
public class GetChannelTypeResponse {
private List<String> allowed_flag_reasons;
private String automod;
private String automod_behavior;
private Thresholds automod_thresholds;
private String blocklist;
private String blocklist_behavior;
private List<BlockListOptions> blocklists;
private ChatPreferences chat_preferences;
private List<Command> commands;
private Boolean connect_events;
private Boolean count_messages;
private Double created_at;
private Boolean custom_events;
private Boolean delivery_events;
private String duration;
private Map<String, Object> grants;
private Boolean mark_messages_pending;
private Integer max_message_length;
private Boolean mutes;
private String name;
private Integer partition_size;
private String partition_ttl;
private List<PolicyRequest> permissions;
private Boolean polls;
private String push_level;
private Boolean push_notifications;
private Boolean quotes;
private Boolean reactions;
private Boolean read_events;
private Boolean reminders;
private Boolean replies;
private Boolean search;
private Boolean shared_locations;
private Boolean skip_last_msg_update_for_system_msgs;
private Boolean typing_events;
private Double updated_at;
private Boolean uploads;
private Boolean url_enrichment;
private Boolean user_message_reminders;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | List<Command> | Yes | |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Double | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
| grants | Map<String, Object> | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Integer | Yes | |
| mutes | Boolean | Yes | |
| name | String | Yes | |
| permissions | List<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 | Double | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | List<String> | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | List<BlockListOptions> | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Integer | No | |
| partition_ttl | String | No | |
| push_level | String | No |
GetCommandResponse
public class GetCommandResponse {
private String args;
private Double created_at;
private String description;
private String duration;
private String name;
private String set;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| args | String | Yes | |
| description | String | Yes | |
| duration | String | Yes | |
| name | String | Yes | |
| set | String | Yes | |
| created_at | Double | No | |
| updated_at | Double | No |
GetDraftResponse
Basic response information
public class GetDraftResponse {
private DraftResponse draft;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| draft | DraftResponse | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
GetManyMessagesResponse
public class GetManyMessagesResponse {
private String duration;
private List<MessageResponse> messages;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| messages | List<MessageResponse> | Yes | List of messages |
GetMessageResponse
Basic response information
public class GetMessageResponse {
private String duration;
private MessageWithChannelResponse message;
private Map<String, Object> pending_message_metadata;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageWithChannelResponse | Yes | |
| pending_message_metadata | Map<String, Object> | No |
GetReactionsResponse
public class GetReactionsResponse {
private String duration;
private List<ReactionResponse> reactions;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| reactions | List<ReactionResponse> | Yes | List of reactions |
GetRepliesResponse
Basic response information
public class GetRepliesResponse {
private String duration;
private List<MessageResponse> messages;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| messages | List<MessageResponse> | Yes |
GetRetentionPolicyResponse
Basic response information
public class GetRetentionPolicyResponse {
private String duration;
private List<RetentionPolicy> policies;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| policies | List<RetentionPolicy> | Yes |
GetRetentionPolicyRunsResponse
Basic response information
public class GetRetentionPolicyRunsResponse {
private String duration;
private String next;
private String prev;
private List<RetentionRunResponse> runs;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| runs | List<RetentionRunResponse> | Yes | |
| next | String | No | |
| prev | String | No |
GetSegmentResponse
public class GetSegmentResponse {
private String duration;
private SegmentResponse segment;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| segment | SegmentResponse | No | Segment |
GetThreadResponse
public class GetThreadResponse {
private String duration;
private ThreadStateResponse thread;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| thread | ThreadStateResponse | Yes | Enriched thread state |
HideChannelResponse
Basic response information
public class HideChannelResponse {
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
ImageSize
public class ImageSize {
private String crop;
private Integer height;
private String resize;
private Integer width;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | String | No | Crop mode. One of: top, bottom, left, right, center |
| height | Integer | No | Target image height |
| resize | String | No | Resize method. One of: clip, crop, scale, fill |
| width | Integer | No | Target image width |
LabelThresholds
public class LabelThresholds {
private Double block;
private Double flag;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| block | Double | No | Threshold for automatic message block |
| flag | Double | No | Threshold for automatic message flag |
ListChannelTypesResponse
public class ListChannelTypesResponse {
private Map<String, Object> channel_types;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_types | Map<String, Object> | Yes | Object with all channel types |
| duration | String | Yes |
ListCommandsResponse
public class ListCommandsResponse {
private List<Command> commands;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| commands | List<Command> | Yes | List of commands |
| duration | String | Yes |
MarkDeliveredResponse
Basic response information
public class MarkDeliveredResponse {
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
MarkReadResponse
public class MarkReadResponse {
private String duration;
private MarkReadResponseEvent event;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| event | MarkReadResponseEvent | No | Mark read event |
MarkReadResponseEvent
public class MarkReadResponseEvent {
private ChannelResponse channel;
private String channel_id;
private Double channel_last_message_at;
private String channel_type;
private String cid;
private Double created_at;
private String last_read_message_id;
private String team;
private ThreadResponse thread;
private String type;
private UserResponseCommonFields user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | String | Yes | |
| channel_type | String | Yes | |
| cid | String | Yes | |
| created_at | Double | Yes | |
| type | String | Yes | |
| channel | ChannelResponse | No | |
| channel_last_message_at | Double | No | |
| last_read_message_id | String | No | |
| team | String | No | |
| thread | ThreadResponse | No | |
| user | UserResponseCommonFields | No |
MembersResponse
public class MembersResponse {
private String duration;
private List<ChannelMemberResponse> members;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| members | List<ChannelMemberResponse> | Yes | List of found members |
MessageActionResponse
Basic response information
public class MessageActionResponse {
private String duration;
private MessageResponse message;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | No |
MessageFlagResponse
public class MessageFlagResponse {
private Double approved_at;
private Double created_at;
private Boolean created_by_automod;
private Map<String, Object> custom;
private FlagDetailsResponse details;
private MessageResponse message;
private FlagFeedbackResponse moderation_feedback;
private MessageModerationResult moderation_result;
private String reason;
private Double rejected_at;
private Double reviewed_at;
private UserResponse reviewed_by;
private Double updated_at;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| created_by_automod | Boolean | Yes | |
| updated_at | Double | Yes | |
| approved_at | Double | No | |
| custom | Map<String, Object> | No | |
| details | FlagDetailsResponse | No | |
| message | MessageResponse | No | |
| moderation_feedback | FlagFeedbackResponse | No | |
| moderation_result | MessageModerationResult | No | |
| reason | String | No | |
| rejected_at | Double | No | |
| reviewed_at | Double | No | |
| reviewed_by | UserResponse | No | |
| user | UserResponse | No |
MessageHistoryEntryResponse
public class MessageHistoryEntryResponse {
private Map<String, Object> Custom;
private List<Attachment> attachments;
private Boolean is_deleted;
private String message_id;
private Double message_updated_at;
private String message_updated_by_id;
private String text;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Custom | Map<String, Object> | Yes | |
| attachments | List<Attachment> | Yes | |
| is_deleted | Boolean | Yes | |
| message_id | String | Yes | |
| message_updated_at | Double | Yes | |
| message_updated_by_id | String | Yes | |
| text | String | Yes |
MessagePaginationParams
public class MessagePaginationParams {
private Double created_at_after;
private Double created_at_after_or_equal;
private Double created_at_around;
private Double created_at_before;
private Double created_at_before_or_equal;
private String id_around;
private String id_gt;
private String id_gte;
private String id_lt;
private String id_lte;
private Integer limit;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at_after | Double | No | The timestamp to get messages with a created_at timestamp greater than |
| created_at_after_or_equal | Double | No | The timestamp to get messages with a created_at timestamp greater than or equ... |
| created_at_around | Double | No | The result will be a set of messages, that are both older and newer than the ... |
| created_at_before | Double | No | The timestamp to get messages with a created_at timestamp smaller than |
| created_at_before_or_equal | Double | 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 | Integer | No | The maximum number of messages to return (max limit |
MessageRequest
Message data for creating or updating a message
public class MessageRequest {
private List<Attachment> attachments;
private Map<String, Object> custom;
private String html;
private String id;
private Boolean mentioned_channel;
private List<String> mentioned_group_ids;
private Boolean mentioned_here;
private List<String> mentioned_roles;
private List<String> mentioned_users;
private String mml;
private String parent_id;
private Double pin_expires;
private Boolean pinned;
private String pinned_at;
private String poll_id;
private String quoted_message_id;
private List<String> restricted_visibility;
private SharedLocation shared_location;
private Boolean show_in_channel;
private Boolean silent;
private String text;
private String type;
private UserRequest user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List<Attachment> | No | Array of message attachments |
| custom | Map<String, Object> | 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 | List<String> | No | List of user group IDs to mention. Group members who are also channel members... |
| mentioned_here | Boolean | No | |
| mentioned_roles | List<String> | No | |
| mentioned_users | List<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 | Double | 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 | List<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 | String | No | Contains type of the message. One of: regular, system |
| user | UserRequest | No | |
| user_id | String | No |
MessageResponse
Represents any chat message
public class MessageResponse {
private List<Attachment> attachments;
private String cid;
private String command;
private Double created_at;
private Map<String, Object> custom;
private Double deleted_at;
private Boolean deleted_for_me;
private Integer deleted_reply_count;
private DraftResponse draft;
private String html;
private Map<String, Object> i18n;
private String id;
private Map<String, Object> image_labels;
private List<ReactionResponse> latest_reactions;
private ChannelMemberResponse member;
private Boolean mentioned_channel;
private List<String> mentioned_group_ids;
private Boolean mentioned_here;
private List<String> mentioned_roles;
private List<UserResponse> mentioned_users;
private Double message_text_updated_at;
private String mml;
private ModerationV2Response moderation;
private List<ReactionResponse> own_reactions;
private String parent_id;
private Double pin_expires;
private Boolean pinned;
private Double pinned_at;
private UserResponse pinned_by;
private PollResponseData poll;
private String poll_id;
private MessageResponse quoted_message;
private String quoted_message_id;
private Map<String, Object> reaction_counts;
private Map<String, Object> reaction_groups;
private Map<String, Object> reaction_scores;
private ReminderResponseData reminder;
private Integer reply_count;
private List<String> restricted_visibility;
private Boolean shadowed;
private SharedLocationResponseData shared_location;
private Boolean show_in_channel;
private Boolean silent;
private String text;
private List<UserResponse> thread_participants;
private String type;
private Double updated_at;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List<Attachment> | Yes | Array of message attachments |
| cid | String | Yes | Channel unique identifier in <type>:<id> format |
| created_at | Double | Yes | Date/time of creation |
| custom | Map<String, Object> | Yes | |
| deleted_reply_count | Integer | 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 | List<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 | List<UserResponse> | Yes | List of mentioned users |
| own_reactions | List<ReactionResponse> | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | Boolean | Yes | Whether message is pinned or not |
| reaction_counts | Map<String, Object> | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Map<String, Object> | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | Integer | Yes | Number of replies to this message |
| restricted_visibility | List<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 | Double | 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 | Double | No | Date/time of deletion |
| deleted_for_me | Boolean | No | |
| draft | DraftResponse | No | |
| i18n | Map<String, Object> | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Map<String, Object> | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | List<String> | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | List<String> | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | Double | 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 | Double | No | Date when pinned message expires |
| pinned_at | Double | 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 | Map<String, Object> | 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 | List<UserResponse> | No | List of users who participate in thread |
MessageWithChannelResponse
Represents any chat message
public class MessageWithChannelResponse {
private List<Attachment> attachments;
private ChannelResponse channel;
private String cid;
private String command;
private Double created_at;
private Map<String, Object> custom;
private Double deleted_at;
private Boolean deleted_for_me;
private Integer deleted_reply_count;
private DraftResponse draft;
private String html;
private Map<String, Object> i18n;
private String id;
private Map<String, Object> image_labels;
private List<ReactionResponse> latest_reactions;
private ChannelMemberResponse member;
private Boolean mentioned_channel;
private List<String> mentioned_group_ids;
private Boolean mentioned_here;
private List<String> mentioned_roles;
private List<UserResponse> mentioned_users;
private Double message_text_updated_at;
private String mml;
private ModerationV2Response moderation;
private List<ReactionResponse> own_reactions;
private String parent_id;
private Double pin_expires;
private Boolean pinned;
private Double pinned_at;
private UserResponse pinned_by;
private PollResponseData poll;
private String poll_id;
private MessageResponse quoted_message;
private String quoted_message_id;
private Map<String, Object> reaction_counts;
private Map<String, Object> reaction_groups;
private Map<String, Object> reaction_scores;
private ReminderResponseData reminder;
private Integer reply_count;
private List<String> restricted_visibility;
private Boolean shadowed;
private SharedLocationResponseData shared_location;
private Boolean show_in_channel;
private Boolean silent;
private String text;
private List<UserResponse> thread_participants;
private String type;
private Double updated_at;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List<Attachment> | Yes | Array of message attachments |
| channel | ChannelResponse | Yes | Channel object |
| cid | String | Yes | Channel unique identifier in <type>:<id> format |
| created_at | Double | Yes | Date/time of creation |
| custom | Map<String, Object> | Yes | |
| deleted_reply_count | Integer | 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 | List<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 | List<UserResponse> | Yes | List of mentioned users |
| own_reactions | List<ReactionResponse> | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | Boolean | Yes | Whether message is pinned or not |
| reaction_counts | Map<String, Object> | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Map<String, Object> | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | Integer | Yes | Number of replies to this message |
| restricted_visibility | List<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 | Double | 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 | Double | No | Date/time of deletion |
| deleted_for_me | Boolean | No | |
| draft | DraftResponse | No | |
| i18n | Map<String, Object> | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Map<String, Object> | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | List<String> | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | List<String> | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | Double | 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 | Double | No | Date when pinned message expires |
| pinned_at | Double | 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 | Map<String, Object> | 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 | List<UserResponse> | No | List of users who participate in thread |
MuteChannelResponse
public class MuteChannelResponse {
private ChannelMute channel_mute;
private List<ChannelMute> channel_mutes;
private String duration;
private OwnUserResponse own_user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| channel_mute | ChannelMute | No | Object with channel mute (if one channel was muted) |
| channel_mutes | List<ChannelMute> | No | Object with mutes (if multiple channels were muted) |
| own_user | OwnUserResponse | No | Authorized user object with fresh mutes information |
OnlyUserID
public class OnlyUserID {
private String id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes |
OwnUserResponse
public class OwnUserResponse {
private Integer avg_response_time;
private Boolean banned;
private List<String> blocked_user_ids;
private List<ChannelMute> channel_mutes;
private Double created_at;
private Map<String, Object> custom;
private Double deactivated_at;
private Double deleted_at;
private List<DeviceResponse> devices;
private String id;
private String image;
private Boolean invisible;
private String language;
private Double last_active;
private List<String> latest_hidden_channels;
private List<UserMuteResponse> mutes;
private String name;
private Boolean online;
private PrivacySettingsResponse privacy_settings;
private PushPreferencesResponse push_preferences;
private Double revoke_tokens_issued_before;
private String role;
private List<String> teams;
private Map<String, Object> teams_role;
private Integer total_unread_count;
private Map<String, Object> total_unread_count_by_team;
private Integer unread_channels;
private Integer unread_count;
private Integer unread_threads;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Boolean | Yes | |
| channel_mutes | List<ChannelMute> | Yes | |
| created_at | Double | Yes | |
| custom | Map<String, Object> | Yes | |
| devices | List<DeviceResponse> | Yes | |
| id | String | Yes | |
| invisible | Boolean | Yes | |
| language | String | Yes | |
| mutes | List<UserMuteResponse> | Yes | |
| online | Boolean | Yes | |
| role | String | Yes | |
| teams | List<String> | Yes | |
| total_unread_count | Integer | Yes | |
| unread_channels | Integer | Yes | |
| unread_count | Integer | Yes | |
| unread_threads | Integer | Yes | |
| updated_at | Double | Yes | |
| avg_response_time | Integer | No | |
| blocked_user_ids | List<String> | No | |
| deactivated_at | Double | No | |
| deleted_at | Double | No | |
| image | String | No | |
| last_active | Double | No | |
| latest_hidden_channels | List<String> | No | |
| name | String | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | Double | No | |
| teams_role | Map<String, Object> | No | |
| total_unread_count_by_team | Map<String, Object> | No |
PagerResponse
public class PagerResponse {
private String next;
private String prev;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | String | No | |
| prev | String | No |
PaginationParams
public class PaginationParams {
private Integer limit;
private Integer offset;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | Integer | No | |
| offset | Integer | No |
ParsedPredefinedFilterResponse
public class ParsedPredefinedFilterResponse {
private Map<String, Object> filter;
private String name;
private List<SortParamRequest> sort;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| filter | Map<String, Object> | Yes | |
| name | String | Yes | |
| sort | List<SortParamRequest> | No |
PendingMessageResponse
public class PendingMessageResponse {
private ChannelResponse channel;
private MessageResponse message;
private Map<String, Object> metadata;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| metadata | Map<String, Object> | No | |
| user | UserResponse | No |
Policy
public class Policy {
private Integer action;
private Double created_at;
private String name;
private Boolean owner;
private Integer priority;
private List<String> resources;
private List<String> roles;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | Integer | Yes | |
| created_at | Double | Yes | |
| name | String | Yes | |
| owner | Boolean | Yes | |
| priority | Integer | Yes | |
| resources | List<String> | Yes | |
| roles | List<String> | Yes | |
| updated_at | Double | Yes |
PolicyRequest
Policy request
public class PolicyRequest {
private String action;
private String name;
private Boolean owner;
private Integer priority;
private List<String> resources;
private List<String> roles;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String | Yes | |
| name | String | Yes | User-friendly policy name |
| owner | Boolean | Yes | Whether policy applies to resource owner or not |
| priority | Integer | Yes | Policy priority |
| resources | List<String> | Yes | List of resources to apply policy to |
| roles | List<String> | Yes | List of roles to apply policy to |
PollResponseData
public class PollResponseData {
private Boolean allow_answers;
private Boolean allow_user_suggested_options;
private Integer answers_count;
private Double created_at;
private UserResponse created_by;
private String created_by_id;
private Map<String, Object> custom;
private String description;
private Boolean enforce_unique_vote;
private String id;
private Boolean is_closed;
private List<PollVoteResponseData> latest_answers;
private Map<String, Object> latest_votes_by_option;
private Integer max_votes_allowed;
private String name;
private List<PollOptionResponseData> options;
private List<PollVoteResponseData> own_votes;
private Double updated_at;
private Integer vote_count;
private Map<String, Object> vote_counts_by_option;
private String voting_visibility;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | Boolean | Yes | |
| allow_user_suggested_options | Boolean | Yes | |
| answers_count | Integer | Yes | |
| created_at | Double | Yes | |
| created_by_id | String | Yes | |
| custom | Map<String, Object> | Yes | |
| description | String | Yes | |
| enforce_unique_vote | Boolean | Yes | |
| id | String | Yes | |
| latest_answers | List<PollVoteResponseData> | Yes | |
| latest_votes_by_option | Map<String, Object> | Yes | |
| name | String | Yes | |
| options | List<PollOptionResponseData> | Yes | |
| own_votes | List<PollVoteResponseData> | Yes | |
| updated_at | Double | Yes | |
| vote_count | Integer | Yes | |
| vote_counts_by_option | Map<String, Object> | Yes | |
| voting_visibility | String | Yes | |
| created_by | UserResponse | No | |
| is_closed | Boolean | No | |
| max_votes_allowed | Integer | No |
PollVoteResponse
public class PollVoteResponse {
private String duration;
private PollResponseData poll;
private PollVoteResponseData vote;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | No | Poll |
| vote | PollVoteResponseData | No | Poll vote |
PollVoteResponseData
public class PollVoteResponseData {
private String answer_text;
private Double created_at;
private String id;
private Boolean is_answer;
private String option_id;
private String poll_id;
private Double updated_at;
private UserResponse user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| id | String | Yes | |
| option_id | String | Yes | |
| poll_id | String | Yes | |
| updated_at | Double | Yes | |
| answer_text | String | No | |
| is_answer | Boolean | No | |
| user | UserResponse | No | |
| user_id | String | No |
PrivacySettingsResponse
public class PrivacySettingsResponse {
private DeliveryReceiptsResponse delivery_receipts;
private ReadReceiptsResponse read_receipts;
private TypingIndicatorsResponse typing_indicators;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
QueryBannedUsersResponse
public class QueryBannedUsersResponse {
private List<BanResponse> bans;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bans | List<BanResponse> | Yes | List of found bans |
| duration | String | Yes | Duration of the request in milliseconds |
QueryCampaignsResponse
Basic response information
public class QueryCampaignsResponse {
private List<CampaignResponse> campaigns;
private String duration;
private String next;
private String prev;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| campaigns | List<CampaignResponse> | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
| next | String | No | |
| prev | String | No |
QueryChannelsResponse
public class QueryChannelsResponse {
private List<ChannelStateResponseFields> channels;
private String duration;
private ParsedPredefinedFilterResponse predefined_filter;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channels | List<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
public class QueryDraftsResponse {
private List<DraftResponse> drafts;
private String duration;
private String next;
private String prev;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| drafts | List<DraftResponse> | Yes | Drafts |
| duration | String | Yes | Duration of the request in milliseconds |
| next | String | No | |
| prev | String | No |
QueryFutureChannelBansResponse
public class QueryFutureChannelBansResponse {
private List<FutureChannelBanResponse> bans;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bans | List<FutureChannelBanResponse> | Yes | List of found future channel bans |
| duration | String | Yes | Duration of the request in milliseconds |
QueryMessageFlagsResponse
Query message flags response
public class QueryMessageFlagsResponse {
private String duration;
private List<MessageFlagResponse> flags;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| flags | List<MessageFlagResponse> | Yes | The flags that match the query |
QueryMessageHistoryResponse
public class QueryMessageHistoryResponse {
private String duration;
private List<MessageHistoryEntryResponse> message_history;
private String next;
private String prev;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message_history | List<MessageHistoryEntryResponse> | Yes | Message history entries |
| next | String | No | |
| prev | String | No |
QueryReactionsResponse
Basic response information
public class QueryReactionsResponse {
private String duration;
private String next;
private String prev;
private List<ReactionResponse> reactions;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| reactions | List<ReactionResponse> | Yes | |
| next | String | No | |
| prev | String | No |
QueryRemindersResponse
public class QueryRemindersResponse {
private String duration;
private String next;
private String prev;
private List<ReminderResponseData> reminders;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| reminders | List<ReminderResponseData> | Yes | MessageReminders data returned by the query |
| next | String | No | |
| prev | String | No |
QuerySegmentTargetsResponse
public class QuerySegmentTargetsResponse {
private String duration;
private String next;
private String prev;
private List<SegmentTargetResponse> targets;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| targets | List<SegmentTargetResponse> | Yes | Targets |
| next | String | No | |
| prev | String | No |
QuerySegmentsResponse
public class QuerySegmentsResponse {
private String duration;
private String next;
private String prev;
private List<SegmentResponse> segments;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| segments | List<SegmentResponse> | Yes | Segments |
| next | String | No | |
| prev | String | No |
QueryTeamUsageStatsResponse
Response containing team-level usage statistics
public class QueryTeamUsageStatsResponse {
private String duration;
private String next;
private List<TeamUsageStats> teams;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| teams | List<TeamUsageStats> | Yes | Array of team usage statistics |
| next | String | No | Cursor for pagination to fetch next page |
QueryThreadsResponse
public class QueryThreadsResponse {
private String duration;
private String next;
private String prev;
private List<ThreadStateResponse> threads;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| threads | List<ThreadStateResponse> | Yes | List of enriched thread states |
| next | String | No | |
| prev | String | No |
Reaction
public class Reaction {
private String activity_id;
private Map<String, Object> children_counts;
private Double created_at;
private Map<String, Object> data;
private Double deleted_at;
private String id;
private String kind;
private Map<String, Object> latest_children;
private Map<String, Object> moderation;
private Map<String, Object> own_children;
private String parent;
private Double score;
private List<String> target_feeds;
private Map<String, Object> target_feeds_extra_data;
private Double updated_at;
private User user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | |
| created_at | Double | Yes | |
| kind | String | Yes | |
| updated_at | Double | Yes | |
| user_id | String | Yes | |
| children_counts | Map<String, Object> | No | |
| data | Map<String, Object> | No | |
| deleted_at | Double | No | |
| id | String | No | |
| latest_children | Map<String, Object> | No | |
| moderation | Map<String, Object> | No | |
| own_children | Map<String, Object> | No | |
| parent | String | No | |
| score | Double | No | |
| target_feeds | List<String> | No | |
| target_feeds_extra_data | Map<String, Object> | No | |
| user | User | No |
ReactionRequest
Represents user reaction to a message
public class ReactionRequest {
private Double created_at;
private Map<String, Object> custom;
private Integer score;
private String type;
private Double updated_at;
private UserRequest user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | The type of reaction (e.g. 'like', 'laugh', 'wow') |
| created_at | Double | No | Date/time of creation |
| custom | Map<String, Object> | No | |
| score | Integer | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | Double | No | Date/time of the last update |
| user | UserRequest | No | |
| user_id | String | No |
ReactionResponse
public class ReactionResponse {
private Double created_at;
private Map<String, Object> custom;
private String message_id;
private Integer score;
private String type;
private Double updated_at;
private UserResponse user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | Date/time of creation |
| custom | Map<String, Object> | Yes | Custom data for this object |
| message_id | String | Yes | Message ID |
| score | Integer | Yes | Score of the reaction |
| type | String | Yes | Type of reaction |
| updated_at | Double | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | String | Yes | User ID |
ReadStateResponse
public class ReadStateResponse {
private Double last_delivered_at;
private String last_delivered_message_id;
private Double last_read;
private String last_read_message_id;
private Integer unread_messages;
private UserResponse user;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | Double | Yes | |
| unread_messages | Integer | Yes | |
| user | UserResponse | Yes | |
| last_delivered_at | Double | No | |
| last_delivered_message_id | String | No | |
| last_read_message_id | String | No |
ReminderResponseData
public class ReminderResponseData {
private ChannelResponse channel;
private String channel_cid;
private Double created_at;
private MessageResponse message;
private String message_id;
private Double remind_at;
private Double updated_at;
private UserResponse user;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Double | Yes | |
| message_id | String | Yes | |
| updated_at | Double | Yes | |
| user_id | String | Yes | |
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| remind_at | Double | No | |
| user | UserResponse | No |
Response
Basic response information
public class Response {
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
RetentionPolicy
public class RetentionPolicy {
private Integer app_pk;
private PolicyConfig config;
private Double enabled_at;
private String policy;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | Integer | Yes | |
| config | PolicyConfig | Yes | |
| enabled_at | Double | Yes | |
| policy | String | Yes |
RetentionRunResponse
public class RetentionRunResponse {
private Integer app_pk;
private String date;
private String policy;
private RunStats stats;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | Integer | Yes | |
| date | String | Yes | |
| policy | String | Yes | |
| stats | RunStats | Yes |
SearchResponse
public class SearchResponse {
private String duration;
private String next;
private String previous;
private List<SearchResult> results;
private SearchWarning results_warning;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| results | List<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
public class SearchResult {
private SearchResultMessage message;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| message | SearchResultMessage | No | Found message |
SearchWarning
public class SearchWarning {
private List<String> channel_search_cids;
private Integer channel_search_count;
private Integer warning_code;
private String warning_description;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| warning_code | Integer | Yes | Code corresponding to the warning |
| warning_description | String | Yes | Description of the warning |
| channel_search_cids | List<String> | No | Channel CIDs for the searched channels |
| channel_search_count | Integer | No | Number of channels searched |
Segment
public class Segment {
private Boolean all_sender_channels;
private Boolean all_users;
private Double created_at;
private Double deleted_at;
private String description;
private Map<String, Object> filter;
private String id;
private String name;
private Integer size;
private String task_id;
private String type;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | Boolean | Yes | |
| all_users | Boolean | Yes | |
| created_at | Double | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| size | Integer | Yes | |
| type | String | Yes | |
| updated_at | Double | Yes | |
| deleted_at | Double | No | |
| description | String | No | |
| filter | Map<String, Object> | No | |
| task_id | String | No |
SegmentResponse
public class SegmentResponse {
private Boolean all_sender_channels;
private Boolean all_users;
private Double created_at;
private Double deleted_at;
private String description;
private Map<String, Object> filter;
private String id;
private String name;
private Integer size;
private String type;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | Boolean | Yes | |
| all_users | Boolean | Yes | |
| created_at | Double | Yes | |
| deleted_at | Double | Yes | |
| description | String | Yes | |
| filter | Map<String, Object> | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| size | Integer | Yes | |
| type | String | Yes | |
| updated_at | Double | Yes |
SegmentTargetResponse
public class SegmentTargetResponse {
private Integer app_pk;
private Double created_at;
private String segment_id;
private String target_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | Integer | Yes | |
| created_at | Double | Yes | |
| segment_id | String | Yes | |
| target_id | String | Yes |
SendMessageResponse
public class SendMessageResponse {
private String duration;
private MessageResponse message;
private Map<String, Object> 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 | Map<String, Object> | No | Pending message metadata |
SendReactionResponse
Basic response information
public class SendReactionResponse {
private String duration;
private MessageResponse message;
private ReactionResponse reaction;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| reaction | ReactionResponse | Yes |
SetRetentionPolicyResponse
Basic response information
public class SetRetentionPolicyResponse {
private String duration;
private RetentionPolicy policy;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| policy | RetentionPolicy | Yes |
SharedLocation
public class SharedLocation {
private String created_by_device_id;
private Double end_at;
private Double latitude;
private Double longitude;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | Double | Yes | |
| longitude | Double | Yes | |
| created_by_device_id | String | No | |
| end_at | Double | No |
SharedLocationResponseData
public class SharedLocationResponseData {
private ChannelResponse channel;
private String channel_cid;
private Double created_at;
private String created_by_device_id;
private Double end_at;
private Double latitude;
private Double longitude;
private MessageResponse message;
private String message_id;
private Double updated_at;
private String user_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Double | Yes | |
| created_by_device_id | String | Yes | |
| latitude | Double | Yes | |
| longitude | Double | Yes | |
| message_id | String | Yes | |
| updated_at | Double | Yes | |
| user_id | String | Yes | |
| channel | ChannelResponse | No | |
| end_at | Double | No | |
| message | MessageResponse | No |
ShowChannelResponse
Basic response information
public class ShowChannelResponse {
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
SortParamRequest
public class SortParamRequest {
private Integer direction;
private String field;
private String type;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | Integer | 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
public class StartCampaignResponse {
private CampaignResponse campaign;
private String duration;
private PagerResponse users;
}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
public class TeamUsageStats {
private MetricStats concurrent_connections;
private MetricStats concurrent_users;
private MetricStats image_moderations_daily;
private MetricStats messages_daily;
private MetricStats messages_last_24_hours;
private MetricStats messages_last_30_days;
private MetricStats messages_month_to_date;
private MetricStats messages_total;
private String team;
private MetricStats translations_daily;
private MetricStats users_daily;
private MetricStats users_engaged_last_30_days;
private MetricStats users_engaged_month_to_date;
private MetricStats users_last_24_hours;
private MetricStats users_last_30_days;
private MetricStats users_month_to_date;
private MetricStats users_total;
}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
public class ThreadResponse {
private Integer active_participant_count;
private ChannelResponse channel;
private String channel_cid;
private Double created_at;
private UserResponse created_by;
private String created_by_user_id;
private Map<String, Object> custom;
private Double deleted_at;
private Double last_message_at;
private MessageResponse parent_message;
private String parent_message_id;
private Integer participant_count;
private Integer reply_count;
private List<ThreadParticipant> thread_participants;
private String title;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | Integer | Yes | Active Participant Count |
| channel_cid | String | Yes | Channel CID |
| created_at | Double | Yes | Date/time of creation |
| created_by_user_id | String | Yes | Created By User ID |
| custom | Map<String, Object> | Yes | Custom data for this object |
| parent_message_id | String | Yes | Parent Message ID |
| participant_count | Integer | Yes | Participant Count |
| title | String | Yes | Title |
| updated_at | Double | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | Double | No | Deleted At |
| last_message_at | Double | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| reply_count | Integer | No | Reply Count |
| thread_participants | List<ThreadParticipant> | No | Thread Participants |
ThreadStateResponse
public class ThreadStateResponse {
private Integer active_participant_count;
private ChannelResponse channel;
private String channel_cid;
private Double created_at;
private UserResponse created_by;
private String created_by_user_id;
private Map<String, Object> custom;
private Double deleted_at;
private DraftResponse draft;
private Double last_message_at;
private List<MessageResponse> latest_replies;
private MessageResponse parent_message;
private String parent_message_id;
private Integer participant_count;
private List<ReadStateResponse> read;
private Integer reply_count;
private List<ThreadParticipant> thread_participants;
private String title;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | Integer | Yes | Active Participant Count |
| channel_cid | String | Yes | Channel CID |
| created_at | Double | Yes | Date/time of creation |
| created_by_user_id | String | Yes | Created By User ID |
| custom | Map<String, Object> | Yes | Custom data for this object |
| latest_replies | List<MessageResponse> | Yes | |
| parent_message_id | String | Yes | Parent Message ID |
| participant_count | Integer | Yes | Participant Count |
| title | String | Yes | Title |
| updated_at | Double | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | Double | No | Deleted At |
| draft | DraftResponse | No | |
| last_message_at | Double | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| read | List<ReadStateResponse> | No | |
| reply_count | Integer | No | Reply Count |
| thread_participants | List<ThreadParticipant> | No | Thread Participants |
Thresholds
Sets thresholds for AI moderation
public class Thresholds {
private LabelThresholds explicit;
private LabelThresholds spam;
private LabelThresholds toxic;
}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
public class Time {
}Timestamp
public class Timestamp {
private Double Time;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Time | Double | No |
TruncateChannelResponse
public class TruncateChannelResponse {
private ChannelResponse channel;
private String duration;
private MessageResponse message;
}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
public class UndeleteMessageResponse {
private String duration;
private MessageResponse message;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes |
UnmuteResponse
public class UnmuteResponse {
private String duration;
private List<String> non_existing_users;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| non_existing_users | List<String> | No | A list of users that can't be found. Common cause for this is deleted users |
UnreadCountsBatchResponse
Basic response information
public class UnreadCountsBatchResponse {
private Map<String, Object> counts_by_user;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| counts_by_user | Map<String, Object> | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
UnreadCountsChannel
public class UnreadCountsChannel {
private String channel_id;
private Double last_read;
private Integer unread_count;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | String | Yes | |
| last_read | Double | Yes | |
| unread_count | Integer | Yes |
UnreadCountsChannelType
public class UnreadCountsChannelType {
private Integer channel_count;
private String channel_type;
private Integer unread_count;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_count | Integer | Yes | |
| channel_type | String | Yes | |
| unread_count | Integer | Yes |
UnreadCountsThread
public class UnreadCountsThread {
private Double last_read;
private String last_read_message_id;
private String parent_message_id;
private Integer unread_count;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | Double | Yes | |
| last_read_message_id | String | Yes | |
| parent_message_id | String | Yes | |
| unread_count | Integer | Yes |
UpdateChannelPartialResponse
public class UpdateChannelPartialResponse {
private ChannelResponse channel;
private String duration;
private List<ChannelMemberResponse> members;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| members | List<ChannelMemberResponse> | Yes | List of updated members |
| channel | ChannelResponse | No | Updated channel object |
UpdateChannelResponse
public class UpdateChannelResponse {
private ChannelResponse channel;
private String duration;
private List<ChannelMemberResponse> members;
private MessageResponse message;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| members | List<ChannelMemberResponse> | Yes | List of channel members |
| channel | ChannelResponse | No | Updated channel |
| message | MessageResponse | No | Message sent to the chat |
UpdateChannelTypeResponse
public class UpdateChannelTypeResponse {
private List<String> allowed_flag_reasons;
private String automod;
private String automod_behavior;
private Thresholds automod_thresholds;
private String blocklist;
private String blocklist_behavior;
private List<BlockListOptions> blocklists;
private ChatPreferences chat_preferences;
private List<String> commands;
private Boolean connect_events;
private Boolean count_messages;
private Double created_at;
private Boolean custom_events;
private Boolean delivery_events;
private String duration;
private Map<String, Object> grants;
private Boolean mark_messages_pending;
private Integer max_message_length;
private Boolean mutes;
private String name;
private Integer partition_size;
private String partition_ttl;
private List<PolicyRequest> permissions;
private Boolean polls;
private String push_level;
private Boolean push_notifications;
private Boolean quotes;
private Boolean reactions;
private Boolean read_events;
private Boolean reminders;
private Boolean replies;
private Boolean search;
private Boolean shared_locations;
private Boolean skip_last_msg_update_for_system_msgs;
private Boolean typing_events;
private Double updated_at;
private Boolean uploads;
private Boolean url_enrichment;
private Boolean user_message_reminders;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | List<String> | Yes | |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Double | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| duration | String | Yes | |
| grants | Map<String, Object> | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Integer | Yes | |
| mutes | Boolean | Yes | |
| name | String | Yes | |
| permissions | List<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 | Double | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | List<String> | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | List<BlockListOptions> | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Integer | No | |
| partition_ttl | String | No | |
| push_level | String | No |
UpdateCommandResponse
public class UpdateCommandResponse {
private Command command;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| command | Command | No | Command object |
UpdateMemberPartialResponse
public class UpdateMemberPartialResponse {
private ChannelMemberResponse channel_member;
private String duration;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| channel_member | ChannelMemberResponse | No | Updated channel member |
UpdateMessagePartialResponse
public class UpdateMessagePartialResponse {
private String duration;
private MessageResponse message;
private Map<String, Object> 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 | Map<String, Object> | No | Pending message metadata |
UpdateMessageResponse
Basic response information
public class UpdateMessageResponse {
private String duration;
private MessageResponse message;
private Map<String, Object> pending_message_metadata;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| pending_message_metadata | Map<String, Object> | No |
UpdateReminderResponse
Basic response information
public class UpdateReminderResponse {
private String duration;
private ReminderResponseData reminder;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| reminder | ReminderResponseData | Yes |
UpdateThreadPartialResponse
public class UpdateThreadPartialResponse {
private String duration;
private ThreadResponse thread;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| thread | ThreadResponse | Yes | Updated thread (not enriched) |
UploadChannelFileResponse
public class UploadChannelFileResponse {
private String duration;
private String file;
private String moderation_action;
private String thumb_url;
}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
public class UploadChannelResponse {
private String duration;
private String file;
private String moderation_action;
private String thumb_url;
private List<ImageSize> 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 | List<ImageSize> | No | Array of image size configurations |
User
public class User {
private Map<String, Object> data;
private String id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | |
| data | Map<String, Object> | No |
UserCustomEventRequest
public class UserCustomEventRequest {
private Map<String, Object> custom;
private String type;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | |
| custom | Map<String, Object> | No |
UserRequest
User request object
public class UserRequest {
private Map<String, Object> custom;
private String id;
private String image;
private Boolean invisible;
private String language;
private String name;
private PrivacySettingsResponse privacy_settings;
private String role;
private List<String> teams;
private Map<String, Object> teams_role;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | User ID |
| custom | Map<String, Object> | 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 | List<String> | No | List of teams the user belongs to |
| teams_role | Map<String, Object> | No | Map of team-specific roles for the user |
UserResponse
User response object
public class UserResponse {
private Integer avg_response_time;
private Double ban_expires;
private Boolean banned;
private List<String> blocked_user_ids;
private Boolean bypass_moderation;
private Double created_at;
private Map<String, Object> custom;
private Double deactivated_at;
private Double deleted_at;
private List<DeviceResponse> devices;
private String id;
private String image;
private Boolean invisible;
private String language;
private Double last_active;
private String name;
private Boolean online;
private PrivacySettingsResponse privacy_settings;
private PushNotificationSettingsResponse push_notifications;
private Double revoke_tokens_issued_before;
private String role;
private Boolean shadow_banned;
private List<String> teams;
private Map<String, Object> teams_role;
private Double updated_at;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Boolean | Yes | Whether a user is banned or not |
| blocked_user_ids | List<String> | Yes | |
| created_at | Double | Yes | Date/time of creation |
| custom | Map<String, Object> | 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 | List<String> | Yes | List of teams user is a part of |
| updated_at | Double | Yes | Date/time of the last update |
| avg_response_time | Integer | No | |
| ban_expires | Double | No | Date when ban expires |
| bypass_moderation | Boolean | No | |
| deactivated_at | Double | No | Date of deactivation |
| deleted_at | Double | No | Date/time of deletion |
| devices | List<DeviceResponse> | No | List of devices user is using |
| image | String | No | |
| last_active | Double | 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 | Double | No | Revocation date for tokens |
| teams_role | Map<String, Object> | No |
VoteData
public class VoteData {
private String answer_text;
private String option_id;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | String | No | |
| option_id | String | No |
WSEvent
Represents an BaseEvent that happened in Stream Chat
public class WSEvent {
private Boolean automoderation;
private ModerationResponse automoderation_scores;
private ChannelResponse channel;
private String channel_id;
private Double channel_last_message_at;
private String channel_type;
private String cid;
private String connection_id;
private Double created_at;
private UserResponse created_by;
private Map<String, Object> custom;
private OwnUserResponse me;
private ChannelMemberResponse member;
private MessageResponse message;
private MessageUpdate message_update;
private String parent_id;
private PollResponseData poll;
private PollVoteResponseData poll_vote;
private ReactionResponse reaction;
private String reason;
private String team;
private ThreadResponse thread;
private String thread_id;
private String type;
private UserResponse user;
private String user_id;
private Integer watcher_count;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| custom | Map<String, Object> | Yes | |
| type | String | Yes | |
| automoderation | Boolean | No | |
| automoderation_scores | ModerationResponse | No | |
| channel | ChannelResponse | No | |
| channel_id | String | No | |
| channel_last_message_at | Double | 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 | Integer | No |
WrappedUnreadCountsResponse
Basic response information
public class WrappedUnreadCountsResponse {
private List<UnreadCountsChannelType> channel_type;
private List<UnreadCountsChannel> channels;
private String duration;
private List<UnreadCountsThread> threads;
private Integer total_unread_count;
private Map<String, Object> total_unread_count_by_team;
private Integer total_unread_threads_count;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_type | List<UnreadCountsChannelType> | Yes | |
| channels | List<UnreadCountsChannel> | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
| threads | List<UnreadCountsThread> | Yes | |
| total_unread_count | Integer | Yes | |
| total_unread_threads_count | Integer | Yes | |
| total_unread_count_by_team | Map<String, Object> | No |