Appearance
Chat
About 21038 wordsAbout 70 min
Ruby SDK - Chat API
Table of Contents
- query_campaigns
- get_campaign
- start_campaign
- stop_campaign
- query_channels
- channel_batch_update
- delete_channels
- mark_delivered
- mark_channels_read
- get_or_create_distinct_channel
- update_channel
- update_channel_partial
- delete_channel
- get_draft
- delete_draft
- send_event
- upload_channel_file
- delete_channel_file
- hide_channel
- upload_channel_image
- delete_channel_image
- update_member_partial
- send_message
- get_many_messages
- get_or_create_channel
- mark_read
- show_channel
- truncate_channel
- mark_unread
- list_channel_types
- create_channel_type
- get_channel_type
- update_channel_type
- delete_channel_type
- list_commands
- create_command
- get_command
- update_command
- delete_command
- query_drafts
- export_channels
- query_members
- query_message_history
- get_message
- update_message
- update_message_partial
- delete_message
- run_message_action
- commit_message
- ephemeral_message_update
- send_reaction
- delete_reaction
- get_reactions
- query_reactions
- translate_message
- undelete_message
- cast_poll_vote
- delete_poll_vote
- create_reminder
- update_reminder
- delete_reminder
- get_replies
- query_message_flags
- mute_channel
- unmute_channel
- query_banned_users
- query_future_channel_bans
- query_reminders
- get_retention_policy
- set_retention_policy
- delete_retention_policy
- get_retention_policy_runs
- search
- query_segments
- get_segment
- delete_segment
- delete_segment_targets
- segment_target_exists
- query_segment_targets
- query_team_usage_stats
- query_threads
- get_thread
- update_thread_partial
- unread_counts
- unread_counts_batch
- send_user_custom_event
- Types Reference
query_campaigns
Retrieve a list of campaigns based on specific criteria, helping you manage and analyze multiple marketing efforts simultaneously.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query campaigns
response = client.chat.query_campaigns(
limit: 25,
filter: {},
sort: []
)
puts responseExample: with prev and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query campaigns
response = client.chat.query_campaigns(
prev: nil,
next: nil
)
puts responseExample: with user_limit
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query campaigns
response = client.chat.query_campaigns(
user_limit: 10
)
puts responseResponse: QueryCampaignsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | No | - |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | - |
| user_limit | Integer | No | - |
get_campaign
Obtain detailed information about a specific campaign, allowing you to review its current status and settings.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get campaign
response = client.chat.get_campaign(
id: "activity-123",
limit: 25,
next: nil
)
puts responseExample: with prev
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get campaign
response = client.chat.get_campaign(
id: "activity-123",
prev: nil
)
puts responseResponse: GetCampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| prev | String | No | - |
| next | String | No | - |
| limit | Integer | No | - |
start_campaign
Initiate or schedule a campaign to begin at a designated time, enabling you to automate your marketing and outreach activities.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Start/schedule campaign
response = client.chat.start_campaign(
id: "activity-123",
scheduled_for: 10,
stop_at: 10
)
puts responseResponse: StartCampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| scheduled_for | float | No | - |
| stop_at | float | No | - |
stop_campaign
Stop an ongoing campaign to prevent further messages from being sent, useful when campaign objectives have been achieved or if errors are detected.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Stop campaign
response = client.chat.stop_campaign(
id: "activity-123"
)
puts responseResponse: CampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
query_channels
Access a list of communication channels available in your account, facilitating efficient management and selection for your campaigns.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query channels
response = client.chat.query_channels(
user_id: "john",
limit: 25,
sort: []
)
puts responseExample: with filter_conditions and message_limit
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query channels
response = client.chat.query_channels(
filter_conditions: {},
message_limit: 10
)
puts responseExample: with offset and predefined_filter
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query channels
response = client.chat.query_channels(
offset: 0,
predefined_filter: "value"
)
puts responseExample: with filter_values and sort_values
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query channels
response = client.chat.query_channels(
filter_values: {},
sort_values: {}
)
puts responseResponse: QueryChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter_conditions | Hash | No | Filter conditions to apply to the query |
| filter_values | Hash | 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 | Hash | No | - |
| state | Boolean | No | Whether to update channel state or not |
| user | UserRequest | No | - |
| user_id | String | No | - |
channel_batch_update
Update multiple channels simultaneously to save time and ensure consistency across channel settings or configurations.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channels in batch
response = client.chat.channel_batch_update(
filter: {},
operation: "add",
data: { auto_translation_enabled: false },
members: []
)
puts responseResponse: ChannelBatchUpdateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | Yes | - |
| operation | String | Yes | - |
| data | ChannelDataUpdate | No | - |
| members | []ChannelBatchMemberRequest | No | - |
delete_channels
Asynchronously remove specific channels from your account, helping you maintain an organized and relevant channel list without immediate blocking.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Deletes channels asynchronously
response = client.chat.delete_channels(
cids: [],
hard_delete: false
)
puts responseResponse: 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 |
mark_delivered
Update the delivery status of messages sent through a channel, ensuring accurate tracking and reporting of message delivery outcomes.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark channel message delivery status
response = client.chat.mark_delivered(
user_id: "john",
latest_delivered_messages: []
)
puts responseResponse: MarkDeliveredResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | String | No | - |
| latest_delivered_messages | []DeliveredMessagePayload | No | - |
mark_channels_read
Mark all messages in selected channels as read, allowing you to streamline communication management and reduce notification clutter.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark channels as read
response = client.chat.mark_channels_read(
user_id: "john",
user: { id: "activity-123", custom: {} },
read_by_channel: {}
)
puts responseResponse: MarkReadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| read_by_channel | Hash | No | Map of channel ID to last read message ID |
| user | UserRequest | No | - |
| user_id | String | No | - |
get_or_create_distinct_channel
Retrieve an existing channel or create a new one based on unique identifiers, simplifying the process of managing distinct communication threads.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_distinct_channel(
type: "like",
data: { auto_translation_enabled: false },
hide_for_creator: false
)
puts responseExample: with members and messages
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_distinct_channel(
type: "like",
members: { limit: 25 },
messages: { created_at_after: 10 }
)
puts responseExample: with state and thread_unread_counts
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_distinct_channel(
type: "like",
state: false,
thread_unread_counts: false
)
puts responseExample: with watchers
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_distinct_channel(
type: "like",
watchers: { limit: 25 }
)
puts responseResponse: 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 | - |
update_channel
Modify the settings or attributes of an existing channel to keep your communication channels up-to-date and aligned with your needs.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel
response = client.chat.update_channel(
type: "like",
id: "activity-123",
user_id: "john",
skip_push: false
)
puts responseExample: with add_members and add_moderators
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel
response = client.chat.update_channel(
type: "like",
id: "activity-123",
add_members: [],
add_moderators: []
)
puts responseExample: with assign_roles and cooldown
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel
response = client.chat.update_channel(
type: "like",
id: "activity-123",
assign_roles: [],
cooldown: 10
)
puts responseExample: with data and demote_moderators
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel
response = client.chat.update_channel(
type: "like",
id: "activity-123",
data: { auto_translation_enabled: false },
demote_moderators: []
)
puts responseResponse: 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 | - |
update_channel_partial
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially update channel
response = client.chat.update_channel_partial(
type: "like",
id: "activity-123",
user_id: "john",
unset: []
)
puts responseExample: with user and set
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially update channel
response = client.chat.update_channel_partial(
type: "like",
id: "activity-123",
user: { id: "activity-123", custom: {} },
set: {}
)
puts responseResponse: UpdateChannelPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| set | Hash | No | - |
| unset | []string | No | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
delete_channel
Remove a channel from the system entirely. Use this when you want to permanently delete a channel and its associated data.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete channel
response = client.chat.delete_channel(
type: "like",
id: "activity-123",
hard_delete: false
)
puts responseResponse: DeleteChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| hard_delete | Boolean | No | - |
get_draft
Retrieve a draft message for editing or review. Use this to access unsent messages saved as drafts before finalizing or sending them.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get draft
response = client.chat.get_draft(
type: "like",
id: "activity-123",
user_id: "john",
parent_id: "parent-123"
)
puts responseResponse: GetDraftResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| parent_id | String | No | - |
| user_id | String | No | - |
delete_draft
Remove a draft message from the system. Use this when a draft is no longer needed and you want to declutter saved drafts.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete draft
response = client.chat.delete_draft(
type: "like",
id: "activity-123",
user_id: "john",
parent_id: "parent-123"
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| parent_id | String | No | - |
| user_id | String | No | - |
send_event
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Send event
response = client.chat.send_event(
type: "like",
id: "activity-123",
event: { type: "like", custom: {} }
)
puts responseResponse: EventResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| event | EventRequest | Yes | - |
upload_channel_file
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Upload file
response = client.chat.upload_channel_file(
type: "like",
id: "activity-123",
file: "value",
user: { id: "activity-123" }
)
puts responseResponse: 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 |
delete_channel_file
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete file
response = client.chat.delete_channel_file(
type: "like",
id: "activity-123",
url: "value"
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| url | String | No | - |
hide_channel
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Hide channel
response = client.chat.hide_channel(
type: "like",
id: "activity-123",
user_id: "john",
user: { id: "activity-123", custom: {} }
)
puts responseExample: with clear_history
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Hide channel
response = client.chat.hide_channel(
type: "like",
id: "activity-123",
clear_history: false
)
puts responseResponse: 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 | - |
upload_channel_image
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Upload image
response = client.chat.upload_channel_image(
type: "like",
id: "activity-123",
file: "value",
upload_sizes: []
)
puts responseExample: with user
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Upload image
response = client.chat.upload_channel_image(
type: "like",
id: "activity-123",
user: { id: "activity-123" }
)
puts responseResponse: 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 | - |
delete_channel_image
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete image
response = client.chat.delete_channel_image(
type: "like",
id: "activity-123",
url: "value"
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| url | String | No | - |
update_member_partial
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially channel member update
response = client.chat.update_member_partial(
type: "like",
id: "activity-123",
user_id: "john",
set: {}
)
puts responseExample: with unset
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially channel member update
response = client.chat.update_member_partial(
type: "like",
id: "activity-123",
unset: []
)
puts responseResponse: UpdateMemberPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| user_id | String | No | - |
| set | Hash | No | - |
| unset | []string | No | - |
send_message
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Send new message
response = client.chat.send_message(
type: "like",
id: "activity-123",
message: { attachments: [] },
skip_push: false,
keep_channel_hidden: false
)
puts responseExample: with pending and pending_message_metadata
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Send new message
response = client.chat.send_message(
type: "like",
id: "activity-123",
message: { attachments: [] },
pending: false,
pending_message_metadata: {}
)
puts responseExample: with skip_enrich_url and force_moderation
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Send new message
response = client.chat.send_message(
type: "like",
id: "activity-123",
message: { attachments: [] },
skip_enrich_url: false,
force_moderation: false
)
puts responseResponse: 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 | Hash | No | - |
| skip_enrich_url | Boolean | No | - |
| skip_push | Boolean | No | - |
get_many_messages
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get many messages
response = client.chat.get_many_messages(
type: "like",
id: "activity-123",
ids: ["activity-1", "activity-2"]
)
puts responseResponse: GetManyMessagesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| ids | []string | Yes | - |
get_or_create_channel
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_channel(
type: "like",
id: "activity-123",
data: { auto_translation_enabled: false },
hide_for_creator: false
)
puts responseExample: with members and messages
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_channel(
type: "like",
id: "activity-123",
members: { limit: 25 },
messages: { created_at_after: 10 }
)
puts responseExample: with state and thread_unread_counts
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_channel(
type: "like",
id: "activity-123",
state: false,
thread_unread_counts: false
)
puts responseExample: with watchers
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get or create channel
response = client.chat.get_or_create_channel(
type: "like",
id: "activity-123",
watchers: { limit: 25 }
)
puts responseResponse: 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 | - |
mark_read
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark read
response = client.chat.mark_read(
type: "like",
id: "activity-123",
user_id: "john",
thread_id: "value"
)
puts responseExample: with user and message_id
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark read
response = client.chat.mark_read(
type: "like",
id: "activity-123",
user: { id: "activity-123", custom: {} },
message_id: "value"
)
puts responseResponse: 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 | - |
show_channel
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Show channel
response = client.chat.show_channel(
type: "like",
id: "activity-123",
user_id: "john",
user: { id: "activity-123", custom: {} }
)
puts responseResponse: ShowChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | - |
| id | String | Yes | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
truncate_channel
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Truncate channel
response = client.chat.truncate_channel(
type: "like",
id: "activity-123",
user_id: "john",
hard_delete: false
)
puts responseExample: with skip_push and member_ids
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Truncate channel
response = client.chat.truncate_channel(
type: "like",
id: "activity-123",
skip_push: false,
member_ids: []
)
puts responseExample: with truncated_at and user
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Truncate channel
response = client.chat.truncate_channel(
type: "like",
id: "activity-123",
truncated_at: 10,
user: { id: "activity-123", custom: {} }
)
puts responseExample: with message
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Truncate channel
response = client.chat.truncate_channel(
type: "like",
id: "activity-123",
message: { attachments: [] }
)
puts responseResponse: 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 | - |
mark_unread
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark unread
response = client.chat.mark_unread(
type: "like",
id: "activity-123",
user_id: "john",
message_timestamp: 10
)
puts responseExample: with thread_id and user
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark unread
response = client.chat.mark_unread(
type: "like",
id: "activity-123",
thread_id: "value",
user: { id: "activity-123", custom: {} }
)
puts responseExample: with message_id
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mark unread
response = client.chat.mark_unread(
type: "like",
id: "activity-123",
message_id: "value"
)
puts responseResponse: 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 | - |
list_channel_types
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# List channel types
response = client.chat.list_channel_types
puts responseResponse: ListChannelTypesResponse
create_channel_type
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create channel type
response = client.chat.create_channel_type(
automod: "value",
automod_behavior: "value",
max_message_length: 10,
name: "My Feed",
blocklist: "value",
blocklist_behavior: "value"
)
puts responseExample: with blocklists and chat_preferences
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create channel type
response = client.chat.create_channel_type(
automod: "value",
automod_behavior: "value",
max_message_length: 10,
name: "My Feed",
blocklists: [],
chat_preferences: { channel_mentions: "value" }
)
puts responseExample: with commands and connect_events
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create channel type
response = client.chat.create_channel_type(
automod: "value",
automod_behavior: "value",
max_message_length: 10,
name: "My Feed",
commands: [],
connect_events: false
)
puts responseExample: with count_messages and custom_events
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create channel type
response = client.chat.create_channel_type(
automod: "value",
automod_behavior: "value",
max_message_length: 10,
name: "My Feed",
count_messages: false,
custom_events: false
)
puts responseResponse: 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 | Hash | 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 | - |
get_channel_type
Retrieve information about a specific channel type to understand its configuration and settings, useful for reviewing or managing channel functionalities.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get channel type
response = client.chat.get_channel_type(
name: "My Feed"
)
puts responseResponse: GetChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
update_channel_type
Modify the properties of an existing channel type to customize or enhance channel behavior according to specific requirements.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel type
response = client.chat.update_channel_type(
name: "My Feed",
automod: "value",
automod_behavior: "value",
max_message_length: 10,
allowed_flag_reasons: [],
automod_thresholds: { explicit: { block: 10 } }
)
puts responseExample: with blocklist and blocklist_behavior
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel type
response = client.chat.update_channel_type(
name: "My Feed",
automod: "value",
automod_behavior: "value",
max_message_length: 10,
blocklist: "value",
blocklist_behavior: "value"
)
puts responseExample: with blocklists and chat_preferences
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel type
response = client.chat.update_channel_type(
name: "My Feed",
automod: "value",
automod_behavior: "value",
max_message_length: 10,
blocklists: [],
chat_preferences: { channel_mentions: "value" }
)
puts responseExample: with commands and connect_events
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update channel type
response = client.chat.update_channel_type(
name: "My Feed",
automod: "value",
automod_behavior: "value",
max_message_length: 10,
commands: [],
connect_events: false
)
puts responseResponse: 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 | Hash | 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 | - |
delete_channel_type
Remove a channel type from your application to streamline channel categories or eliminate unused configurations.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete channel type
response = client.chat.delete_channel_type(
name: "My Feed"
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
list_commands
Obtain a list of all available commands, providing a quick reference to the commands that can be used within the chat environment.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# List commands
response = client.chat.list_commands
puts responseResponse: ListCommandsResponse
create_command
Create a new command to extend chat functionalities, enabling custom actions or automations based on user input.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create command
response = client.chat.create_command(
description: "A description",
name: "My Feed",
args: "value",
set: "value"
)
puts responseResponse: 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 |
get_command
Access details about a specific command to review its configuration or ensure it performs as expected within the chat.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get command
response = client.chat.get_command(
name: "My Feed"
)
puts responseResponse: GetCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
update_command
Alter the properties of an existing command to refine its behavior or adapt to changing requirements in the chat application.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update command
response = client.chat.update_command(
name: "My Feed",
description: "A description",
args: "value",
set: "value"
)
puts responseResponse: 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 |
delete_command
Eliminate a command from your chat environment to simplify command options or remove outdated functionalities.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete command
response = client.chat.delete_command(
name: "My Feed"
)
puts responseResponse: DeleteCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | - |
query_drafts
Search for draft messages to review or manage incomplete communications before they are sent within the chat.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query draft messages
response = client.chat.query_drafts(
user_id: "john",
limit: 25,
filter: {}
)
puts responseExample: with sort and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query draft messages
response = client.chat.query_drafts(
sort: [],
next: nil
)
puts responseExample: with user and prev
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query draft messages
response = client.chat.query_drafts(
user: { id: "activity-123", custom: {} },
prev: nil
)
puts responseResponse: QueryDraftsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | 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 | - |
export_channels
Export channel data to preserve chat history, analyze communication patterns, or integrate with external systems for broader data use.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Export channels
response = client.chat.export_channels(
channels: [],
clear_deleted_message_text: false,
export_users: false
)
puts responseExample: with include_soft_deleted_channels and include_truncated_messages
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Export channels
response = client.chat.export_channels(
channels: [],
include_soft_deleted_channels: false,
include_truncated_messages: false
)
puts responseExample: with version
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Export channels
response = client.chat.export_channels(
channels: [],
version: "value"
)
puts responseResponse: 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 |
query_members
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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query members
response = client.chat.query_members(
payload: "value"
)
puts responseResponse: MembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
query_message_history
Access past messages in a chat to review previous interactions, useful for catching up on conversations or retrieving historical data.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query message history
response = client.chat.query_message_history(
filter: {},
limit: 25,
sort: []
)
puts responseExample: with prev and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query message history
response = client.chat.query_message_history(
filter: {},
prev: nil,
next: nil
)
puts responseResponse: QueryMessageHistoryResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | Yes | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
get_message
Fetch a specific message by its identifier, ideal for when you need detailed information about a particular message.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get message
response = client.chat.get_message(
id: "activity-123",
show_deleted_message: false
)
puts responseResponse: GetMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| show_deleted_message | Boolean | No | - |
update_message
Modify the content of an existing message, useful for correcting errors or updating information within a conversation.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Update message
response = client.chat.update_message(
id: "activity-123",
message: { attachments: [] },
skip_push: false,
skip_enrich_url: false
)
puts responseResponse: 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 | - |
update_message_partial
Make selective changes to parts of a message without altering the entire content, perfect for minor edits or updates.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially message update
response = client.chat.update_message_partial(
id: "activity-123",
user_id: "john",
skip_push: false
)
puts responseExample: with set and unset
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially message update
response = client.chat.update_message_partial(
id: "activity-123",
set: {},
unset: []
)
puts responseExample: with user and skip_enrich_url
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially message update
response = client.chat.update_message_partial(
id: "activity-123",
user: { id: "activity-123", custom: {} },
skip_enrich_url: false
)
puts responseResponse: UpdateMessagePartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| set | Hash | 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 | - |
delete_message
Remove a message from the chat, useful for managing content or when you need to eliminate outdated or inappropriate information.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete message
response = client.chat.delete_message(
id: "activity-123",
hard: false,
deleted_by: "value"
)
puts responseExample: with delete_for_me
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete message
response = client.chat.delete_message(
id: "activity-123",
delete_for_me: false
)
puts responseResponse: DeleteMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| hard | Boolean | No | - |
| deleted_by | String | No | - |
| delete_for_me | Boolean | No | - |
run_message_action
Execute a predefined action on a message, ideal for triggering automated responses or workflows based on message content.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Run message command action
response = client.chat.run_message_action(
id: "activity-123",
form_data: {},
user_id: "john",
user: { id: "activity-123", custom: {} }
)
puts responseResponse: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| form_data | Hash | Yes | ReadOnlyData to execute command with |
| user | UserRequest | No | - |
| user_id | String | No | - |
commit_message
Finalize and save changes made to a message, ensuring that all updates are applied and visible to chat participants.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Commit message
response = client.chat.commit_message(
id: "activity-123"
)
puts responseResponse: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
ephemeral_message_update
Update an ephemeral message, which is temporary and may disappear after a set time, useful for time-sensitive or transient information.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Ephemeral message update
response = client.chat.ephemeral_message_update(
id: "activity-123",
user_id: "john",
skip_push: false
)
puts responseExample: with set and unset
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Ephemeral message update
response = client.chat.ephemeral_message_update(
id: "activity-123",
set: {},
unset: []
)
puts responseExample: with user and skip_enrich_url
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Ephemeral message update
response = client.chat.ephemeral_message_update(
id: "activity-123",
user: { id: "activity-123", custom: {} },
skip_enrich_url: false
)
puts responseResponse: UpdateMessagePartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| set | Hash | 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 | - |
send_reaction
Express your response or feedback to a message by sending an emoji reaction, enhancing interaction and engagement within the chat.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Send reaction
response = client.chat.send_reaction(
id: "activity-123",
reaction: { type: "like", created_at: 10 },
skip_push: false,
enforce_unique: true
)
puts responseResponse: 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 |
delete_reaction
Removes a user's reaction from a message, useful for managing or correcting reactions in a conversation.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete reaction
response = client.chat.delete_reaction(
id: "activity-123",
type: "like",
user_id: "john"
)
puts responseResponse: DeleteReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| type | String | Yes | - |
| user_id | String | No | - |
get_reactions
Retrieves all reactions associated with a specific message, allowing users to view collective feedback or expressions from the chat participants.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get reactions
response = client.chat.get_reactions(
id: "activity-123",
limit: 25,
offset: 0
)
puts responseResponse: GetReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| limit | Integer | No | - |
| offset | Integer | No | - |
query_reactions
Fetches specific reactions based on given criteria, enabling users to filter and analyze reactions for insights or moderation.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
#
response = client.chat.query_reactions(
id: "activity-123",
user_id: "john",
limit: 25
)
puts responseExample: with filter and sort
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
#
response = client.chat.query_reactions(
id: "activity-123",
filter: {},
sort: []
)
puts responseExample: with next and user
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
#
response = client.chat.query_reactions(
id: "activity-123",
next: nil,
user: { id: "activity-123", custom: {} }
)
puts responseExample: with prev
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
#
response = client.chat.query_reactions(
id: "activity-123",
prev: nil
)
puts responseResponse: QueryReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| filter | Hash | 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 | - |
translate_message
Converts a message into a different language, facilitating communication between users who speak different languages.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Translate message
response = client.chat.translate_message(
id: "activity-123",
language: "value"
)
puts responseResponse: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| language | String | Yes | Language to translate message to |
undelete_message
Restores a previously deleted message, useful for recovering important information or correcting accidental deletions.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Undelete message
response = client.chat.undelete_message(
id: "activity-123",
undeleted_by: "value"
)
puts responseResponse: UndeleteMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| undeleted_by | String | Yes | ID of the user who is undeleting the message |
cast_poll_vote
Allows a user to submit their vote in a poll, enabling participation and engagement in decision-making processes.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Cast vote
response = client.chat.cast_poll_vote(
message_id: "value",
poll_id: "poll-123",
user_id: "john",
user: { id: "activity-123", custom: {} }
)
puts responseExample: with vote
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Cast vote
response = client.chat.cast_poll_vote(
message_id: "value",
poll_id: "poll-123",
vote: { answer_text: "value" }
)
puts responseResponse: 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 |
delete_poll_vote
Removes a user's vote from a poll, providing flexibility to change decisions or correct voting errors.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete vote
response = client.chat.delete_poll_vote(
message_id: "value",
poll_id: "poll-123",
vote_id: "vote-123",
user_id: "john"
)
puts responseResponse: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| poll_id | String | Yes | - |
| vote_id | String | Yes | - |
| user_id | String | No | - |
create_reminder
Sets up a reminder for a specific event or task, helping users stay organized and remember important dates or activities.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create reminder
response = client.chat.create_reminder(
message_id: "value",
user_id: "john",
user: { id: "activity-123", custom: {} }
)
puts responseExample: with remind_at
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Create reminder
response = client.chat.create_reminder(
message_id: "value",
remind_at: 10
)
puts responseResponse: ReminderResponseData
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| remind_at | float | No | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
update_reminder
Modifies an existing reminder, allowing users to adjust details or schedules to accommodate changes in plans.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Updates Reminder
response = client.chat.update_reminder(
message_id: "value",
user_id: "john",
user: { id: "activity-123", custom: {} }
)
puts responseExample: with remind_at
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Updates Reminder
response = client.chat.update_reminder(
message_id: "value",
remind_at: 10
)
puts responseResponse: UpdateReminderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| remind_at | float | No | - |
| user | UserRequest | No | - |
| user_id | String | No | - |
delete_reminder
Removes an existing reminder, useful for clearing completed tasks or canceling unnecessary notifications.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete reminder
response = client.chat.delete_reminder(
message_id: "value",
user_id: "john"
)
puts responseResponse: DeleteReminderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| user_id | String | No | - |
get_replies
Retrieve all replies to a specific message, useful for following a conversation thread within a chat.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get replies
response = client.chat.get_replies(
parent_id: "parent-123",
limit: 25,
sort: []
)
puts responseExample: with id_gte and id_gt
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get replies
response = client.chat.get_replies(
parent_id: "parent-123",
id_gte: "value",
id_gt: "value"
)
puts responseExample: with id_lte and id_lt
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get replies
response = client.chat.get_replies(
parent_id: "parent-123",
id_lte: "value",
id_lt: "value"
)
puts responseExample: with id_around
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get replies
response = client.chat.get_replies(
parent_id: "parent-123",
id_around: "value"
)
puts responseResponse: 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 | - |
query_message_flags
Check the flags associated with messages, helping to identify and manage content that requires moderation or attention.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Message Flags
response = client.chat.query_message_flags(
payload: "value"
)
puts responseResponse: QueryMessageFlagsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
mute_channel
Temporarily silence notifications from a specific channel, ideal for minimizing distractions without leaving the conversation.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mute channel
response = client.chat.mute_channel(
user_id: "john",
expiration: 10,
user: { id: "activity-123", custom: {} }
)
puts responseExample: with channel_cids
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Mute channel
response = client.chat.mute_channel(
channel_cids: []
)
puts responseResponse: 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 | - |
unmute_channel
Re-enable notifications for a previously muted channel, allowing you to stay updated on new messages.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Unmute channel
response = client.chat.unmute_channel(
user_id: "john",
expiration: 10,
user: { id: "activity-123", custom: {} }
)
puts responseExample: with channel_cids
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Unmute channel
response = client.chat.unmute_channel(
channel_cids: []
)
puts responseResponse: 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 | - |
query_banned_users
List the users who have been banned from a chat, useful for managing community access and enforcing rules.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Banned Users
response = client.chat.query_banned_users(
payload: "value"
)
puts responseResponse: QueryBannedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
query_future_channel_bans
View scheduled bans for a channel, helping you anticipate and manage upcoming restrictions on user access.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Future Channel Bans
response = client.chat.query_future_channel_bans(
payload: "value"
)
puts responseResponse: QueryFutureChannelBansResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
query_reminders
Access a list of reminders set within the chat, ensuring you don't miss important events or tasks.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query reminders
response = client.chat.query_reminders(
user_id: "john",
limit: 25,
filter: {}
)
puts responseExample: with sort and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query reminders
response = client.chat.query_reminders(
sort: [],
next: nil
)
puts responseExample: with user and prev
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query reminders
response = client.chat.query_reminders(
user: { id: "activity-123", custom: {} },
prev: nil
)
puts responseResponse: QueryRemindersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | 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 | - |
get_retention_policy
Retrieve the current data retention policy to understand how long data is stored and managed, ensuring compliance with organizational or regulatory requirements.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get retention policy
response = client.chat.get_retention_policy
puts responseResponse: GetRetentionPolicyResponse
set_retention_policy
Define or modify the data retention policy to control how long data is retained, helping maintain data governance and compliance.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Set retention policy
response = client.chat.set_retention_policy(
max_age_hours: 10,
policy: "value"
)
puts responseResponse: SetRetentionPolicyResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| max_age_hours | Integer | Yes | - |
| policy | String | Yes | - |
delete_retention_policy
Remove an existing data retention policy when it is no longer needed, helping streamline data management practices.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete retention policy
response = client.chat.delete_retention_policy(
policy: "value"
)
puts responseResponse: DeleteRetentionPolicyResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| policy | String | Yes | - |
get_retention_policy_runs
Access historical records of retention policy executions to monitor compliance and review data management activities over time.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get retention policy runs
response = client.chat.get_retention_policy_runs(
limit: 25,
sort: [],
filter_conditions: {}
)
puts responseExample: with prev and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get retention policy runs
response = client.chat.get_retention_policy_runs(
prev: nil,
next: nil
)
puts responseResponse: GetRetentionPolicyRunsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter_conditions | Hash | 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
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Search messages
response = client.chat.search(
payload: "value"
)
puts responseResponse: SearchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
query_segments
Retrieve a list of user segments based on specified criteria, useful for targeted communication and analysis.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query segments
response = client.chat.query_segments(
filter: {},
limit: 25,
sort: []
)
puts responseExample: with prev and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query segments
response = client.chat.query_segments(
filter: {},
prev: nil,
next: nil
)
puts responseResponse: QuerySegmentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | Yes | Filter to apply to the query |
| limit | Integer | No | - |
| next | String | No | - |
| prev | String | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
get_segment
Obtain detailed information about a specific user segment, aiding in personalized engagement and insights.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get segment
response = client.chat.get_segment(
id: "activity-123"
)
puts responseResponse: GetSegmentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
delete_segment
Remove a specific segment from your chat application, useful for managing and organizing user groups or data collections.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete segment
response = client.chat.delete_segment(
id: "activity-123"
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
delete_segment_targets
Remove specified targets from a segment, helpful for updating or refining the members or elements within a segment.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Delete targets from a segment
response = client.chat.delete_segment_targets(
id: "activity-123",
target_ids: []
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| target_ids | []string | Yes | Target IDs |
segment_target_exists
Verify if a particular target is part of a segment, useful for ensuring data accuracy or confirming membership before performing operations.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Check whether a target exists in a segment
response = client.chat.segment_target_exists(
id: "activity-123",
target_id: "value"
)
puts responseResponse: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| target_id | String | Yes | - |
query_segment_targets
Retrieve a list of targets within a segment, ideal for gaining insights or performing actions on specific segment members.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query segment targets
response = client.chat.query_segment_targets(
id: "activity-123",
limit: 25,
sort: []
)
puts responseExample: with Filter and next
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query segment targets
response = client.chat.query_segment_targets(
id: "activity-123",
filter: {},
next: nil
)
puts responseExample: with prev
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query segment targets
response = client.chat.query_segment_targets(
id: "activity-123",
prev: nil
)
puts responseResponse: QuerySegmentTargetsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | - |
| filter | Hash | No | - |
| sort | []SortParamRequest | No | - |
| limit | Integer | No | Limit |
| next | String | No | Next |
| prev | String | No | Prev |
query_team_usage_stats
Obtain detailed statistics on team usage to evaluate engagement levels, optimize resource allocation, and improve team performance.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Team Usage Statistics
response = client.chat.query_team_usage_stats(
limit: 25,
end_date: "value",
month: "value"
)
puts responseExample: with next and start_date
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Team Usage Statistics
response = client.chat.query_team_usage_stats(
next: nil,
start_date: "value"
)
puts responseResponse: 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. |
query_threads
Search and filter chat threads based on specific criteria, enabling efficient navigation and management of conversation histories.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Threads
response = client.chat.query_threads(
user_id: "john",
limit: 25,
filter: {}
)
puts responseExample: with sort and participant_limit
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Threads
response = client.chat.query_threads(
sort: [],
participant_limit: 10
)
puts responseExample: with prev and reply_limit
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Threads
response = client.chat.query_threads(
prev: nil,
reply_limit: 10
)
puts responseExample: with member_limit and user
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Query Threads
response = client.chat.query_threads(
member_limit: 10,
user: { id: "activity-123", custom: {} }
)
puts responseResponse: QueryThreadsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Hash | 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 | - |
get_thread
Retrieve detailed information about a specific chat thread, useful for reviewing conversation content or metadata.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get Thread
response = client.chat.get_thread(
message_id: "value",
reply_limit: 10,
participant_limit: 10
)
puts responseExample: with member_limit
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Get Thread
response = client.chat.get_thread(
message_id: "value",
member_limit: 10
)
puts responseResponse: GetThreadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| reply_limit | Integer | No | - |
| participant_limit | Integer | No | - |
| member_limit | Integer | No | - |
update_thread_partial
Make selective updates to a chat thread without altering its entire content, useful for modifying specific details or attributes.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially update thread
response = client.chat.update_thread_partial(
message_id: "value",
user_id: "john",
unset: []
)
puts responseExample: with user and set
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Partially update thread
response = client.chat.update_thread_partial(
message_id: "value",
user: { id: "activity-123", custom: {} },
set: {}
)
puts responseResponse: UpdateThreadPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | - |
| set | Hash | No | Sets new field values |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | String | No | - |
unread_counts
Check the number of unread messages in chat threads, helping users stay informed about new activity and prioritize responses.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Unread counts
response = client.chat.unread_counts(
user_id: "john"
)
puts responseResponse: WrappedUnreadCountsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | String | No | - |
unread_counts_batch
Obtain unread message counts for multiple chat threads simultaneously, providing a comprehensive overview of pending messages.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Batch unread counts
response = client.chat.unread_counts_batch(
user_ids: ["user-1", "user-2"]
)
puts responseResponse: UnreadCountsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
send_user_custom_event
Trigger a custom event associated with a user, useful for tracking user interactions or implementing personalized features.
Example
require 'getstream_ruby'
client = GetStreamRuby.manual(api_key: api_key, api_secret: api_secret)
# Send user event
response = client.chat.send_user_custom_event(
user_id: "john",
event: { type: "like", custom: {} }
)
puts responseResponse: 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.
# Attachment hash structure
{
actions: Array, #
asset_url: String, #
author_icon: String, #
author_link: String, #
author_name: String, #
color: String, #
custom: Hash, #
fallback: String, #
fields: Array, #
footer: String, #
footer_icon: String, #
giphy: Images, #
image_url: String, #
og_scrape_url: String, #
original_height: Numeric, #
original_width: Numeric, #
pretext: String, #
text: String, #
thumb_url: String, #
title: String, #
title_link: String, #
type: String # Attachment type (e.g. image, video, url)
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Hash | Yes | |
| actions | Array | No | |
| asset_url | String | No | |
| author_icon | String | No | |
| author_link | String | No | |
| author_name | String | No | |
| color | String | No | |
| fallback | String | No | |
| fields | Array | No | |
| footer | String | No | |
| footer_icon | String | No | |
| giphy | Images | No | |
| image_url | String | No | |
| og_scrape_url | String | No | |
| original_height | Numeric | No | |
| original_width | Numeric | No | |
| pretext | String | No | |
| text | String | No | |
| thumb_url | String | No | |
| title | String | No | |
| title_link | String | No | |
| type | String | No | Attachment type (e.g. image, video, url) |
BanResponse
# BanResponse hash structure
{
banned_by: UserResponse, #
channel: ChannelResponse, #
created_at: Numeric, #
expires: Numeric, #
reason: String, #
shadow: Boolean, #
user: UserResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | Numeric | No | |
| reason | String | No | |
| shadow | Boolean | No | |
| user | UserResponse | No |
BlockListOptions
# BlockListOptions hash structure
{
behavior: String, # Blocklist behavior. One of: flag, block, shadow_block
blocklist: String # Blocklist name
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| behavior | String | Yes | Blocklist behavior. One of: flag, block, shadow_block |
| blocklist | String | Yes | Blocklist name |
CampaignChannelTemplate
# CampaignChannelTemplate hash structure
{
custom: Hash, #
id: String, #
members: Array, #
members_template: Array, #
team: String, #
type: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Hash | Yes | |
| type | String | Yes | |
| id | String | No | |
| members | Array | No | |
| members_template | Array | No | |
| team | String | No |
CampaignMessageTemplate
# CampaignMessageTemplate hash structure
{
attachments: Array, #
custom: Hash, #
poll_id: String, #
searchable: Boolean, #
text: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Array | Yes | |
| custom | Hash | Yes | |
| poll_id | String | Yes | |
| searchable | Boolean | Yes | |
| text | String | Yes |
CampaignResponse
# CampaignResponse hash structure
{
channel_template: CampaignChannelTemplate, #
create_channels: Boolean, #
created_at: Numeric, #
description: String, #
id: String, #
message_template: CampaignMessageTemplate, #
name: String, #
scheduled_for: Numeric, #
segment_ids: Array, #
segments: Array, #
sender: UserResponse, #
sender_id: String, #
sender_mode: String, #
sender_visibility: String, #
show_channels: Boolean, #
skip_push: Boolean, #
skip_webhook: Boolean, #
stats: CampaignStatsResponse, #
status: String, #
stop_at: Numeric, #
updated_at: Numeric, #
user_ids: Array, #
users: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| create_channels | Boolean | Yes | |
| created_at | Numeric | Yes | |
| description | String | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| segment_ids | Array | Yes | |
| segments | Array | 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 | Numeric | Yes | |
| user_ids | Array | Yes | |
| users | Array | Yes | |
| channel_template | CampaignChannelTemplate | No | |
| message_template | CampaignMessageTemplate | No | |
| scheduled_for | Numeric | No | |
| sender | UserResponse | No | |
| stop_at | Numeric | No |
CampaignStatsResponse
# CampaignStatsResponse hash structure
{
progress: Numeric, #
stats_channels_created: Numeric, #
stats_completed_at: Numeric, #
stats_messages_sent: Numeric, #
stats_started_at: Numeric, #
stats_users_read: Numeric, #
stats_users_sent: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| progress | Numeric | Yes | |
| stats_channels_created | Numeric | Yes | |
| stats_completed_at | Numeric | Yes | |
| stats_messages_sent | Numeric | Yes | |
| stats_started_at | Numeric | Yes | |
| stats_users_read | Numeric | Yes | |
| stats_users_sent | Numeric | Yes |
ChannelBatchMemberRequest
# ChannelBatchMemberRequest hash structure
{
channel_role: String, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | |
| channel_role | String | No |
ChannelBatchUpdateResponse
Basic response information
# ChannelBatchUpdateResponse hash structure
{
duration: String, # Duration of the request in milliseconds
task_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| task_id | String | No |
ChannelConfig
# ChannelConfig hash structure
{
allowed_flag_reasons: Array, #
automod: String, #
automod_behavior: String, #
automod_thresholds: Thresholds, #
blocklist: String, #
blocklist_behavior: String, #
blocklists: Array, #
chat_preferences: ChatPreferences, #
commands: Array, # List of commands that channel supports
connect_events: Boolean, #
count_messages: Boolean, #
created_at: Numeric, #
custom_events: Boolean, #
delivery_events: Boolean, #
mark_messages_pending: Boolean, #
max_message_length: Numeric, #
mutes: Boolean, #
name: String, #
partition_size: Numeric, #
partition_ttl: String, #
polls: Boolean, #
push_level: String, #
push_notifications: Boolean, #
quotes: Boolean, #
reactions: Boolean, #
read_events: Boolean, #
reminders: Boolean, #
replies: Boolean, #
search: Boolean, #
shared_locations: Boolean, #
skip_last_msg_update_for_system_msgs: Boolean, #
typing_events: Boolean, #
updated_at: Numeric, #
uploads: Boolean, #
url_enrichment: Boolean, #
user_message_reminders: Boolean #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | Array | Yes | List of commands that channel supports |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Numeric | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Numeric | 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 | Numeric | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | Array | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | Array | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Numeric | No | |
| partition_ttl | String | No | |
| push_level | String | No |
ChannelDataUpdate
# ChannelDataUpdate hash structure
{
auto_translation_enabled: Boolean, #
auto_translation_language: String, #
config_overrides: ChannelConfig, #
custom: Hash, #
disabled: Boolean, #
frozen: Boolean, #
team: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | Boolean | No | |
| auto_translation_language | String | No | |
| config_overrides | ChannelConfig | No | |
| custom | Hash | No | |
| disabled | Boolean | No | |
| frozen | Boolean | No | |
| team | String | No |
ChannelExport
# ChannelExport hash structure
{
cid: String, #
id: String, # Channel ID
messages_since: Numeric, # Date to export messages since
messages_until: Numeric, # Date to export messages until
type: String # Channel type
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | No | |
| id | String | No | Channel ID |
| messages_since | Numeric | No | Date to export messages since |
| messages_until | Numeric | No | Date to export messages until |
| type | String | No | Channel type |
ChannelInput
# ChannelInput hash structure
{
auto_translation_enabled: Boolean, # Enable or disable auto translation
auto_translation_language: String, # Switch auto translation language
config_overrides: ChannelConfig, #
created_by: UserRequest, #
created_by_id: String, #
custom: Hash, #
disabled: Boolean, #
filter_tags: Array, #
frozen: Boolean, # Freeze or unfreeze the channel
invites: Array, #
members: Array, #
team: String, # Team the channel belongs to (if multi-tenant mode is enabled)
truncated_by_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | Boolean | No | Enable or disable auto translation |
| auto_translation_language | String | No | Switch auto translation language |
| config_overrides | ChannelConfig | No | |
| created_by | UserRequest | No | |
| created_by_id | String | No | |
| custom | Hash | No | |
| disabled | Boolean | No | |
| filter_tags | Array | No | |
| frozen | Boolean | No | Freeze or unfreeze the channel |
| invites | Array | No | |
| members | Array | No | |
| team | String | No | Team the channel belongs to (if multi-tenant mode is enabled) |
| truncated_by_id | String | No |
ChannelInputRequest
# ChannelInputRequest hash structure
{
auto_translation_enabled: Boolean, #
auto_translation_language: String, #
config_overrides: ConfigOverridesRequest, #
created_by: UserRequest, #
custom: Hash, #
disabled: Boolean, #
frozen: Boolean, #
invites: Array, #
members: Array, #
team: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | Boolean | No | |
| auto_translation_language | String | No | |
| config_overrides | ConfigOverridesRequest | No | |
| created_by | UserRequest | No | |
| custom | Hash | No | |
| disabled | Boolean | No | |
| frozen | Boolean | No | |
| invites | Array | No | |
| members | Array | No | |
| team | String | No |
ChannelMemberRequest
# ChannelMemberRequest hash structure
{
channel_role: String, # Role of the member in the channel
custom: Hash, #
user: UserResponse, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | |
| channel_role | String | No | Role of the member in the channel |
| custom | Hash | No | |
| user | UserResponse | No |
ChannelMemberResponse
# ChannelMemberResponse hash structure
{
archived_at: Numeric, #
ban_expires: Numeric, # Expiration date of the ban
banned: Boolean, # Whether member is banned this channel or not
channel_role: String, # Role of the member in the channel
created_at: Numeric, # Date/time of creation
custom: Hash, #
deleted_at: Numeric, #
deleted_messages: Array, #
invite_accepted_at: Numeric, # Date when invite was accepted
invite_rejected_at: Numeric, # Date when invite was rejected
invited: Boolean, # Whether member was invited or not
is_moderator: Boolean, # Whether member is channel moderator or not
notifications_muted: Boolean, #
pinned_at: Numeric, #
role: String, # Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner
shadow_banned: Boolean, # Whether member is shadow banned in this channel or not
status: String, #
updated_at: Numeric, # Date/time of the last update
user: UserResponse, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Boolean | Yes | Whether member is banned this channel or not |
| channel_role | String | Yes | Role of the member in the channel |
| created_at | Numeric | Yes | Date/time of creation |
| custom | Hash | Yes | |
| notifications_muted | Boolean | Yes | |
| shadow_banned | Boolean | Yes | Whether member is shadow banned in this channel or not |
| updated_at | Numeric | Yes | Date/time of the last update |
| archived_at | Numeric | No | |
| ban_expires | Numeric | No | Expiration date of the ban |
| deleted_at | Numeric | No | |
| deleted_messages | Array | No | |
| invite_accepted_at | Numeric | No | Date when invite was accepted |
| invite_rejected_at | Numeric | 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 | Numeric | No | |
| role | String | No | Permission level of the member in the channel (DEPRECATED: use channel_role i... |
| status | String | No | |
| user | UserResponse | No | |
| user_id | String | No |
ChannelMute
# ChannelMute hash structure
{
channel: ChannelResponse, # Channel that is muted
created_at: Numeric, # Date/time of creation
expires: Numeric, # Date/time of mute expiration
updated_at: Numeric, # Date/time of the last update
user: UserResponse # Owner of channel mute
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | Date/time of creation |
| updated_at | Numeric | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel that is muted |
| expires | Numeric | No | Date/time of mute expiration |
| user | UserResponse | No | Owner of channel mute |
ChannelPushPreferencesResponse
# ChannelPushPreferencesResponse hash structure
{
chat_level: String, #
chat_preferences: ChatPreferencesResponse, #
disabled_until: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| chat_level | String | No | |
| chat_preferences | ChatPreferencesResponse | No | |
| disabled_until | Numeric | No |
ChannelResponse
Represents channel in chat
# ChannelResponse hash structure
{
auto_translation_enabled: Boolean, # Whether auto translation is enabled or not
auto_translation_language: String, # Language to translate to when auto translation is active
blocked: Boolean, # Whether this channel is blocked by current user or not
cid: String, # Channel CID (<type>:<id>)
config: ChannelConfigWithInfo, # Channel configuration
cooldown: Numeric, # Cooldown period after sending each message
created_at: Numeric, # Date/time of creation
created_by: UserResponse, # Creator of the channel
custom: Hash, # Custom data for this object
deleted_at: Numeric, # Date/time of deletion
disabled: Boolean, #
filter_tags: Array, # List of filter tags associated with the channel
frozen: Boolean, # Whether channel is frozen or not
hidden: Boolean, # Whether this channel is hidden by current user or not
hide_messages_before: Numeric, # Date since when the message history is accessible
id: String, # Channel unique ID
last_message_at: Numeric, # Date of the last message sent
member_count: Numeric, # Number of members in the channel
members: Array, # List of channel members (max 100)
message_count: Numeric, # Number of messages in the channel
mute_expires_at: Numeric, # Date of mute expiration
muted: Boolean, # Whether this channel is muted or not
own_capabilities: Array, # List of channel capabilities of authenticated user
team: String, # Team the channel belongs to (multi-tenant only)
truncated_at: Numeric, # Date of the latest truncation of the channel
truncated_by: UserResponse, #
type: String, # Type of the channel
updated_at: Numeric # Date/time of the last update
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | Yes | Channel CID (<type>:<id>) |
| created_at | Numeric | Yes | Date/time of creation |
| custom | Hash | 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 | Numeric | 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 | Numeric | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | Numeric | No | Date/time of deletion |
| filter_tags | Array | 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 | Numeric | No | Date since when the message history is accessible |
| last_message_at | Numeric | No | Date of the last message sent |
| member_count | Numeric | No | Number of members in the channel |
| members | Array | No | List of channel members (max 100) |
| message_count | Numeric | No | Number of messages in the channel |
| mute_expires_at | Numeric | No | Date of mute expiration |
| muted | Boolean | No | Whether this channel is muted or not |
| own_capabilities | Array | No | List of channel capabilities of authenticated user |
| team | String | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | Numeric | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChannelStateResponse
# ChannelStateResponse hash structure
{
active_live_locations: Array, #
channel: ChannelResponse, #
draft: DraftResponse, #
duration: String, #
hidden: Boolean, #
hide_messages_before: Numeric, #
members: Array, #
membership: ChannelMemberResponse, #
messages: Array, #
pending_messages: Array, #
pinned_messages: Array, #
push_preferences: ChannelPushPreferencesResponse, #
read: Array, #
threads: Array, #
watcher_count: Numeric, #
watchers: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| members | Array | Yes | |
| messages | Array | Yes | |
| pinned_messages | Array | Yes | |
| threads | Array | Yes | |
| active_live_locations | Array | No | |
| channel | ChannelResponse | No | |
| draft | DraftResponse | No | |
| hidden | Boolean | No | |
| hide_messages_before | Numeric | No | |
| membership | ChannelMemberResponse | No | |
| pending_messages | Array | No | |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | Array | No | |
| watcher_count | Numeric | No | |
| watchers | Array | No |
ChannelStateResponseFields
# ChannelStateResponseFields hash structure
{
active_live_locations: Array, # Active live locations in the channel
channel: ChannelResponse, #
draft: DraftResponse, #
hidden: Boolean, # Whether this channel is hidden or not
hide_messages_before: Numeric, # Messages before this date are hidden from the user
members: Array, # List of channel members
membership: ChannelMemberResponse, # Current user membership object
messages: Array, # List of channel messages
pending_messages: Array, # Pending messages that this user has sent
pinned_messages: Array, # List of pinned messages in the channel
push_preferences: ChannelPushPreferencesResponse, #
read: Array, # List of read states
threads: Array, #
watcher_count: Numeric, # Number of channel watchers
watchers: Array # List of user who is watching the channel
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| members | Array | Yes | List of channel members |
| messages | Array | Yes | List of channel messages |
| pinned_messages | Array | Yes | List of pinned messages in the channel |
| threads | Array | Yes | |
| active_live_locations | Array | 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 | Numeric | No | Messages before this date are hidden from the user |
| membership | ChannelMemberResponse | No | Current user membership object |
| pending_messages | Array | No | Pending messages that this user has sent |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | Array | No | List of read states |
| watcher_count | Numeric | No | Number of channel watchers |
| watchers | Array | No | List of user who is watching the channel |
ChatPreferences
# ChatPreferences hash structure
{
channel_mentions: String, #
default_preference: String, #
direct_mentions: String, #
distinct_channel_messages: String, #
group_mentions: String, #
here_mentions: String, #
role_mentions: String, #
thread_replies: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_mentions | String | No | |
| default_preference | String | No | |
| direct_mentions | String | No | |
| distinct_channel_messages | String | No | |
| group_mentions | String | No | |
| here_mentions | String | No | |
| role_mentions | String | No | |
| thread_replies | String | No |
Command
Represents custom chat command
# Command hash structure
{
args: String, # Arguments help text, shown in commands auto-completion
created_at: Numeric, # Date/time of creation
description: String, # Description, shown in commands auto-completion
name: String, # Unique command name
set: String, # Set name used for grouping commands
updated_at: Numeric # Date/time of the last update
}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 | Numeric | No | Date/time of creation |
| updated_at | Numeric | No | Date/time of the last update |
ConfigOverridesRequest
Channel configuration overrides
# ConfigOverridesRequest hash structure
{
blocklist: String, # Blocklist name
blocklist_behavior: String, # Blocklist behavior. One of: flag, block
chat_preferences: ChatPreferences, #
commands: Array, # List of available commands
count_messages: Boolean, # Enable/disable message counting
grants: Hash, # Permission grants modifiers
max_message_length: Numeric, # Maximum message length
push_level: String, #
quotes: Boolean, # Enable/disable quotes
reactions: Boolean, # Enable/disable reactions
replies: Boolean, # Enable/disable replies
shared_locations: Boolean, # Enable/disable shared locations
typing_events: Boolean, # Enable/disable typing events
uploads: Boolean, # Enable/disable uploads
url_enrichment: Boolean, # Enable/disable URL enrichment
user_message_reminders: Boolean # Enable/disable 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 | Array | No | List of available commands |
| count_messages | Boolean | No | Enable/disable message counting |
| grants | Hash | No | Permission grants modifiers |
| max_message_length | Numeric | 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
# CreateChannelTypeResponse hash structure
{
allowed_flag_reasons: Array, #
automod: String, #
automod_behavior: String, #
automod_thresholds: Thresholds, #
blocklist: String, #
blocklist_behavior: String, #
blocklists: Array, #
chat_preferences: ChatPreferences, #
commands: Array, #
connect_events: Boolean, #
count_messages: Boolean, #
created_at: Numeric, #
custom_events: Boolean, #
delivery_events: Boolean, #
duration: String, #
grants: Hash, #
mark_messages_pending: Boolean, #
max_message_length: Numeric, #
mutes: Boolean, #
name: String, #
partition_size: Numeric, #
partition_ttl: String, #
permissions: Array, #
polls: Boolean, #
push_level: String, #
push_notifications: Boolean, #
quotes: Boolean, #
reactions: Boolean, #
read_events: Boolean, #
reminders: Boolean, #
replies: Boolean, #
search: Boolean, #
shared_locations: Boolean, #
skip_last_msg_update_for_system_msgs: Boolean, #
typing_events: Boolean, #
updated_at: Numeric, #
uploads: Boolean, #
url_enrichment: Boolean, #
user_message_reminders: Boolean #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | Array | Yes | |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Numeric | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| duration | String | Yes | |
| grants | Hash | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Numeric | Yes | |
| mutes | Boolean | Yes | |
| name | String | Yes | |
| permissions | Array | 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 | Numeric | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | Array | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | Array | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Numeric | No | |
| partition_ttl | String | No | |
| push_level | String | No |
CreateCommandResponse
# CreateCommandResponse hash structure
{
command: Command, # Command object
duration: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| command | Command | No | Command object |
CustomEvent
# CustomEvent hash structure
{
created_at: Numeric, #
custom: Hash, #
received_at: Numeric, #
type: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | |
| custom | Hash | Yes | |
| type | String | Yes | |
| received_at | Numeric | No |
Data
# Data hash structure
{
id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes |
DeleteChannelResponse
Basic response information
# DeleteChannelResponse hash structure
{
channel: ChannelResponse, #
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| channel | ChannelResponse | No |
DeleteChannelsResponse
# DeleteChannelsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
result: Hash, # Map of channel IDs and their deletion results
task_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| result | Hash | No | Map of channel IDs and their deletion results |
| task_id | String | No |
DeleteCommandResponse
# DeleteCommandResponse hash structure
{
duration: String, #
name: String # Command name
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| name | String | Yes | Command name |
DeleteMessageResponse
Basic response information
# DeleteMessageResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes |
DeleteReactionResponse
Basic response information
# DeleteReactionResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse, #
reaction: ReactionResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| reaction | ReactionResponse | Yes |
DeleteReminderResponse
Basic response information
# DeleteReminderResponse hash structure
{
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
DeleteRetentionPolicyResponse
Basic response information
# DeleteRetentionPolicyResponse hash structure
{
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
DeliveredMessagePayload
# DeliveredMessagePayload hash structure
{
cid: String, #
id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | No | |
| id | String | No |
DraftResponse
# DraftResponse hash structure
{
channel: ChannelResponse, #
channel_cid: String, #
created_at: Numeric, #
message: DraftPayloadResponse, #
parent_id: String, #
parent_message: MessageResponse, #
quoted_message: MessageResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Numeric | Yes | |
| message | DraftPayloadResponse | Yes | |
| channel | ChannelResponse | No | |
| parent_id | String | No | |
| parent_message | MessageResponse | No | |
| quoted_message | MessageResponse | No |
EventRequest
# EventRequest hash structure
{
custom: Hash, #
parent_id: String, #
type: String, #
user: UserRequest, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | |
| custom | Hash | No | |
| parent_id | String | No | |
| user | UserRequest | No | |
| user_id | String | No |
EventResponse
Basic response information
# EventResponse hash structure
{
duration: String, # Duration of the request in milliseconds
event: WSEvent #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| event | WSEvent | Yes |
ExportChannelsResponse
# ExportChannelsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
task_id: String # ID of the task to export channels
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| task_id | String | Yes | ID of the task to export channels |
FutureChannelBanResponse
# FutureChannelBanResponse hash structure
{
banned_by: UserResponse, #
created_at: Numeric, #
expires: Numeric, #
reason: String, #
shadow: Boolean, #
user: UserResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | |
| banned_by | UserResponse | No | |
| expires | Numeric | No | |
| reason | String | No | |
| shadow | Boolean | No | |
| user | UserResponse | No |
GetCampaignResponse
Basic response information
# GetCampaignResponse hash structure
{
campaign: CampaignResponse, #
duration: String, # Duration of the request in milliseconds
users: PagerResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| campaign | CampaignResponse | No | |
| users | PagerResponse | No |
GetChannelTypeResponse
Basic response information
# GetChannelTypeResponse hash structure
{
allowed_flag_reasons: Array, #
automod: String, #
automod_behavior: String, #
automod_thresholds: Thresholds, #
blocklist: String, #
blocklist_behavior: String, #
blocklists: Array, #
chat_preferences: ChatPreferences, #
commands: Array, #
connect_events: Boolean, #
count_messages: Boolean, #
created_at: Numeric, #
custom_events: Boolean, #
delivery_events: Boolean, #
duration: String, # Duration of the request in milliseconds
grants: Hash, #
mark_messages_pending: Boolean, #
max_message_length: Numeric, #
mutes: Boolean, #
name: String, #
partition_size: Numeric, #
partition_ttl: String, #
permissions: Array, #
polls: Boolean, #
push_level: String, #
push_notifications: Boolean, #
quotes: Boolean, #
reactions: Boolean, #
read_events: Boolean, #
reminders: Boolean, #
replies: Boolean, #
search: Boolean, #
shared_locations: Boolean, #
skip_last_msg_update_for_system_msgs: Boolean, #
typing_events: Boolean, #
updated_at: Numeric, #
uploads: Boolean, #
url_enrichment: Boolean, #
user_message_reminders: Boolean #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | Array | Yes | |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Numeric | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
| grants | Hash | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Numeric | Yes | |
| mutes | Boolean | Yes | |
| name | String | Yes | |
| permissions | Array | 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 | Numeric | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | Array | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | Array | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Numeric | No | |
| partition_ttl | String | No | |
| push_level | String | No |
GetCommandResponse
# GetCommandResponse hash structure
{
args: String, #
created_at: Numeric, #
description: String, #
duration: String, #
name: String, #
set: String, #
updated_at: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| args | String | Yes | |
| description | String | Yes | |
| duration | String | Yes | |
| name | String | Yes | |
| set | String | Yes | |
| created_at | Numeric | No | |
| updated_at | Numeric | No |
GetDraftResponse
Basic response information
# GetDraftResponse hash structure
{
draft: DraftResponse, #
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| draft | DraftResponse | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
GetManyMessagesResponse
# GetManyMessagesResponse hash structure
{
duration: String, #
messages: Array # List of messages
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| messages | Array | Yes | List of messages |
GetMessageResponse
Basic response information
# GetMessageResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageWithChannelResponse, #
pending_message_metadata: Hash #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageWithChannelResponse | Yes | |
| pending_message_metadata | Hash | No |
GetReactionsResponse
# GetReactionsResponse hash structure
{
duration: String, #
reactions: Array # List of reactions
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| reactions | Array | Yes | List of reactions |
GetRepliesResponse
Basic response information
# GetRepliesResponse hash structure
{
duration: String, # Duration of the request in milliseconds
messages: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| messages | Array | Yes |
GetRetentionPolicyResponse
Basic response information
# GetRetentionPolicyResponse hash structure
{
duration: String, # Duration of the request in milliseconds
policies: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| policies | Array | Yes |
GetRetentionPolicyRunsResponse
Basic response information
# GetRetentionPolicyRunsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String, #
runs: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| runs | Array | Yes | |
| next | String | No | |
| prev | String | No |
GetSegmentResponse
# GetSegmentResponse hash structure
{
duration: String, # Duration of the request in milliseconds
segment: SegmentResponse # Segment
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| segment | SegmentResponse | No | Segment |
GetThreadResponse
# GetThreadResponse hash structure
{
duration: String, #
thread: ThreadStateResponse # Enriched thread state
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| thread | ThreadStateResponse | Yes | Enriched thread state |
HideChannelResponse
Basic response information
# HideChannelResponse hash structure
{
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
ImageSize
# ImageSize hash structure
{
crop: String, # Crop mode. One of: top, bottom, left, right, center
height: Numeric, # Target image height
resize: String, # Resize method. One of: clip, crop, scale, fill
width: Numeric # Target image width
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | String | No | Crop mode. One of: top, bottom, left, right, center |
| height | Numeric | No | Target image height |
| resize | String | No | Resize method. One of: clip, crop, scale, fill |
| width | Numeric | No | Target image width |
LabelThresholds
# LabelThresholds hash structure
{
block: Numeric, # Threshold for automatic message block
flag: Numeric # Threshold for automatic message flag
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| block | Numeric | No | Threshold for automatic message block |
| flag | Numeric | No | Threshold for automatic message flag |
ListChannelTypesResponse
# ListChannelTypesResponse hash structure
{
channel_types: Hash, # Object with all channel types
duration: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_types | Hash | Yes | Object with all channel types |
| duration | String | Yes |
ListCommandsResponse
# ListCommandsResponse hash structure
{
commands: Array, # List of commands
duration: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| commands | Array | Yes | List of commands |
| duration | String | Yes |
MarkDeliveredResponse
Basic response information
# MarkDeliveredResponse hash structure
{
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
MarkReadResponse
# MarkReadResponse hash structure
{
duration: String, # Duration of the request in milliseconds
event: MarkReadResponseEvent # Mark read event
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| event | MarkReadResponseEvent | No | Mark read event |
MarkReadResponseEvent
# MarkReadResponseEvent hash structure
{
channel: ChannelResponse, #
channel_id: String, #
channel_last_message_at: Numeric, #
channel_type: String, #
cid: String, #
created_at: Numeric, #
last_read_message_id: String, #
team: String, #
thread: ThreadResponse, #
type: String, #
user: UserResponseCommonFields #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | String | Yes | |
| channel_type | String | Yes | |
| cid | String | Yes | |
| created_at | Numeric | Yes | |
| type | String | Yes | |
| channel | ChannelResponse | No | |
| channel_last_message_at | Numeric | No | |
| last_read_message_id | String | No | |
| team | String | No | |
| thread | ThreadResponse | No | |
| user | UserResponseCommonFields | No |
MembersResponse
# MembersResponse hash structure
{
duration: String, # Duration of the request in milliseconds
members: Array # List of found members
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| members | Array | Yes | List of found members |
MessageActionResponse
Basic response information
# MessageActionResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | No |
MessageFlagResponse
# MessageFlagResponse hash structure
{
approved_at: Numeric, #
created_at: Numeric, #
created_by_automod: Boolean, #
custom: Hash, #
details: FlagDetailsResponse, #
message: MessageResponse, #
moderation_feedback: FlagFeedbackResponse, #
moderation_result: MessageModerationResult, #
reason: String, #
rejected_at: Numeric, #
reviewed_at: Numeric, #
reviewed_by: UserResponse, #
updated_at: Numeric, #
user: UserResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | |
| created_by_automod | Boolean | Yes | |
| updated_at | Numeric | Yes | |
| approved_at | Numeric | No | |
| custom | Hash | No | |
| details | FlagDetailsResponse | No | |
| message | MessageResponse | No | |
| moderation_feedback | FlagFeedbackResponse | No | |
| moderation_result | MessageModerationResult | No | |
| reason | String | No | |
| rejected_at | Numeric | No | |
| reviewed_at | Numeric | No | |
| reviewed_by | UserResponse | No | |
| user | UserResponse | No |
MessageHistoryEntryResponse
# MessageHistoryEntryResponse hash structure
{
Custom: Hash, #
attachments: Array, #
is_deleted: Boolean, #
message_id: String, #
message_updated_at: Numeric, #
message_updated_by_id: String, #
text: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Custom | Hash | Yes | |
| attachments | Array | Yes | |
| is_deleted | Boolean | Yes | |
| message_id | String | Yes | |
| message_updated_at | Numeric | Yes | |
| message_updated_by_id | String | Yes | |
| text | String | Yes |
MessagePaginationParams
# MessagePaginationParams hash structure
{
created_at_after: Numeric, # The timestamp to get messages with a created_at timestamp greater than
created_at_after_or_equal: Numeric, # The timestamp to get messages with a created_at timestamp greater than or equal to
created_at_around: Numeric, # The result will be a set of messages, that are both older and newer than the created_at timestamp provided, distributed evenly around the timestamp
created_at_before: Numeric, # The timestamp to get messages with a created_at timestamp smaller than
created_at_before_or_equal: Numeric, # The timestamp to get messages with a created_at timestamp smaller than or equal to
id_around: String, # The result will be a set of messages, that are both older and newer than the message with the provided ID, and the message with the ID provided will be in the middle of the set
id_gt: String, # The ID of the message to get messages with a timestamp greater than
id_gte: String, # The ID of the message to get messages with a timestamp greater than or equal to
id_lt: String, # The ID of the message to get messages with a timestamp smaller than
id_lte: String, # The ID of the message to get messages with a timestamp smaller than or equal to
limit: Numeric # The maximum number of messages to return (max limit
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at_after | Numeric | No | The timestamp to get messages with a created_at timestamp greater than |
| created_at_after_or_equal | Numeric | No | The timestamp to get messages with a created_at timestamp greater than or equ... |
| created_at_around | Numeric | No | The result will be a set of messages, that are both older and newer than the ... |
| created_at_before | Numeric | No | The timestamp to get messages with a created_at timestamp smaller than |
| created_at_before_or_equal | Numeric | 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 | Numeric | No | The maximum number of messages to return (max limit |
MessageRequest
Message data for creating or updating a message
# MessageRequest hash structure
{
attachments: Array, # Array of message attachments
custom: Hash, #
html: String, # Contains HTML markup of the message. Can only be set when using server-side API
id: String, # Message ID is unique string identifier of the message
mentioned_channel: Boolean, #
mentioned_group_ids: Array, # List of user group IDs to mention. Group members who are also channel members will receive push notifications. Max 10 groups
mentioned_here: Boolean, #
mentioned_roles: Array, #
mentioned_users: Array, # Array of user IDs to mention
mml: String, # Should be empty if `text` is provided. Can only be set when using server-side API
parent_id: String, # ID of parent message (thread)
pin_expires: Numeric, # Date when pinned message expires
pinned: Boolean, # Whether message is pinned or not
pinned_at: String, # Date when message got pinned
poll_id: String, # Identifier of the poll to include in the message
quoted_message_id: String, #
restricted_visibility: Array, # A list of user ids that have restricted visibility to the message
shared_location: SharedLocation, # Contains shared location data
show_in_channel: Boolean, # Whether thread reply should be shown in the channel as well
silent: Boolean, # Whether message is silent or not
text: String, # Text of the message. Should be empty if `mml` is provided
type: String, # Contains type of the message. One of: regular, system
user: UserRequest, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Array | No | Array of message attachments |
| custom | Hash | 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 | Array | No | List of user group IDs to mention. Group members who are also channel members... |
| mentioned_here | Boolean | No | |
| mentioned_roles | Array | No | |
| mentioned_users | Array | 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 | Numeric | 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 | Array | 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
# MessageResponse hash structure
{
attachments: Array, # Array of message attachments
cid: String, # Channel unique identifier in <type>:<id> format
command: String, # Contains provided slash command
created_at: Numeric, # Date/time of creation
custom: Hash, #
deleted_at: Numeric, # Date/time of deletion
deleted_for_me: Boolean, #
deleted_reply_count: Numeric, #
draft: DraftResponse, #
html: String, # Contains HTML markup of the message. Can only be set when using server-side API
i18n: Hash, # Object with translations. Key `language` contains the original language key. Other keys contain translations
id: String, # Message ID is unique string identifier of the message
image_labels: Hash, # Contains image moderation information
latest_reactions: Array, # List of 10 latest reactions to this message
member: ChannelMemberResponse, # Channel member data for the message sender including only the `channel_role`
mentioned_channel: Boolean, # Whether the message mentioned the channel tag
mentioned_group_ids: Array, # List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
mentioned_here: Boolean, # Whether the message mentioned online users with @here tag
mentioned_roles: Array, # List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
mentioned_users: Array, # List of mentioned users
message_text_updated_at: Numeric, #
mml: String, # Should be empty if `text` is provided. Can only be set when using server-side API
moderation: ModerationV2Response, #
own_reactions: Array, # List of 10 latest reactions of authenticated user to this message
parent_id: String, # ID of parent message (thread)
pin_expires: Numeric, # Date when pinned message expires
pinned: Boolean, # Whether message is pinned or not
pinned_at: Numeric, # Date when message got pinned
pinned_by: UserResponse, # Contains user who pinned the message
poll: PollResponseData, #
poll_id: String, # Identifier of the poll to include in the message
quoted_message: MessageResponse, # Contains quoted message
quoted_message_id: String, #
reaction_counts: Hash, # An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
reaction_groups: Hash, #
reaction_scores: Hash, # An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
reminder: ReminderResponseData, #
reply_count: Numeric, # Number of replies to this message
restricted_visibility: Array, # A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list
shadowed: Boolean, # Whether the message was shadowed or not
shared_location: SharedLocationResponseData, # Contains shared location data
show_in_channel: Boolean, # Whether thread reply should be shown in the channel as well
silent: Boolean, # Whether message is silent or not
text: String, # Text of the message. Should be empty if `mml` is provided
thread_participants: Array, # List of users who participate in thread
type: String, # Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted
updated_at: Numeric, # Date/time of the last update
user: UserResponse # Sender of the message. Required when using server-side API
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Array | Yes | Array of message attachments |
| cid | String | Yes | Channel unique identifier in <type>:<id> format |
| created_at | Numeric | Yes | Date/time of creation |
| custom | Hash | Yes | |
| deleted_reply_count | Numeric | 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 | Array | 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 | Array | Yes | List of mentioned users |
| own_reactions | Array | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | Boolean | Yes | Whether message is pinned or not |
| reaction_counts | Hash | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Hash | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | Numeric | Yes | Number of replies to this message |
| restricted_visibility | Array | 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 | Numeric | 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 | Numeric | No | Date/time of deletion |
| deleted_for_me | Boolean | No | |
| draft | DraftResponse | No | |
| i18n | Hash | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Hash | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | Array | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | Array | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | Numeric | 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 | Numeric | No | Date when pinned message expires |
| pinned_at | Numeric | 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 | Hash | 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 | Array | No | List of users who participate in thread |
MessageWithChannelResponse
Represents any chat message
# MessageWithChannelResponse hash structure
{
attachments: Array, # Array of message attachments
channel: ChannelResponse, # Channel object
cid: String, # Channel unique identifier in <type>:<id> format
command: String, # Contains provided slash command
created_at: Numeric, # Date/time of creation
custom: Hash, #
deleted_at: Numeric, # Date/time of deletion
deleted_for_me: Boolean, #
deleted_reply_count: Numeric, #
draft: DraftResponse, #
html: String, # Contains HTML markup of the message. Can only be set when using server-side API
i18n: Hash, # Object with translations. Key `language` contains the original language key. Other keys contain translations
id: String, # Message ID is unique string identifier of the message
image_labels: Hash, # Contains image moderation information
latest_reactions: Array, # List of 10 latest reactions to this message
member: ChannelMemberResponse, # Channel member data for the message sender including only the `channel_role`
mentioned_channel: Boolean, # Whether the message mentioned the channel tag
mentioned_group_ids: Array, # List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
mentioned_here: Boolean, # Whether the message mentioned online users with @here tag
mentioned_roles: Array, # List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
mentioned_users: Array, # List of mentioned users
message_text_updated_at: Numeric, #
mml: String, # Should be empty if `text` is provided. Can only be set when using server-side API
moderation: ModerationV2Response, #
own_reactions: Array, # List of 10 latest reactions of authenticated user to this message
parent_id: String, # ID of parent message (thread)
pin_expires: Numeric, # Date when pinned message expires
pinned: Boolean, # Whether message is pinned or not
pinned_at: Numeric, # Date when message got pinned
pinned_by: UserResponse, # Contains user who pinned the message
poll: PollResponseData, #
poll_id: String, # Identifier of the poll to include in the message
quoted_message: MessageResponse, # Contains quoted message
quoted_message_id: String, #
reaction_counts: Hash, # An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
reaction_groups: Hash, #
reaction_scores: Hash, # An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
reminder: ReminderResponseData, #
reply_count: Numeric, # Number of replies to this message
restricted_visibility: Array, # A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list
shadowed: Boolean, # Whether the message was shadowed or not
shared_location: SharedLocationResponseData, # Contains shared location data
show_in_channel: Boolean, # Whether thread reply should be shown in the channel as well
silent: Boolean, # Whether message is silent or not
text: String, # Text of the message. Should be empty if `mml` is provided
thread_participants: Array, # List of users who participate in thread
type: String, # Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted
updated_at: Numeric, # Date/time of the last update
user: UserResponse # Sender of the message. Required when using server-side API
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Array | Yes | Array of message attachments |
| channel | ChannelResponse | Yes | Channel object |
| cid | String | Yes | Channel unique identifier in <type>:<id> format |
| created_at | Numeric | Yes | Date/time of creation |
| custom | Hash | Yes | |
| deleted_reply_count | Numeric | 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 | Array | 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 | Array | Yes | List of mentioned users |
| own_reactions | Array | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | Boolean | Yes | Whether message is pinned or not |
| reaction_counts | Hash | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Hash | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | Numeric | Yes | Number of replies to this message |
| restricted_visibility | Array | 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 | Numeric | 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 | Numeric | No | Date/time of deletion |
| deleted_for_me | Boolean | No | |
| draft | DraftResponse | No | |
| i18n | Hash | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Hash | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | Array | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | Array | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | Numeric | 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 | Numeric | No | Date when pinned message expires |
| pinned_at | Numeric | 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 | Hash | 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 | Array | No | List of users who participate in thread |
MuteChannelResponse
# MuteChannelResponse hash structure
{
channel_mute: ChannelMute, # Object with channel mute (if one channel was muted)
channel_mutes: Array, # Object with mutes (if multiple channels were muted)
duration: String, #
own_user: OwnUserResponse # Authorized user object with fresh mutes information
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| channel_mute | ChannelMute | No | Object with channel mute (if one channel was muted) |
| channel_mutes | Array | No | Object with mutes (if multiple channels were muted) |
| own_user | OwnUserResponse | No | Authorized user object with fresh mutes information |
OnlyUserID
# OnlyUserID hash structure
{
id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes |
OwnUserResponse
# OwnUserResponse hash structure
{
avg_response_time: Numeric, #
banned: Boolean, #
blocked_user_ids: Array, #
channel_mutes: Array, #
created_at: Numeric, #
custom: Hash, #
deactivated_at: Numeric, #
deleted_at: Numeric, #
devices: Array, #
id: String, #
image: String, #
invisible: Boolean, #
language: String, #
last_active: Numeric, #
latest_hidden_channels: Array, #
mutes: Array, #
name: String, #
online: Boolean, #
privacy_settings: PrivacySettingsResponse, #
push_preferences: PushPreferencesResponse, #
revoke_tokens_issued_before: Numeric, #
role: String, #
teams: Array, #
teams_role: Hash, #
total_unread_count: Numeric, #
total_unread_count_by_team: Hash, #
unread_channels: Numeric, #
unread_count: Numeric, #
unread_threads: Numeric, #
updated_at: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Boolean | Yes | |
| channel_mutes | Array | Yes | |
| created_at | Numeric | Yes | |
| custom | Hash | Yes | |
| devices | Array | Yes | |
| id | String | Yes | |
| invisible | Boolean | Yes | |
| language | String | Yes | |
| mutes | Array | Yes | |
| online | Boolean | Yes | |
| role | String | Yes | |
| teams | Array | Yes | |
| total_unread_count | Numeric | Yes | |
| unread_channels | Numeric | Yes | |
| unread_count | Numeric | Yes | |
| unread_threads | Numeric | Yes | |
| updated_at | Numeric | Yes | |
| avg_response_time | Numeric | No | |
| blocked_user_ids | Array | No | |
| deactivated_at | Numeric | No | |
| deleted_at | Numeric | No | |
| image | String | No | |
| last_active | Numeric | No | |
| latest_hidden_channels | Array | No | |
| name | String | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | Numeric | No | |
| teams_role | Hash | No | |
| total_unread_count_by_team | Hash | No |
PagerResponse
# PagerResponse hash structure
{
next: String, #
prev: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | String | No | |
| prev | String | No |
PaginationParams
# PaginationParams hash structure
{
limit: Numeric, #
offset: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | Numeric | No | |
| offset | Numeric | No |
ParsedPredefinedFilterResponse
# ParsedPredefinedFilterResponse hash structure
{
filter: Hash, #
name: String, #
sort: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| filter | Hash | Yes | |
| name | String | Yes | |
| sort | Array | No |
PendingMessageResponse
# PendingMessageResponse hash structure
{
channel: ChannelResponse, #
message: MessageResponse, #
metadata: Hash, #
user: UserResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| metadata | Hash | No | |
| user | UserResponse | No |
Policy
# Policy hash structure
{
action: Numeric, #
created_at: Numeric, #
name: String, #
owner: Boolean, #
priority: Numeric, #
resources: Array, #
roles: Array, #
updated_at: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | Numeric | Yes | |
| created_at | Numeric | Yes | |
| name | String | Yes | |
| owner | Boolean | Yes | |
| priority | Numeric | Yes | |
| resources | Array | Yes | |
| roles | Array | Yes | |
| updated_at | Numeric | Yes |
PolicyRequest
Policy request
# PolicyRequest hash structure
{
action: String, #
name: String, # User-friendly policy name
owner: Boolean, # Whether policy applies to resource owner or not
priority: Numeric, # Policy priority
resources: Array, # List of resources to apply policy to
roles: Array # List of roles to apply policy to
}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 | Numeric | Yes | Policy priority |
| resources | Array | Yes | List of resources to apply policy to |
| roles | Array | Yes | List of roles to apply policy to |
PollResponseData
# PollResponseData hash structure
{
allow_answers: Boolean, #
allow_user_suggested_options: Boolean, #
answers_count: Numeric, #
created_at: Numeric, #
created_by: UserResponse, #
created_by_id: String, #
custom: Hash, #
description: String, #
enforce_unique_vote: Boolean, #
id: String, #
is_closed: Boolean, #
latest_answers: Array, #
latest_votes_by_option: Hash, #
max_votes_allowed: Numeric, #
name: String, #
options: Array, #
own_votes: Array, #
updated_at: Numeric, #
vote_count: Numeric, #
vote_counts_by_option: Hash, #
voting_visibility: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | Boolean | Yes | |
| allow_user_suggested_options | Boolean | Yes | |
| answers_count | Numeric | Yes | |
| created_at | Numeric | Yes | |
| created_by_id | String | Yes | |
| custom | Hash | Yes | |
| description | String | Yes | |
| enforce_unique_vote | Boolean | Yes | |
| id | String | Yes | |
| latest_answers | Array | Yes | |
| latest_votes_by_option | Hash | Yes | |
| name | String | Yes | |
| options | Array | Yes | |
| own_votes | Array | Yes | |
| updated_at | Numeric | Yes | |
| vote_count | Numeric | Yes | |
| vote_counts_by_option | Hash | Yes | |
| voting_visibility | String | Yes | |
| created_by | UserResponse | No | |
| is_closed | Boolean | No | |
| max_votes_allowed | Numeric | No |
PollVoteResponse
# PollVoteResponse hash structure
{
duration: String, # Duration of the request in milliseconds
poll: PollResponseData, # Poll
vote: PollVoteResponseData # Poll 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
# PollVoteResponseData hash structure
{
answer_text: String, #
created_at: Numeric, #
id: String, #
is_answer: Boolean, #
option_id: String, #
poll_id: String, #
updated_at: Numeric, #
user: UserResponse, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | |
| id | String | Yes | |
| option_id | String | Yes | |
| poll_id | String | Yes | |
| updated_at | Numeric | Yes | |
| answer_text | String | No | |
| is_answer | Boolean | No | |
| user | UserResponse | No | |
| user_id | String | No |
PrivacySettingsResponse
# PrivacySettingsResponse hash structure
{
delivery_receipts: DeliveryReceiptsResponse, #
read_receipts: ReadReceiptsResponse, #
typing_indicators: TypingIndicatorsResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
QueryBannedUsersResponse
# QueryBannedUsersResponse hash structure
{
bans: Array, # List of found bans
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bans | Array | Yes | List of found bans |
| duration | String | Yes | Duration of the request in milliseconds |
QueryCampaignsResponse
Basic response information
# QueryCampaignsResponse hash structure
{
campaigns: Array, #
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| campaigns | Array | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
| next | String | No | |
| prev | String | No |
QueryChannelsResponse
# QueryChannelsResponse hash structure
{
channels: Array, # List of channels
duration: String, # Duration of the request in milliseconds
predefined_filter: ParsedPredefinedFilterResponse # The parsed predefined filter with interpolated values, only present when using a predefined filter
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channels | Array | Yes | List of channels |
| duration | String | Yes | Duration of the request in milliseconds |
| predefined_filter | ParsedPredefinedFilterResponse | No | The parsed predefined filter with interpolated values, only present when usin... |
QueryDraftsResponse
# QueryDraftsResponse hash structure
{
drafts: Array, # Drafts
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| drafts | Array | Yes | Drafts |
| duration | String | Yes | Duration of the request in milliseconds |
| next | String | No | |
| prev | String | No |
QueryFutureChannelBansResponse
# QueryFutureChannelBansResponse hash structure
{
bans: Array, # List of found future channel bans
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bans | Array | Yes | List of found future channel bans |
| duration | String | Yes | Duration of the request in milliseconds |
QueryMessageFlagsResponse
Query message flags response
# QueryMessageFlagsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
flags: Array # The flags that match the query
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| flags | Array | Yes | The flags that match the query |
QueryMessageHistoryResponse
# QueryMessageHistoryResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message_history: Array, # Message history entries
next: String, #
prev: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message_history | Array | Yes | Message history entries |
| next | String | No | |
| prev | String | No |
QueryReactionsResponse
Basic response information
# QueryReactionsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String, #
reactions: Array #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| reactions | Array | Yes | |
| next | String | No | |
| prev | String | No |
QueryRemindersResponse
# QueryRemindersResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String, #
reminders: Array # MessageReminders data returned by the query
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| reminders | Array | Yes | MessageReminders data returned by the query |
| next | String | No | |
| prev | String | No |
QuerySegmentTargetsResponse
# QuerySegmentTargetsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String, #
targets: Array # Targets
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| targets | Array | Yes | Targets |
| next | String | No | |
| prev | String | No |
QuerySegmentsResponse
# QuerySegmentsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String, #
segments: Array # Segments
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| segments | Array | Yes | Segments |
| next | String | No | |
| prev | String | No |
QueryTeamUsageStatsResponse
Response containing team-level usage statistics
# QueryTeamUsageStatsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, # Cursor for pagination to fetch next page
teams: Array # Array of team usage statistics
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| teams | Array | Yes | Array of team usage statistics |
| next | String | No | Cursor for pagination to fetch next page |
QueryThreadsResponse
# QueryThreadsResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, #
prev: String, #
threads: Array # List of enriched thread states
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| threads | Array | Yes | List of enriched thread states |
| next | String | No | |
| prev | String | No |
Reaction
# Reaction hash structure
{
activity_id: String, #
children_counts: Hash, #
created_at: Numeric, #
data: Hash, #
deleted_at: Numeric, #
id: String, #
kind: String, #
latest_children: Hash, #
moderation: Hash, #
own_children: Hash, #
parent: String, #
score: Numeric, #
target_feeds: Array, #
target_feeds_extra_data: Hash, #
updated_at: Numeric, #
user: User, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | |
| created_at | Numeric | Yes | |
| kind | String | Yes | |
| updated_at | Numeric | Yes | |
| user_id | String | Yes | |
| children_counts | Hash | No | |
| data | Hash | No | |
| deleted_at | Numeric | No | |
| id | String | No | |
| latest_children | Hash | No | |
| moderation | Hash | No | |
| own_children | Hash | No | |
| parent | String | No | |
| score | Numeric | No | |
| target_feeds | Array | No | |
| target_feeds_extra_data | Hash | No | |
| user | User | No |
ReactionRequest
Represents user reaction to a message
# ReactionRequest hash structure
{
created_at: Numeric, # Date/time of creation
custom: Hash, #
score: Numeric, # Reaction score. If not specified reaction has score of 1
type: String, # The type of reaction (e.g. 'like', 'laugh', 'wow')
updated_at: Numeric, # Date/time of the last update
user: UserRequest, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | The type of reaction (e.g. 'like', 'laugh', 'wow') |
| created_at | Numeric | No | Date/time of creation |
| custom | Hash | No | |
| score | Numeric | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | Numeric | No | Date/time of the last update |
| user | UserRequest | No | |
| user_id | String | No |
ReactionResponse
# ReactionResponse hash structure
{
created_at: Numeric, # Date/time of creation
custom: Hash, # Custom data for this object
message_id: String, # Message ID
score: Numeric, # Score of the reaction
type: String, # Type of reaction
updated_at: Numeric, # Date/time of the last update
user: UserResponse, # User
user_id: String # User ID
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | Date/time of creation |
| custom | Hash | Yes | Custom data for this object |
| message_id | String | Yes | Message ID |
| score | Numeric | Yes | Score of the reaction |
| type | String | Yes | Type of reaction |
| updated_at | Numeric | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | String | Yes | User ID |
ReadStateResponse
# ReadStateResponse hash structure
{
last_delivered_at: Numeric, #
last_delivered_message_id: String, #
last_read: Numeric, #
last_read_message_id: String, #
unread_messages: Numeric, #
user: UserResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | Numeric | Yes | |
| unread_messages | Numeric | Yes | |
| user | UserResponse | Yes | |
| last_delivered_at | Numeric | No | |
| last_delivered_message_id | String | No | |
| last_read_message_id | String | No |
ReminderResponseData
# ReminderResponseData hash structure
{
channel: ChannelResponse, #
channel_cid: String, #
created_at: Numeric, #
message: MessageResponse, #
message_id: String, #
remind_at: Numeric, #
updated_at: Numeric, #
user: UserResponse, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Numeric | Yes | |
| message_id | String | Yes | |
| updated_at | Numeric | Yes | |
| user_id | String | Yes | |
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| remind_at | Numeric | No | |
| user | UserResponse | No |
Response
Basic response information
# Response hash structure
{
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
RetentionPolicy
# RetentionPolicy hash structure
{
app_pk: Numeric, #
config: PolicyConfig, #
enabled_at: Numeric, #
policy: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | Numeric | Yes | |
| config | PolicyConfig | Yes | |
| enabled_at | Numeric | Yes | |
| policy | String | Yes |
RetentionRunResponse
# RetentionRunResponse hash structure
{
app_pk: Numeric, #
date: String, #
policy: String, #
stats: RunStats #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | Numeric | Yes | |
| date | String | Yes | |
| policy | String | Yes | |
| stats | RunStats | Yes |
SearchResponse
# SearchResponse hash structure
{
duration: String, # Duration of the request in milliseconds
next: String, # Value to pass to the next search query in order to paginate
previous: String, # Value that points to the previous page. Pass as the next value in a search query to paginate backwards
results: Array, # Search results
results_warning: SearchWarning # Warning about the search results
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| results | Array | Yes | Search results |
| next | String | No | Value to pass to the next search query in order to paginate |
| previous | String | No | Value that points to the previous page. Pass as the next value in a search qu... |
| results_warning | SearchWarning | No | Warning about the search results |
SearchResult
# SearchResult hash structure
{
message: SearchResultMessage # Found message
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| message | SearchResultMessage | No | Found message |
SearchWarning
# SearchWarning hash structure
{
channel_search_cids: Array, # Channel CIDs for the searched channels
channel_search_count: Numeric, # Number of channels searched
warning_code: Numeric, # Code corresponding to the warning
warning_description: String # Description of the warning
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| warning_code | Numeric | Yes | Code corresponding to the warning |
| warning_description | String | Yes | Description of the warning |
| channel_search_cids | Array | No | Channel CIDs for the searched channels |
| channel_search_count | Numeric | No | Number of channels searched |
Segment
# Segment hash structure
{
all_sender_channels: Boolean, #
all_users: Boolean, #
created_at: Numeric, #
deleted_at: Numeric, #
description: String, #
filter: Hash, #
id: String, #
name: String, #
size: Numeric, #
task_id: String, #
type: String, #
updated_at: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | Boolean | Yes | |
| all_users | Boolean | Yes | |
| created_at | Numeric | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| size | Numeric | Yes | |
| type | String | Yes | |
| updated_at | Numeric | Yes | |
| deleted_at | Numeric | No | |
| description | String | No | |
| filter | Hash | No | |
| task_id | String | No |
SegmentResponse
# SegmentResponse hash structure
{
all_sender_channels: Boolean, #
all_users: Boolean, #
created_at: Numeric, #
deleted_at: Numeric, #
description: String, #
filter: Hash, #
id: String, #
name: String, #
size: Numeric, #
type: String, #
updated_at: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | Boolean | Yes | |
| all_users | Boolean | Yes | |
| created_at | Numeric | Yes | |
| deleted_at | Numeric | Yes | |
| description | String | Yes | |
| filter | Hash | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| size | Numeric | Yes | |
| type | String | Yes | |
| updated_at | Numeric | Yes |
SegmentTargetResponse
# SegmentTargetResponse hash structure
{
app_pk: Numeric, #
created_at: Numeric, #
segment_id: String, #
target_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | Numeric | Yes | |
| created_at | Numeric | Yes | |
| segment_id | String | Yes | |
| target_id | String | Yes |
SendMessageResponse
# SendMessageResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse, # Message response
pending_message_metadata: Hash # 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 | Hash | No | Pending message metadata |
SendReactionResponse
Basic response information
# SendReactionResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse, #
reaction: ReactionResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| reaction | ReactionResponse | Yes |
SetRetentionPolicyResponse
Basic response information
# SetRetentionPolicyResponse hash structure
{
duration: String, # Duration of the request in milliseconds
policy: RetentionPolicy #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| policy | RetentionPolicy | Yes |
SharedLocation
# SharedLocation hash structure
{
created_by_device_id: String, #
end_at: Numeric, #
latitude: Numeric, #
longitude: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | Numeric | Yes | |
| longitude | Numeric | Yes | |
| created_by_device_id | String | No | |
| end_at | Numeric | No |
SharedLocationResponseData
# SharedLocationResponseData hash structure
{
channel: ChannelResponse, #
channel_cid: String, #
created_at: Numeric, #
created_by_device_id: String, #
end_at: Numeric, #
latitude: Numeric, #
longitude: Numeric, #
message: MessageResponse, #
message_id: String, #
updated_at: Numeric, #
user_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Numeric | Yes | |
| created_by_device_id | String | Yes | |
| latitude | Numeric | Yes | |
| longitude | Numeric | Yes | |
| message_id | String | Yes | |
| updated_at | Numeric | Yes | |
| user_id | String | Yes | |
| channel | ChannelResponse | No | |
| end_at | Numeric | No | |
| message | MessageResponse | No |
ShowChannelResponse
Basic response information
# ShowChannelResponse hash structure
{
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
SortParamRequest
# SortParamRequest hash structure
{
direction: Numeric, # Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One of: -1, 1
field: String, # Name of field to sort by
type: String # Type of field to sort by. Empty string or omitted means string type (default). One of: number, boolean
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | Numeric | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | String | No | Name of field to sort by |
| type | String | No | Type of field to sort by. Empty string or omitted means string type (default)... |
StartCampaignResponse
Basic response information
# StartCampaignResponse hash structure
{
campaign: CampaignResponse, #
duration: String, # Duration of the request in milliseconds
users: PagerResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| campaign | CampaignResponse | No | |
| users | PagerResponse | No |
TeamUsageStats
Usage statistics for a single team containing all 16 metrics
# TeamUsageStats hash structure
{
concurrent_connections: MetricStats, # Peak concurrent connections (total = MAX)
concurrent_users: MetricStats, # Peak concurrent users (total = MAX)
image_moderations_daily: MetricStats, # Daily image moderations (total = SUM)
messages_daily: MetricStats, # Daily messages sent (total = SUM)
messages_last_24_hours: MetricStats, # Messages in last 24 hours (total = LATEST)
messages_last_30_days: MetricStats, # Messages in last 30 days (total = LATEST)
messages_month_to_date: MetricStats, # Messages this month (total = LATEST)
messages_total: MetricStats, # Total messages (total = LATEST)
team: String, # Team identifier (empty string for users not assigned to any team)
translations_daily: MetricStats, # Daily translations (total = SUM)
users_daily: MetricStats, # Daily active users (total = SUM)
users_engaged_last_30_days: MetricStats, # Engaged MAU (total = LATEST)
users_engaged_month_to_date: MetricStats, # Engaged users this month (total = LATEST)
users_last_24_hours: MetricStats, # Users active in last 24 hours (total = LATEST)
users_last_30_days: MetricStats, # MAU - users active in last 30 days (total = LATEST)
users_month_to_date: MetricStats, # Users active this month (total = LATEST)
users_total: MetricStats # Total users (total = LATEST)
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| concurrent_connections | MetricStats | Yes | Peak concurrent connections (total = MAX) |
| concurrent_users | MetricStats | Yes | Peak concurrent users (total = MAX) |
| image_moderations_daily | MetricStats | Yes | Daily image moderations (total = SUM) |
| messages_daily | MetricStats | Yes | Daily messages sent (total = SUM) |
| messages_last_24_hours | MetricStats | Yes | Messages in last 24 hours (total = LATEST) |
| messages_last_30_days | MetricStats | Yes | Messages in last 30 days (total = LATEST) |
| messages_month_to_date | MetricStats | Yes | Messages this month (total = LATEST) |
| messages_total | MetricStats | Yes | Total messages (total = LATEST) |
| team | String | Yes | Team identifier (empty string for users not assigned to any team) |
| translations_daily | MetricStats | Yes | Daily translations (total = SUM) |
| users_daily | MetricStats | Yes | Daily active users (total = SUM) |
| users_engaged_last_30_days | MetricStats | Yes | Engaged MAU (total = LATEST) |
| users_engaged_month_to_date | MetricStats | Yes | Engaged users this month (total = LATEST) |
| users_last_24_hours | MetricStats | Yes | Users active in last 24 hours (total = LATEST) |
| users_last_30_days | MetricStats | Yes | MAU - users active in last 30 days (total = LATEST) |
| users_month_to_date | MetricStats | Yes | Users active this month (total = LATEST) |
| users_total | MetricStats | Yes | Total users (total = LATEST) |
ThreadResponse
# ThreadResponse hash structure
{
active_participant_count: Numeric, # Active Participant Count
channel: ChannelResponse, # Channel
channel_cid: String, # Channel CID
created_at: Numeric, # Date/time of creation
created_by: UserResponse, # Created By User
created_by_user_id: String, # Created By User ID
custom: Hash, # Custom data for this object
deleted_at: Numeric, # Deleted At
last_message_at: Numeric, # Last Message At
parent_message: MessageResponse, # Parent Message
parent_message_id: String, # Parent Message ID
participant_count: Numeric, # Participant Count
reply_count: Numeric, # Reply Count
thread_participants: Array, # Thread Participants
title: String, # Title
updated_at: Numeric # Date/time of the last update
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | Numeric | Yes | Active Participant Count |
| channel_cid | String | Yes | Channel CID |
| created_at | Numeric | Yes | Date/time of creation |
| created_by_user_id | String | Yes | Created By User ID |
| custom | Hash | Yes | Custom data for this object |
| parent_message_id | String | Yes | Parent Message ID |
| participant_count | Numeric | Yes | Participant Count |
| title | String | Yes | Title |
| updated_at | Numeric | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | Numeric | No | Deleted At |
| last_message_at | Numeric | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| reply_count | Numeric | No | Reply Count |
| thread_participants | Array | No | Thread Participants |
ThreadStateResponse
# ThreadStateResponse hash structure
{
active_participant_count: Numeric, # Active Participant Count
channel: ChannelResponse, # Channel
channel_cid: String, # Channel CID
created_at: Numeric, # Date/time of creation
created_by: UserResponse, # Created By User
created_by_user_id: String, # Created By User ID
custom: Hash, # Custom data for this object
deleted_at: Numeric, # Deleted At
draft: DraftResponse, #
last_message_at: Numeric, # Last Message At
latest_replies: Array, #
parent_message: MessageResponse, # Parent Message
parent_message_id: String, # Parent Message ID
participant_count: Numeric, # Participant Count
read: Array, #
reply_count: Numeric, # Reply Count
thread_participants: Array, # Thread Participants
title: String, # Title
updated_at: Numeric # Date/time of the last update
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | Numeric | Yes | Active Participant Count |
| channel_cid | String | Yes | Channel CID |
| created_at | Numeric | Yes | Date/time of creation |
| created_by_user_id | String | Yes | Created By User ID |
| custom | Hash | Yes | Custom data for this object |
| latest_replies | Array | Yes | |
| parent_message_id | String | Yes | Parent Message ID |
| participant_count | Numeric | Yes | Participant Count |
| title | String | Yes | Title |
| updated_at | Numeric | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | Numeric | No | Deleted At |
| draft | DraftResponse | No | |
| last_message_at | Numeric | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| read | Array | No | |
| reply_count | Numeric | No | Reply Count |
| thread_participants | Array | No | Thread Participants |
Thresholds
Sets thresholds for AI moderation
# Thresholds hash structure
{
explicit: LabelThresholds, # Thresholds for explicit messages
spam: LabelThresholds, # Thresholds for spam
toxic: LabelThresholds # Thresholds for toxic messages
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| explicit | LabelThresholds | No | Thresholds for explicit messages |
| spam | LabelThresholds | No | Thresholds for spam |
| toxic | LabelThresholds | No | Thresholds for toxic messages |
Time
# Time hash structure
{
}Timestamp
# Timestamp hash structure
{
Time: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Time | Numeric | No |
TruncateChannelResponse
# TruncateChannelResponse hash structure
{
channel: ChannelResponse, # Truncated channel object
duration: String, # Duration of the request in milliseconds
message: MessageResponse # Truncated message object
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| channel | ChannelResponse | No | Truncated channel object |
| message | MessageResponse | No | Truncated message object |
UndeleteMessageResponse
Basic response information
# UndeleteMessageResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes |
UnmuteResponse
# UnmuteResponse hash structure
{
duration: String, #
non_existing_users: Array # A list of users that can't be found. Common cause for this is deleted users
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| non_existing_users | Array | No | A list of users that can't be found. Common cause for this is deleted users |
UnreadCountsBatchResponse
Basic response information
# UnreadCountsBatchResponse hash structure
{
counts_by_user: Hash, #
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| counts_by_user | Hash | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
UnreadCountsChannel
# UnreadCountsChannel hash structure
{
channel_id: String, #
last_read: Numeric, #
unread_count: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | String | Yes | |
| last_read | Numeric | Yes | |
| unread_count | Numeric | Yes |
UnreadCountsChannelType
# UnreadCountsChannelType hash structure
{
channel_count: Numeric, #
channel_type: String, #
unread_count: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_count | Numeric | Yes | |
| channel_type | String | Yes | |
| unread_count | Numeric | Yes |
UnreadCountsThread
# UnreadCountsThread hash structure
{
last_read: Numeric, #
last_read_message_id: String, #
parent_message_id: String, #
unread_count: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | Numeric | Yes | |
| last_read_message_id | String | Yes | |
| parent_message_id | String | Yes | |
| unread_count | Numeric | Yes |
UpdateChannelPartialResponse
# UpdateChannelPartialResponse hash structure
{
channel: ChannelResponse, # Updated channel object
duration: String, # Duration of the request in milliseconds
members: Array # List of updated members
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| members | Array | Yes | List of updated members |
| channel | ChannelResponse | No | Updated channel object |
UpdateChannelResponse
# UpdateChannelResponse hash structure
{
channel: ChannelResponse, # Updated channel
duration: String, # Duration of the request in milliseconds
members: Array, # List of channel members
message: MessageResponse # Message sent to the chat
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| members | Array | Yes | List of channel members |
| channel | ChannelResponse | No | Updated channel |
| message | MessageResponse | No | Message sent to the chat |
UpdateChannelTypeResponse
# UpdateChannelTypeResponse hash structure
{
allowed_flag_reasons: Array, #
automod: String, #
automod_behavior: String, #
automod_thresholds: Thresholds, #
blocklist: String, #
blocklist_behavior: String, #
blocklists: Array, #
chat_preferences: ChatPreferences, #
commands: Array, #
connect_events: Boolean, #
count_messages: Boolean, #
created_at: Numeric, #
custom_events: Boolean, #
delivery_events: Boolean, #
duration: String, #
grants: Hash, #
mark_messages_pending: Boolean, #
max_message_length: Numeric, #
mutes: Boolean, #
name: String, #
partition_size: Numeric, #
partition_ttl: String, #
permissions: Array, #
polls: Boolean, #
push_level: String, #
push_notifications: Boolean, #
quotes: Boolean, #
reactions: Boolean, #
read_events: Boolean, #
reminders: Boolean, #
replies: Boolean, #
search: Boolean, #
shared_locations: Boolean, #
skip_last_msg_update_for_system_msgs: Boolean, #
typing_events: Boolean, #
updated_at: Numeric, #
uploads: Boolean, #
url_enrichment: Boolean, #
user_message_reminders: Boolean #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | String | Yes | |
| automod_behavior | String | Yes | |
| commands | Array | Yes | |
| connect_events | Boolean | Yes | |
| count_messages | Boolean | Yes | |
| created_at | Numeric | Yes | |
| custom_events | Boolean | Yes | |
| delivery_events | Boolean | Yes | |
| duration | String | Yes | |
| grants | Hash | Yes | |
| mark_messages_pending | Boolean | Yes | |
| max_message_length | Numeric | Yes | |
| mutes | Boolean | Yes | |
| name | String | Yes | |
| permissions | Array | 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 | Numeric | Yes | |
| uploads | Boolean | Yes | |
| url_enrichment | Boolean | Yes | |
| user_message_reminders | Boolean | Yes | |
| allowed_flag_reasons | Array | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | String | No | |
| blocklist_behavior | String | No | |
| blocklists | Array | No | |
| chat_preferences | ChatPreferences | No | |
| partition_size | Numeric | No | |
| partition_ttl | String | No | |
| push_level | String | No |
UpdateCommandResponse
# UpdateCommandResponse hash structure
{
command: Command, # Command object
duration: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| command | Command | No | Command object |
UpdateMemberPartialResponse
# UpdateMemberPartialResponse hash structure
{
channel_member: ChannelMemberResponse, # Updated channel member
duration: String # Duration of the request in milliseconds
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| channel_member | ChannelMemberResponse | No | Updated channel member |
UpdateMessagePartialResponse
# UpdateMessagePartialResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse, # Updated message
pending_message_metadata: Hash # 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 | Hash | No | Pending message metadata |
UpdateMessageResponse
Basic response information
# UpdateMessageResponse hash structure
{
duration: String, # Duration of the request in milliseconds
message: MessageResponse, #
pending_message_metadata: Hash #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| pending_message_metadata | Hash | No |
UpdateReminderResponse
Basic response information
# UpdateReminderResponse hash structure
{
duration: String, # Duration of the request in milliseconds
reminder: ReminderResponseData #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| reminder | ReminderResponseData | Yes |
UpdateThreadPartialResponse
# UpdateThreadPartialResponse hash structure
{
duration: String, # Duration of the request in milliseconds
thread: ThreadResponse # Updated thread (not enriched)
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| thread | ThreadResponse | Yes | Updated thread (not enriched) |
UploadChannelFileResponse
# UploadChannelFileResponse hash structure
{
duration: String, # Duration of the request in milliseconds
file: String, # URL to the uploaded asset. Should be used to put to `asset_url` attachment field
moderation_action: String, #
thumb_url: String # URL of the file thumbnail for supported file formats. Should be put to `thumb_url` attachment field
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| file | String | No | URL to the uploaded asset. Should be used to put to asset_url attachment field |
| moderation_action | String | No | |
| thumb_url | String | No | URL of the file thumbnail for supported file formats. Should be put to `thumb... |
UploadChannelResponse
# UploadChannelResponse hash structure
{
duration: String, # Duration of the request in milliseconds
file: String, #
moderation_action: String, #
thumb_url: String, #
upload_sizes: Array # Array of image size configurations
}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 | Array | No | Array of image size configurations |
User
# User hash structure
{
data: Hash, #
id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | |
| data | Hash | No |
UserCustomEventRequest
# UserCustomEventRequest hash structure
{
custom: Hash, #
type: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | |
| custom | Hash | No |
UserRequest
User request object
# UserRequest hash structure
{
custom: Hash, # Custom user data
id: String, # User ID
image: String, # User's profile image URL
invisible: Boolean, #
language: String, #
name: String, # Optional name of user
privacy_settings: PrivacySettingsResponse, #
role: String, # User's global role
teams: Array, # List of teams the user belongs to
teams_role: Hash # Map of team-specific roles for the user
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | User ID |
| custom | Hash | 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 | Array | No | List of teams the user belongs to |
| teams_role | Hash | No | Map of team-specific roles for the user |
UserResponse
User response object
# UserResponse hash structure
{
avg_response_time: Numeric, #
ban_expires: Numeric, # Date when ban expires
banned: Boolean, # Whether a user is banned or not
blocked_user_ids: Array, #
bypass_moderation: Boolean, #
created_at: Numeric, # Date/time of creation
custom: Hash, # Custom data for this object
deactivated_at: Numeric, # Date of deactivation
deleted_at: Numeric, # Date/time of deletion
devices: Array, # List of devices user is using
id: String, # Unique user identifier
image: String, #
invisible: Boolean, #
language: String, # Preferred language of a user
last_active: Numeric, # Date of last activity
name: String, # Optional name of user
online: Boolean, # Whether a user online or not
privacy_settings: PrivacySettingsResponse, # User privacy settings
push_notifications: PushNotificationSettingsResponse, # User push notification settings
revoke_tokens_issued_before: Numeric, # Revocation date for tokens
role: String, # Determines the set of user permissions
shadow_banned: Boolean, # Whether a user is shadow banned
teams: Array, # List of teams user is a part of
teams_role: Hash, #
updated_at: Numeric # Date/time of the last update
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Boolean | Yes | Whether a user is banned or not |
| blocked_user_ids | Array | Yes | |
| created_at | Numeric | Yes | Date/time of creation |
| custom | Hash | 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 | Array | Yes | List of teams user is a part of |
| updated_at | Numeric | Yes | Date/time of the last update |
| avg_response_time | Numeric | No | |
| ban_expires | Numeric | No | Date when ban expires |
| bypass_moderation | Boolean | No | |
| deactivated_at | Numeric | No | Date of deactivation |
| deleted_at | Numeric | No | Date/time of deletion |
| devices | Array | No | List of devices user is using |
| image | String | No | |
| last_active | Numeric | 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 | Numeric | No | Revocation date for tokens |
| teams_role | Hash | No |
VoteData
# VoteData hash structure
{
answer_text: String, #
option_id: String #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | String | No | |
| option_id | String | No |
WSEvent
Represents an BaseEvent that happened in Stream Chat
# WSEvent hash structure
{
automoderation: Boolean, #
automoderation_scores: ModerationResponse, #
channel: ChannelResponse, #
channel_id: String, #
channel_last_message_at: Numeric, #
channel_type: String, #
cid: String, #
connection_id: String, #
created_at: Numeric, #
created_by: UserResponse, #
custom: Hash, #
me: OwnUserResponse, #
member: ChannelMemberResponse, #
message: MessageResponse, #
message_update: MessageUpdate, #
parent_id: String, #
poll: PollResponseData, #
poll_vote: PollVoteResponseData, #
reaction: ReactionResponse, #
reason: String, #
team: String, #
thread: ThreadResponse, #
thread_id: String, #
type: String, #
user: UserResponse, #
user_id: String, #
watcher_count: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Numeric | Yes | |
| custom | Hash | Yes | |
| type | String | Yes | |
| automoderation | Boolean | No | |
| automoderation_scores | ModerationResponse | No | |
| channel | ChannelResponse | No | |
| channel_id | String | No | |
| channel_last_message_at | Numeric | 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 | Numeric | No |
WrappedUnreadCountsResponse
Basic response information
# WrappedUnreadCountsResponse hash structure
{
channel_type: Array, #
channels: Array, #
duration: String, # Duration of the request in milliseconds
threads: Array, #
total_unread_count: Numeric, #
total_unread_count_by_team: Hash, #
total_unread_threads_count: Numeric #
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_type | Array | Yes | |
| channels | Array | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
| threads | Array | Yes | |
| total_unread_count | Numeric | Yes | |
| total_unread_threads_count | Numeric | Yes | |
| total_unread_count_by_team | Hash | No |