Appearance
Chat
About 24728 wordsAbout 82 min
Php SDK - Chat API
Table of Contents
- queryCampaigns
- getCampaign
- startCampaign
- stopCampaign
- queryChannels
- channelBatchUpdate
- deleteChannels
- markDelivered
- markChannelsRead
- getOrCreateDistinctChannel
- updateChannel
- updateChannelPartial
- deleteChannel
- getDraft
- deleteDraft
- sendEvent
- uploadChannelFile
- deleteChannelFile
- hideChannel
- uploadChannelImage
- deleteChannelImage
- updateMemberPartial
- sendMessage
- getManyMessages
- getOrCreateChannel
- markRead
- showChannel
- truncateChannel
- markUnread
- listChannelTypes
- createChannelType
- getChannelType
- updateChannelType
- deleteChannelType
- listCommands
- createCommand
- getCommand
- updateCommand
- deleteCommand
- queryDrafts
- exportChannels
- queryMembers
- queryMessageHistory
- getMessage
- updateMessage
- updateMessagePartial
- deleteMessage
- runMessageAction
- commitMessage
- ephemeralMessageUpdate
- sendReaction
- deleteReaction
- getReactions
- queryReactions
- translateMessage
- undeleteMessage
- castPollVote
- deletePollVote
- createReminder
- updateReminder
- deleteReminder
- getReplies
- queryMessageFlags
- muteChannel
- unmuteChannel
- queryBannedUsers
- queryFutureChannelBans
- queryReminders
- getRetentionPolicy
- setRetentionPolicy
- deleteRetentionPolicy
- getRetentionPolicyRuns
- search
- querySegments
- getSegment
- deleteSegment
- deleteSegmentTargets
- segmentTargetExists
- querySegmentTargets
- queryTeamUsageStats
- queryThreads
- getThread
- updateThreadPartial
- unreadCounts
- unreadCountsBatch
- sendUserCustomEvent
- Types Reference
queryCampaigns
Retrieve a list of campaigns based on specific criteria, helping you manage and analyze multiple marketing efforts simultaneously.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query campaigns
$response = $client->queryCampaigns([
'limit' => 25,
'filter' => {},
'sort' => [],
]);
print_r($response);Example: with prev and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query campaigns
$response = $client->queryCampaigns([
'prev' => null,
'next' => null,
]);
print_r($response);Example: with user_limit
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query campaigns
$response = $client->queryCampaigns([
'user_limit' => 10,
]);
print_r($response);Response: QueryCampaignsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | - |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | - |
| user_limit | int | No | - |
getCampaign
Obtain detailed information about a specific campaign, allowing you to review its current status and settings.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get campaign
$response = $client->getCampaign([
'id' => 'activity-123',
'limit' => 25,
'next' => null,
]);
print_r($response);Example: with prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get campaign
$response = $client->getCampaign([
'id' => 'activity-123',
'prev' => null,
]);
print_r($response);Response: GetCampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| prev | string | No | - |
| next | string | No | - |
| limit | int | No | - |
startCampaign
Initiate or schedule a campaign to begin at a designated time, enabling you to automate your marketing and outreach activities.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Start/schedule campaign
$response = $client->startCampaign([
'id' => 'activity-123',
'scheduled_for' => 10,
'stop_at' => 10,
]);
print_r($response);Response: StartCampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| scheduled_for | float | No | - |
| stop_at | float | No | - |
stopCampaign
Stop an ongoing campaign to prevent further messages from being sent, useful when campaign objectives have been achieved or if errors are detected.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Stop campaign
$response = $client->stopCampaign([
'id' => 'activity-123',
]);
print_r($response);Response: CampaignResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
queryChannels
Access a list of communication channels available in your account, facilitating efficient management and selection for your campaigns.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query channels
$response = $client->queryChannels([
'user_id' => 'john',
'limit' => 25,
'sort' => [],
]);
print_r($response);Example: with filter_conditions and message_limit
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query channels
$response = $client->queryChannels([
'filter_conditions' => {},
'message_limit' => 10,
]);
print_r($response);Example: with offset and predefined_filter
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query channels
$response = $client->queryChannels([
'offset' => 0,
'predefined_filter' => 'value',
]);
print_r($response);Example: with filter_values and sort_values
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query channels
$response = $client->queryChannels([
'filter_values' => {},
'sort_values' => {},
]);
print_r($response);Response: QueryChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter_conditions | array | No | Filter conditions to apply to the query |
| filter_values | array | No | Values to interpolate into the predefined filter template |
| limit | int | No | Number of channels to limit |
| member_limit | int | No | Number of members to limit |
| message_limit | int | No | Number of messages to limit |
| offset | int | 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 | array | No | - |
| state | bool | No | Whether to update channel state or not |
| user | UserRequest | No | - |
| user_id | string | No | - |
channelBatchUpdate
Update multiple channels simultaneously to save time and ensure consistency across channel settings or configurations.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channels in batch
$response = $client->channelBatchUpdate([
'filter' => {},
'operation' => 'add',
'data' => ['auto_translation_enabled' => false],
'members' => [],
]);
print_r($response);Response: ChannelBatchUpdateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | Yes | - |
| operation | string | Yes | - |
| data | ChannelDataUpdate | No | - |
| members | []ChannelBatchMemberRequest | No | - |
deleteChannels
Asynchronously remove specific channels from your account, helping you maintain an organized and relevant channel list without immediate blocking.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Deletes channels asynchronously
$response = $client->deleteChannels([
'cids' => [],
'hard_delete' => false,
]);
print_r($response);Response: DeleteChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| cids | []string | Yes | All channels that should be deleted |
| hard_delete | bool | No | Specify if channels and all ressources should be hard deleted |
markDelivered
Update the delivery status of messages sent through a channel, ensuring accurate tracking and reporting of message delivery outcomes.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark channel message delivery status
$response = $client->markDelivered([
'user_id' => 'john',
'latest_delivered_messages' => [],
]);
print_r($response);Response: MarkDeliveredResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
| latest_delivered_messages | []DeliveredMessagePayload | No | - |
markChannelsRead
Mark all messages in selected channels as read, allowing you to streamline communication management and reduce notification clutter.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark channels as read
$response = $client->markChannelsRead([
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
'read_by_channel' => {},
]);
print_r($response);Response: MarkReadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| read_by_channel | array | No | Map of channel ID to last read message ID |
| user | UserRequest | No | - |
| user_id | string | No | - |
getOrCreateDistinctChannel
Retrieve an existing channel or create a new one based on unique identifiers, simplifying the process of managing distinct communication threads.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateDistinctChannel([
'type' => 'like',
'data' => ['auto_translation_enabled' => false],
'hide_for_creator' => false,
]);
print_r($response);Example: with members and messages
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateDistinctChannel([
'type' => 'like',
'members' => ['limit' => 25],
'messages' => ['created_at_after' => 10],
]);
print_r($response);Example: with state and thread_unread_counts
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateDistinctChannel([
'type' => 'like',
'state' => false,
'thread_unread_counts' => false,
]);
print_r($response);Example: with watchers
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateDistinctChannel([
'type' => 'like',
'watchers' => ['limit' => 25],
]);
print_r($response);Response: ChannelStateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| data | ChannelInput | No | - |
| hide_for_creator | bool | No | Whether this channel will be hidden for the user who created the channel or not |
| members | PaginationParams | No | - |
| messages | MessagePaginationParams | No | - |
| state | bool | No | Refresh channel state |
| thread_unread_counts | bool | No | - |
| watchers | PaginationParams | No | - |
updateChannel
Modify the settings or attributes of an existing channel to keep your communication channels up-to-date and aligned with your needs.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel
$response = $client->updateChannel([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'skip_push' => false,
]);
print_r($response);Example: with add_members and add_moderators
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel
$response = $client->updateChannel([
'type' => 'like',
'id' => 'activity-123',
'add_members' => [],
'add_moderators' => [],
]);
print_r($response);Example: with assign_roles and cooldown
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel
$response = $client->updateChannel([
'type' => 'like',
'id' => 'activity-123',
'assign_roles' => [],
'cooldown' => 10,
]);
print_r($response);Example: with data and demote_moderators
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel
$response = $client->updateChannel([
'type' => 'like',
'id' => 'activity-123',
'data' => ['auto_translation_enabled' => false],
'demote_moderators' => [],
]);
print_r($response);Response: UpdateChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| accept_invite | bool | 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 | int | 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 | bool | 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 | bool | 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 | bool | No | When message is set disables all push notifications for it |
| user | UserRequest | No | - |
| user_id | string | No | - |
updateChannelPartial
Update specific attributes of a channel without altering the entire channel configuration. Use this to make targeted changes, such as updating channel metadata or settings.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially update channel
$response = $client->updateChannelPartial([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'unset' => [],
]);
print_r($response);Example: with user and set
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially update channel
$response = $client->updateChannelPartial([
'type' => 'like',
'id' => 'activity-123',
'user' => ['id' => 'activity-123', 'custom' => {}],
'set' => {},
]);
print_r($response);Response: UpdateChannelPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| set | array | No | - |
| unset | []string | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteChannel
Remove a channel from the system entirely. Use this when you want to permanently delete a channel and its associated data.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete channel
$response = $client->deleteChannel([
'type' => 'like',
'id' => 'activity-123',
'hard_delete' => false,
]);
print_r($response);Response: DeleteChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| hard_delete | bool | No | - |
getDraft
Retrieve a draft message for editing or review. Use this to access unsent messages saved as drafts before finalizing or sending them.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get draft
$response = $client->getDraft([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'parent_id' => 'parent-123',
]);
print_r($response);Response: GetDraftResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| parent_id | string | No | - |
| user_id | string | No | - |
deleteDraft
Remove a draft message from the system. Use this when a draft is no longer needed and you want to declutter saved drafts.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete draft
$response = $client->deleteDraft([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'parent_id' => 'parent-123',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| parent_id | string | No | - |
| user_id | string | No | - |
sendEvent
Trigger an event within a channel to notify users of actions or updates. Use this to communicate important events, such as member joins or message reactions.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Send event
$response = $client->sendEvent([
'type' => 'like',
'id' => 'activity-123',
'event' => ['type' => 'like', 'custom' => {}],
]);
print_r($response);Response: EventResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| event | EventRequest | Yes | - |
uploadChannelFile
Upload a file to a channel for sharing with other members. Use this to share documents, images, or any relevant files within the channel.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upload file
$response = $client->uploadChannelFile([
'type' => 'like',
'id' => 'activity-123',
'file' => 'value',
'user' => ['id' => 'activity-123'],
]);
print_r($response);Response: UploadChannelFileResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| file | string | No | file field |
| user | OnlyUserID | No | user for the request server side only |
deleteChannelFile
Remove a previously uploaded file from a channel. Use this to manage or clean up files that are no longer needed in the channel.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete file
$response = $client->deleteChannelFile([
'type' => 'like',
'id' => 'activity-123',
'url' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| url | string | No | - |
hideChannel
Temporarily hide a channel from the user's view without deleting it. Use this to reduce clutter while retaining access to the channel for future engagement.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Hide channel
$response = $client->hideChannel([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with clear_history
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Hide channel
$response = $client->hideChannel([
'type' => 'like',
'id' => 'activity-123',
'clear_history' => false,
]);
print_r($response);Response: HideChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| clear_history | bool | No | Whether to clear message history of the channel or not |
| user | UserRequest | No | - |
| user_id | string | No | - |
uploadChannelImage
Upload an image to a channel, enhancing communication with visual content. Use this to share images relevant to the channel's discussions or activities.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upload image
$response = $client->uploadChannelImage([
'type' => 'like',
'id' => 'activity-123',
'file' => 'value',
'upload_sizes' => [],
]);
print_r($response);Example: with user
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upload image
$response = $client->uploadChannelImage([
'type' => 'like',
'id' => 'activity-123',
'user' => ['id' => 'activity-123'],
]);
print_r($response);Response: UploadChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| file | string | No | - |
| upload_sizes | []ImageSize | No | field with JSON-encoded array of image size configurations |
| user | OnlyUserID | No | - |
deleteChannelImage
Remove an uploaded image from a channel. Use this to manage the visual content and keep the channel's media relevant and up-to-date.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete image
$response = $client->deleteChannelImage([
'type' => 'like',
'id' => 'activity-123',
'url' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| url | string | No | - |
updateMemberPartial
Partially update the details of a channel member, such as their role or nickname, without altering their entire profile. Use this when you need to make specific updates to a member's attributes in a channel.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially channel member update
$response = $client->updateMemberPartial([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'set' => {},
]);
print_r($response);Example: with unset
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially channel member update
$response = $client->updateMemberPartial([
'type' => 'like',
'id' => 'activity-123',
'unset' => [],
]);
print_r($response);Response: UpdateMemberPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| user_id | string | No | - |
| set | array | No | - |
| unset | []string | No | - |
sendMessage
Send a new message to a specified channel, allowing you to initiate or continue a conversation. Use this to communicate with channel members through text, attachments, or other supported message types.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Send new message
$response = $client->sendMessage([
'type' => 'like',
'id' => 'activity-123',
'message' => ['attachments' => []],
'skip_push' => false,
'keep_channel_hidden' => false,
]);
print_r($response);Example: with pending and pending_message_metadata
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Send new message
$response = $client->sendMessage([
'type' => 'like',
'id' => 'activity-123',
'message' => ['attachments' => []],
'pending' => false,
'pending_message_metadata' => {},
]);
print_r($response);Example: with skip_enrich_url and force_moderation
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Send new message
$response = $client->sendMessage([
'type' => 'like',
'id' => 'activity-123',
'message' => ['attachments' => []],
'skip_enrich_url' => false,
'force_moderation' => false,
]);
print_r($response);Response: SendMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| message | MessageRequest | Yes | - |
| force_moderation | bool | No | - |
| keep_channel_hidden | bool | No | - |
| pending | bool | No | - |
| pending_message_metadata | array | No | - |
| skip_enrich_url | bool | No | - |
| skip_push | bool | No | - |
getManyMessages
Retrieve a batch of messages from a channel, which can be useful for loading conversation history or displaying older messages. Use this to efficiently access multiple messages at once.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get many messages
$response = $client->getManyMessages([
'type' => 'like',
'id' => 'activity-123',
'ids' => ['activity-1', 'activity-2'],
]);
print_r($response);Response: GetManyMessagesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| ids | []string | Yes | - |
getOrCreateChannel
Retrieve an existing channel or create a new one if it doesn't exist, ensuring you have a channel to work with for communication. Use this when you need to set up or access a channel dynamically.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateChannel([
'type' => 'like',
'id' => 'activity-123',
'data' => ['auto_translation_enabled' => false],
'hide_for_creator' => false,
]);
print_r($response);Example: with members and messages
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateChannel([
'type' => 'like',
'id' => 'activity-123',
'members' => ['limit' => 25],
'messages' => ['created_at_after' => 10],
]);
print_r($response);Example: with state and thread_unread_counts
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateChannel([
'type' => 'like',
'id' => 'activity-123',
'state' => false,
'thread_unread_counts' => false,
]);
print_r($response);Example: with watchers
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get or create channel
$response = $client->getOrCreateChannel([
'type' => 'like',
'id' => 'activity-123',
'watchers' => ['limit' => 25],
]);
print_r($response);Response: ChannelStateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| data | ChannelInput | No | - |
| hide_for_creator | bool | No | Whether this channel will be hidden for the user who created the channel or not |
| members | PaginationParams | No | - |
| messages | MessagePaginationParams | No | - |
| state | bool | No | Refresh channel state |
| thread_unread_counts | bool | No | - |
| watchers | PaginationParams | No | - |
markRead
Mark messages in a channel as read to update the read status and notify other members. Use this to keep track of read messages and manage message notifications.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark read
$response = $client->markRead([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'thread_id' => 'value',
]);
print_r($response);Example: with user and message_id
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark read
$response = $client->markRead([
'type' => 'like',
'id' => 'activity-123',
'user' => ['id' => 'activity-123', 'custom' => {}],
'message_id' => 'value',
]);
print_r($response);Response: MarkReadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| message_id | string | No | ID of the message that is considered last read by client |
| thread_id | string | No | Optional Thread ID to specifically mark a given thread as read |
| user | UserRequest | No | - |
| user_id | string | No | - |
showChannel
Display detailed information about a specific channel, including its settings and current members. Use this to gain insights into a channel's configuration and participant list.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Show channel
$response = $client->showChannel([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: ShowChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
truncateChannel
Clear all messages from a channel while preserving its settings and members, effectively resetting the conversation. Use this to start anew without deleting the channel entirely.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Truncate channel
$response = $client->truncateChannel([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'hard_delete' => false,
]);
print_r($response);Example: with skip_push and member_ids
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Truncate channel
$response = $client->truncateChannel([
'type' => 'like',
'id' => 'activity-123',
'skip_push' => false,
'member_ids' => [],
]);
print_r($response);Example: with truncated_at and user
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Truncate channel
$response = $client->truncateChannel([
'type' => 'like',
'id' => 'activity-123',
'truncated_at' => 10,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with message
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Truncate channel
$response = $client->truncateChannel([
'type' => 'like',
'id' => 'activity-123',
'message' => ['attachments' => []],
]);
print_r($response);Response: TruncateChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| hard_delete | bool | 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 | bool | No | When message is set disables all push notifications for it |
| truncated_at | float | No | Truncate channel data up to truncated_at. The system message (if provided) creation time is alw... |
| user | UserRequest | No | - |
| user_id | string | No | - |
markUnread
Mark messages in a channel as unread, which can be useful for revisiting important conversations or managing notification settings. Use this to reset the read status of messages that need attention.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark unread
$response = $client->markUnread([
'type' => 'like',
'id' => 'activity-123',
'user_id' => 'john',
'message_timestamp' => 10,
]);
print_r($response);Example: with thread_id and user
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark unread
$response = $client->markUnread([
'type' => 'like',
'id' => 'activity-123',
'thread_id' => 'value',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with message_id
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mark unread
$response = $client->markUnread([
'type' => 'like',
'id' => 'activity-123',
'message_id' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| id | string | Yes | - |
| message_id | string | No | ID of the message from where the channel is marked unread |
| message_timestamp | float | No | Timestamp of the message from where the channel is marked unread |
| thread_id | string | No | Mark a thread unread, specify one of the thread, message timestamp, or message id |
| user | UserRequest | No | - |
| user_id | string | No | - |
listChannelTypes
Retrieve a list of available channel types, each defining specific settings and behaviors. Use this to explore or select from different channel configurations for your communication needs.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// List channel types
$response = $client->listChannelTypes();
print_r($response);Response: ListChannelTypesResponse
createChannelType
Define and create a new channel type with specific settings and behaviors to suit your application's requirements. Use this to customize how channels operate and interact based on your unique use case.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create channel type
$response = $client->createChannelType([
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'name' => 'My Feed',
'blocklist' => 'value',
'blocklist_behavior' => 'value',
]);
print_r($response);Example: with blocklists and chat_preferences
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create channel type
$response = $client->createChannelType([
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'name' => 'My Feed',
'blocklists' => [],
'chat_preferences' => ['channel_mentions' => 'value'],
]);
print_r($response);Example: with commands and connect_events
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create channel type
$response = $client->createChannelType([
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'name' => 'My Feed',
'commands' => [],
'connect_events' => false,
]);
print_r($response);Example: with count_messages and custom_events
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create channel type
$response = $client->createChannelType([
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'name' => 'My Feed',
'count_messages' => false,
'custom_events' => false,
]);
print_r($response);Response: CreateChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| automod | string | Yes | Automod. One of: disabled, simple, AI |
| automod_behavior | string | Yes | Automod behavior. One of: flag, block |
| max_message_length | int | 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 | bool | No | Connect events |
| count_messages | bool | No | Count messages in channel. |
| custom_events | bool | No | Custom events |
| delivery_events | bool | No | - |
| grants | array | No | List of grants for the channel type |
| mark_messages_pending | bool | No | Mark messages pending |
| message_retention | string | No | Message retention. One of: infinite, numeric |
| mutes | bool | No | Mutes |
| partition_size | int | No | Partition size |
| partition_ttl | string | No | Partition TTL |
| permissions | []PolicyRequest | No | List of permissions for the channel type |
| polls | bool | No | Polls |
| push_level | string | No | Default push notification level for the channel type. One of: all, all_mentions, mentions, direct... |
| push_notifications | bool | No | Push notifications |
| reactions | bool | No | Reactions |
| read_events | bool | No | Read events |
| replies | bool | No | Replies |
| search | bool | No | Search |
| shared_locations | bool | No | Enables shared location messages |
| skip_last_msg_update_for_system_msgs | bool | No | - |
| typing_events | bool | No | Typing events |
| uploads | bool | No | Uploads |
| url_enrichment | bool | No | URL enrichment |
| user_message_reminders | bool | No | - |
getChannelType
Retrieve information about a specific channel type to understand its configuration and settings, useful for reviewing or managing channel functionalities.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get channel type
$response = $client->getChannelType([
'name' => 'My Feed',
]);
print_r($response);Response: GetChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
updateChannelType
Modify the properties of an existing channel type to customize or enhance channel behavior according to specific requirements.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel type
$response = $client->updateChannelType([
'name' => 'My Feed',
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'allowed_flag_reasons' => [],
'automod_thresholds' => ['explicit' => ['block' => 10]],
]);
print_r($response);Example: with blocklist and blocklist_behavior
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel type
$response = $client->updateChannelType([
'name' => 'My Feed',
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'blocklist' => 'value',
'blocklist_behavior' => 'value',
]);
print_r($response);Example: with blocklists and chat_preferences
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel type
$response = $client->updateChannelType([
'name' => 'My Feed',
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'blocklists' => [],
'chat_preferences' => ['channel_mentions' => 'value'],
]);
print_r($response);Example: with commands and connect_events
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update channel type
$response = $client->updateChannelType([
'name' => 'My Feed',
'automod' => 'value',
'automod_behavior' => 'value',
'max_message_length' => 10,
'commands' => [],
'connect_events' => false,
]);
print_r($response);Response: UpdateChannelTypeResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| automod | string | Yes | - |
| automod_behavior | string | Yes | - |
| max_message_length | int | 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 | bool | No | - |
| count_messages | bool | No | - |
| custom_events | bool | No | - |
| delivery_events | bool | No | - |
| grants | array | No | - |
| mark_messages_pending | bool | No | - |
| mutes | bool | No | - |
| partition_size | int | No | - |
| partition_ttl | string | No | - |
| permissions | []PolicyRequest | No | - |
| polls | bool | No | - |
| push_level | string | No | - |
| push_notifications | bool | No | - |
| quotes | bool | No | - |
| reactions | bool | No | - |
| read_events | bool | No | - |
| reminders | bool | No | - |
| replies | bool | No | - |
| search | bool | No | - |
| shared_locations | bool | No | - |
| skip_last_msg_update_for_system_msgs | bool | No | - |
| typing_events | bool | No | - |
| uploads | bool | No | - |
| url_enrichment | bool | No | - |
| user_message_reminders | bool | No | - |
deleteChannelType
Remove a channel type from your application to streamline channel categories or eliminate unused configurations.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete channel type
$response = $client->deleteChannelType([
'name' => 'My Feed',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
listCommands
Obtain a list of all available commands, providing a quick reference to the commands that can be used within the chat environment.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// List commands
$response = $client->listCommands();
print_r($response);Response: ListCommandsResponse
createCommand
Create a new command to extend chat functionalities, enabling custom actions or automations based on user input.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create command
$response = $client->createCommand([
'description' => 'A description',
'name' => 'My Feed',
'args' => 'value',
'set' => 'value',
]);
print_r($response);Response: CreateCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | Description, shown in commands auto-completion |
| name | string | Yes | Unique command name |
| args | string | No | Arguments help text, shown in commands auto-completion |
| set | string | No | Set name used for grouping commands |
getCommand
Access details about a specific command to review its configuration or ensure it performs as expected within the chat.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get command
$response = $client->getCommand([
'name' => 'My Feed',
]);
print_r($response);Response: GetCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
updateCommand
Alter the properties of an existing command to refine its behavior or adapt to changing requirements in the chat application.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update command
$response = $client->updateCommand([
'name' => 'My Feed',
'description' => 'A description',
'args' => 'value',
'set' => 'value',
]);
print_r($response);Response: UpdateCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| description | string | Yes | Description, shown in commands auto-completion |
| args | string | No | Arguments help text, shown in commands auto-completion |
| set | string | No | Set name used for grouping commands |
deleteCommand
Eliminate a command from your chat environment to simplify command options or remove outdated functionalities.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete command
$response = $client->deleteCommand([
'name' => 'My Feed',
]);
print_r($response);Response: DeleteCommandResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
queryDrafts
Search for draft messages to review or manage incomplete communications before they are sent within the chat.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query draft messages
$response = $client->queryDrafts([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query draft messages
$response = $client->queryDrafts([
'sort' => [],
'next' => null,
]);
print_r($response);Example: with user and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query draft messages
$response = $client->queryDrafts([
'user' => ['id' => 'activity-123', 'custom' => {}],
'prev' => null,
]);
print_r($response);Response: QueryDraftsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter to apply to the query |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | string | No | - |
exportChannels
Export channel data to preserve chat history, analyze communication patterns, or integrate with external systems for broader data use.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Export channels
$response = $client->exportChannels([
'channels' => [],
'clear_deleted_message_text' => false,
'export_users' => false,
]);
print_r($response);Example: with include_soft_deleted_channels and include_truncated_messages
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Export channels
$response = $client->exportChannels([
'channels' => [],
'include_soft_deleted_channels' => false,
'include_truncated_messages' => false,
]);
print_r($response);Example: with version
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Export channels
$response = $client->exportChannels([
'channels' => [],
'version' => 'value',
]);
print_r($response);Response: ExportChannelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| channels | []ChannelExport | Yes | Export options for channels |
| clear_deleted_message_text | bool | No | Set if deleted message text should be cleared |
| export_users | bool | No | - |
| include_soft_deleted_channels | bool | No | Set if you want to include deleted channels |
| include_truncated_messages | bool | No | Set if you want to include truncated messages |
| version | string | No | Export version |
queryMembers
Retrieve a list of members within a chat, perfect for when you need to understand the participants in a conversation or manage member-related actions.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query members
$response = $client->queryMembers([
'payload' => 'value',
]);
print_r($response);Response: MembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
queryMessageHistory
Access past messages in a chat to review previous interactions, useful for catching up on conversations or retrieving historical data.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query message history
$response = $client->queryMessageHistory([
'filter' => {},
'limit' => 25,
'sort' => [],
]);
print_r($response);Example: with prev and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query message history
$response = $client->queryMessageHistory([
'filter' => {},
'prev' => null,
'next' => null,
]);
print_r($response);Response: QueryMessageHistoryResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | Yes | Filter to apply to the query |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
getMessage
Fetch a specific message by its identifier, ideal for when you need detailed information about a particular message.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get message
$response = $client->getMessage([
'id' => 'activity-123',
'show_deleted_message' => false,
]);
print_r($response);Response: GetMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| show_deleted_message | bool | No | - |
updateMessage
Modify the content of an existing message, useful for correcting errors or updating information within a conversation.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Update message
$response = $client->updateMessage([
'id' => 'activity-123',
'message' => ['attachments' => []],
'skip_push' => false,
'skip_enrich_url' => false,
]);
print_r($response);Response: UpdateMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| message | MessageRequest | Yes | Message |
| skip_enrich_url | bool | No | Skip enrich URL |
| skip_push | bool | No | - |
updateMessagePartial
Make selective changes to parts of a message without altering the entire content, perfect for minor edits or updates.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially message update
$response = $client->updateMessagePartial([
'id' => 'activity-123',
'user_id' => 'john',
'skip_push' => false,
]);
print_r($response);Example: with set and unset
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially message update
$response = $client->updateMessagePartial([
'id' => 'activity-123',
'set' => {},
'unset' => [],
]);
print_r($response);Example: with user and skip_enrich_url
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially message update
$response = $client->updateMessagePartial([
'id' => 'activity-123',
'user' => ['id' => 'activity-123', 'custom' => {}],
'skip_enrich_url' => false,
]);
print_r($response);Response: UpdateMessagePartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| set | array | No | Sets new field values |
| skip_enrich_url | bool | No | Skip enriching the URL in the message |
| skip_push | bool | No | - |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteMessage
Remove a message from the chat, useful for managing content or when you need to eliminate outdated or inappropriate information.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete message
$response = $client->deleteMessage([
'id' => 'activity-123',
'hard' => false,
'deleted_by' => 'value',
]);
print_r($response);Example: with delete_for_me
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete message
$response = $client->deleteMessage([
'id' => 'activity-123',
'delete_for_me' => false,
]);
print_r($response);Response: DeleteMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| hard | bool | No | - |
| deleted_by | string | No | - |
| delete_for_me | bool | No | - |
runMessageAction
Execute a predefined action on a message, ideal for triggering automated responses or workflows based on message content.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Run message command action
$response = $client->runMessageAction([
'id' => 'activity-123',
'form_data' => {},
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| form_data | array | Yes | ReadOnlyData to execute command with |
| user | UserRequest | No | - |
| user_id | string | No | - |
commitMessage
Finalize and save changes made to a message, ensuring that all updates are applied and visible to chat participants.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Commit message
$response = $client->commitMessage([
'id' => 'activity-123',
]);
print_r($response);Response: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
ephemeralMessageUpdate
Update an ephemeral message, which is temporary and may disappear after a set time, useful for time-sensitive or transient information.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ephemeral message update
$response = $client->ephemeralMessageUpdate([
'id' => 'activity-123',
'user_id' => 'john',
'skip_push' => false,
]);
print_r($response);Example: with set and unset
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ephemeral message update
$response = $client->ephemeralMessageUpdate([
'id' => 'activity-123',
'set' => {},
'unset' => [],
]);
print_r($response);Example: with user and skip_enrich_url
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ephemeral message update
$response = $client->ephemeralMessageUpdate([
'id' => 'activity-123',
'user' => ['id' => 'activity-123', 'custom' => {}],
'skip_enrich_url' => false,
]);
print_r($response);Response: UpdateMessagePartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| set | array | No | Sets new field values |
| skip_enrich_url | bool | No | Skip enriching the URL in the message |
| skip_push | bool | No | - |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | string | No | - |
sendReaction
Express your response or feedback to a message by sending an emoji reaction, enhancing interaction and engagement within the chat.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Send reaction
$response = $client->sendReaction([
'id' => 'activity-123',
'reaction' => ['type' => 'like', 'created_at' => 10],
'skip_push' => false,
'enforce_unique' => true,
]);
print_r($response);Response: SendReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| reaction | ReactionRequest | Yes | - |
| enforce_unique | bool | No | Whether to replace all existing user reactions |
| skip_push | bool | No | Skips any mobile push notifications |
deleteReaction
Removes a user's reaction from a message, useful for managing or correcting reactions in a conversation.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete reaction
$response = $client->deleteReaction([
'id' => 'activity-123',
'type' => 'like',
'user_id' => 'john',
]);
print_r($response);Response: DeleteReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| type | string | Yes | - |
| user_id | string | No | - |
getReactions
Retrieves all reactions associated with a specific message, allowing users to view collective feedback or expressions from the chat participants.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get reactions
$response = $client->getReactions([
'id' => 'activity-123',
'limit' => 25,
'offset' => 0,
]);
print_r($response);Response: GetReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| limit | int | No | - |
| offset | int | No | - |
queryReactions
Fetches specific reactions based on given criteria, enabling users to filter and analyze reactions for insights or moderation.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
//
$response = $client->queryReactions([
'id' => 'activity-123',
'user_id' => 'john',
'limit' => 25,
]);
print_r($response);Example: with filter and sort
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
//
$response = $client->queryReactions([
'id' => 'activity-123',
'filter' => {},
'sort' => [],
]);
print_r($response);Example: with next and user
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
//
$response = $client->queryReactions([
'id' => 'activity-123',
'next' => null,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
//
$response = $client->queryReactions([
'id' => 'activity-123',
'prev' => null,
]);
print_r($response);Response: QueryReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| filter | array | No | Filter to apply to the query |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | string | No | - |
translateMessage
Converts a message into a different language, facilitating communication between users who speak different languages.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Translate message
$response = $client->translateMessage([
'id' => 'activity-123',
'language' => 'value',
]);
print_r($response);Response: MessageActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| language | string | Yes | Language to translate message to |
undeleteMessage
Restores a previously deleted message, useful for recovering important information or correcting accidental deletions.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Undelete message
$response = $client->undeleteMessage([
'id' => 'activity-123',
'undeleted_by' => 'value',
]);
print_r($response);Response: UndeleteMessageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| undeleted_by | string | Yes | ID of the user who is undeleting the message |
castPollVote
Allows a user to submit their vote in a poll, enabling participation and engagement in decision-making processes.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Cast vote
$response = $client->castPollVote([
'message_id' => 'value',
'poll_id' => 'poll-123',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with vote
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Cast vote
$response = $client->castPollVote([
'message_id' => 'value',
'poll_id' => 'poll-123',
'vote' => ['answer_text' => 'value'],
]);
print_r($response);Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| poll_id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
| vote | VoteData | No | Vote data |
deletePollVote
Removes a user's vote from a poll, providing flexibility to change decisions or correct voting errors.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete vote
$response = $client->deletePollVote([
'message_id' => 'value',
'poll_id' => 'poll-123',
'vote_id' => 'vote-123',
'user_id' => 'john',
]);
print_r($response);Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| poll_id | string | Yes | - |
| vote_id | string | Yes | - |
| user_id | string | No | - |
createReminder
Sets up a reminder for a specific event or task, helping users stay organized and remember important dates or activities.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create reminder
$response = $client->createReminder([
'message_id' => 'value',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with remind_at
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create reminder
$response = $client->createReminder([
'message_id' => 'value',
'remind_at' => 10,
]);
print_r($response);Response: ReminderResponseData
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| remind_at | float | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
updateReminder
Modifies an existing reminder, allowing users to adjust details or schedules to accommodate changes in plans.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Updates Reminder
$response = $client->updateReminder([
'message_id' => 'value',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with remind_at
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Updates Reminder
$response = $client->updateReminder([
'message_id' => 'value',
'remind_at' => 10,
]);
print_r($response);Response: UpdateReminderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| remind_at | float | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteReminder
Removes an existing reminder, useful for clearing completed tasks or canceling unnecessary notifications.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete reminder
$response = $client->deleteReminder([
'message_id' => 'value',
'user_id' => 'john',
]);
print_r($response);Response: DeleteReminderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| user_id | string | No | - |
getReplies
Retrieve all replies to a specific message, useful for following a conversation thread within a chat.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get replies
$response = $client->getReplies([
'parent_id' => 'parent-123',
'limit' => 25,
'sort' => [],
]);
print_r($response);Example: with id_gte and id_gt
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get replies
$response = $client->getReplies([
'parent_id' => 'parent-123',
'id_gte' => 'value',
'id_gt' => 'value',
]);
print_r($response);Example: with id_lte and id_lt
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get replies
$response = $client->getReplies([
'parent_id' => 'parent-123',
'id_lte' => 'value',
'id_lt' => 'value',
]);
print_r($response);Example: with id_around
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get replies
$response = $client->getReplies([
'parent_id' => 'parent-123',
'id_around' => 'value',
]);
print_r($response);Response: GetRepliesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| parent_id | string | Yes | - |
| sort | []SortParamRequest | No | - |
| limit | int | No | - |
| id_gte | string | No | - |
| id_gt | string | No | - |
| id_lte | string | No | - |
| id_lt | string | No | - |
| id_around | string | No | - |
queryMessageFlags
Check the flags associated with messages, helping to identify and manage content that requires moderation or attention.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Message Flags
$response = $client->queryMessageFlags([
'payload' => 'value',
]);
print_r($response);Response: QueryMessageFlagsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
muteChannel
Temporarily silence notifications from a specific channel, ideal for minimizing distractions without leaving the conversation.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mute channel
$response = $client->muteChannel([
'user_id' => 'john',
'expiration' => 10,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with channel_cids
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mute channel
$response = $client->muteChannel([
'channel_cids' => [],
]);
print_r($response);Response: MuteChannelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel_cids | []string | No | Channel CIDs to mute (if multiple channels) |
| expiration | int | No | Duration of mute in milliseconds |
| user | UserRequest | No | - |
| user_id | string | No | - |
unmuteChannel
Re-enable notifications for a previously muted channel, allowing you to stay updated on new messages.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Unmute channel
$response = $client->unmuteChannel([
'user_id' => 'john',
'expiration' => 10,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with channel_cids
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Unmute channel
$response = $client->unmuteChannel([
'channel_cids' => [],
]);
print_r($response);Response: UnmuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel_cids | []string | No | Channel CIDs to mute (if multiple channels) |
| expiration | int | No | Duration of mute in milliseconds |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryBannedUsers
List the users who have been banned from a chat, useful for managing community access and enforcing rules.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Banned Users
$response = $client->queryBannedUsers([
'payload' => 'value',
]);
print_r($response);Response: QueryBannedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
queryFutureChannelBans
View scheduled bans for a channel, helping you anticipate and manage upcoming restrictions on user access.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Future Channel Bans
$response = $client->queryFutureChannelBans([
'payload' => 'value',
]);
print_r($response);Response: QueryFutureChannelBansResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
queryReminders
Access a list of reminders set within the chat, ensuring you don't miss important events or tasks.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query reminders
$response = $client->queryReminders([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query reminders
$response = $client->queryReminders([
'sort' => [],
'next' => null,
]);
print_r($response);Example: with user and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query reminders
$response = $client->queryReminders([
'user' => ['id' => 'activity-123', 'custom' => {}],
'prev' => null,
]);
print_r($response);Response: QueryRemindersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter to apply to the query |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | string | No | - |
getRetentionPolicy
Retrieve the current data retention policy to understand how long data is stored and managed, ensuring compliance with organizational or regulatory requirements.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get retention policy
$response = $client->getRetentionPolicy();
print_r($response);Response: GetRetentionPolicyResponse
setRetentionPolicy
Define or modify the data retention policy to control how long data is retained, helping maintain data governance and compliance.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Set retention policy
$response = $client->setRetentionPolicy([
'max_age_hours' => 10,
'policy' => 'value',
]);
print_r($response);Response: SetRetentionPolicyResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| max_age_hours | int | Yes | - |
| policy | string | Yes | - |
deleteRetentionPolicy
Remove an existing data retention policy when it is no longer needed, helping streamline data management practices.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete retention policy
$response = $client->deleteRetentionPolicy([
'policy' => 'value',
]);
print_r($response);Response: DeleteRetentionPolicyResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| policy | string | Yes | - |
getRetentionPolicyRuns
Access historical records of retention policy executions to monitor compliance and review data management activities over time.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get retention policy runs
$response = $client->getRetentionPolicyRuns([
'limit' => 25,
'sort' => [],
'filter_conditions' => {},
]);
print_r($response);Example: with prev and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get retention policy runs
$response = $client->getRetentionPolicyRuns([
'prev' => null,
'next' => null,
]);
print_r($response);Response: GetRetentionPolicyRunsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter_conditions | array | No | Filter conditions to apply to the query |
| limit | int | 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
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Search messages
$response = $client->search([
'payload' => 'value',
]);
print_r($response);Response: SearchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
querySegments
Retrieve a list of user segments based on specified criteria, useful for targeted communication and analysis.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query segments
$response = $client->querySegments([
'filter' => {},
'limit' => 25,
'sort' => [],
]);
print_r($response);Example: with prev and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query segments
$response = $client->querySegments([
'filter' => {},
'prev' => null,
'next' => null,
]);
print_r($response);Response: QuerySegmentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | Yes | Filter to apply to the query |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
getSegment
Obtain detailed information about a specific user segment, aiding in personalized engagement and insights.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get segment
$response = $client->getSegment([
'id' => 'activity-123',
]);
print_r($response);Response: GetSegmentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
deleteSegment
Remove a specific segment from your chat application, useful for managing and organizing user groups or data collections.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete segment
$response = $client->deleteSegment([
'id' => 'activity-123',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
deleteSegmentTargets
Remove specified targets from a segment, helpful for updating or refining the members or elements within a segment.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete targets from a segment
$response = $client->deleteSegmentTargets([
'id' => 'activity-123',
'target_ids' => [],
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| target_ids | []string | Yes | Target IDs |
segmentTargetExists
Verify if a particular target is part of a segment, useful for ensuring data accuracy or confirming membership before performing operations.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Check whether a target exists in a segment
$response = $client->segmentTargetExists([
'id' => 'activity-123',
'target_id' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| target_id | string | Yes | - |
querySegmentTargets
Retrieve a list of targets within a segment, ideal for gaining insights or performing actions on specific segment members.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query segment targets
$response = $client->querySegmentTargets([
'id' => 'activity-123',
'limit' => 25,
'Sort' => [],
]);
print_r($response);Example: with Filter and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query segment targets
$response = $client->querySegmentTargets([
'id' => 'activity-123',
'Filter' => {},
'next' => null,
]);
print_r($response);Example: with prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query segment targets
$response = $client->querySegmentTargets([
'id' => 'activity-123',
'prev' => null,
]);
print_r($response);Response: QuerySegmentTargetsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| Filter | array | No | - |
| Sort | []SortParamRequest | No | - |
| limit | int | No | Limit |
| next | string | No | Next |
| prev | string | No | Prev |
queryTeamUsageStats
Obtain detailed statistics on team usage to evaluate engagement levels, optimize resource allocation, and improve team performance.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Team Usage Statistics
$response = $client->queryTeamUsageStats([
'limit' => 25,
'end_date' => 'value',
'month' => 'value',
]);
print_r($response);Example: with next and start_date
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Team Usage Statistics
$response = $client->queryTeamUsageStats([
'next' => null,
'start_date' => 'value',
]);
print_r($response);Response: QueryTeamUsageStatsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| end_date | string | No | End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown. |
| limit | int | No | Maximum number of teams to return per page (default: 30, max: 30) |
| month | string | No | Month in YYYY-MM format (e.g., '2026-01'). Mutually exclusive with start_date/end_date. Returns a... |
| next | string | No | Cursor for pagination to fetch next page of teams |
| start_date | string | No | Start date in YYYY-MM-DD format. Used with end_date for custom date range. Returns daily breakdown. |
queryThreads
Search and filter chat threads based on specific criteria, enabling efficient navigation and management of conversation histories.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Threads
$response = $client->queryThreads([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and participant_limit
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Threads
$response = $client->queryThreads([
'sort' => [],
'participant_limit' => 10,
]);
print_r($response);Example: with prev and reply_limit
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Threads
$response = $client->queryThreads([
'prev' => null,
'reply_limit' => 10,
]);
print_r($response);Example: with member_limit and user
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Threads
$response = $client->queryThreads([
'member_limit' => 10,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: QueryThreadsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter to apply to the query |
| limit | int | No | - |
| member_limit | int | No | - |
| next | string | No | - |
| participant_limit | int | No | Limit the number of participants returned per each thread |
| prev | string | No | - |
| reply_limit | int | No | Limit the number of replies returned per each thread |
| sort | []SortParamRequest | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | string | No | - |
getThread
Retrieve detailed information about a specific chat thread, useful for reviewing conversation content or metadata.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get Thread
$response = $client->getThread([
'message_id' => 'value',
'reply_limit' => 10,
'participant_limit' => 10,
]);
print_r($response);Example: with member_limit
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get Thread
$response = $client->getThread([
'message_id' => 'value',
'member_limit' => 10,
]);
print_r($response);Response: GetThreadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| reply_limit | int | No | - |
| participant_limit | int | No | - |
| member_limit | int | No | - |
updateThreadPartial
Make selective updates to a chat thread without altering its entire content, useful for modifying specific details or attributes.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially update thread
$response = $client->updateThreadPartial([
'message_id' => 'value',
'user_id' => 'john',
'unset' => [],
]);
print_r($response);Example: with user and set
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Partially update thread
$response = $client->updateThreadPartial([
'message_id' => 'value',
'user' => ['id' => 'activity-123', 'custom' => {}],
'set' => {},
]);
print_r($response);Response: UpdateThreadPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | - |
| set | array | No | Sets new field values |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | string | No | - |
unreadCounts
Check the number of unread messages in chat threads, helping users stay informed about new activity and prioritize responses.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Unread counts
$response = $client->unreadCounts([
'user_id' => 'john',
]);
print_r($response);Response: WrappedUnreadCountsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
unreadCountsBatch
Obtain unread message counts for multiple chat threads simultaneously, providing a comprehensive overview of pending messages.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Batch unread counts
$response = $client->unreadCountsBatch([
'user_ids' => ['user-1', 'user-2'],
]);
print_r($response);Response: UnreadCountsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
sendUserCustomEvent
Trigger a custom event associated with a user, useful for tracking user interactions or implementing personalized features.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Send user event
$response = $client->sendUserCustomEvent([
'user_id' => 'john',
'event' => ['type' => 'like', 'custom' => {}],
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
| event | UserCustomEventRequest | Yes | - |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
Attachment
An attachment is a message object that represents a file uploaded by a user.
// Attachment array structure
[
'actions' => array, //
'asset_url' => string, //
'author_icon' => string, //
'author_link' => string, //
'author_name' => string, //
'color' => string, //
'custom' => array, //
'fallback' => string, //
'fields' => array, //
'footer' => string, //
'footer_icon' => string, //
'giphy' => Images, //
'image_url' => string, //
'og_scrape_url' => string, //
'original_height' => int, //
'original_width' => int, //
'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 | array | 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 | int | No | |
| original_width | int | 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 array structure
[
'banned_by' => UserResponse, //
'channel' => ChannelResponse, //
'created_at' => float, //
'expires' => float, //
'reason' => string, //
'shadow' => bool, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | float | No | |
| reason | string | No | |
| shadow | bool | No | |
| user | UserResponse | No |
BlockListOptions
// BlockListOptions array 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 array structure
[
'custom' => array, //
'id' => string, //
'members' => array, //
'members_template' => array, //
'team' => string, //
'type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | Yes | |
| type | string | Yes | |
| id | string | No | |
| members | array | No | |
| members_template | array | No | |
| team | string | No |
CampaignMessageTemplate
// CampaignMessageTemplate array structure
[
'attachments' => array, //
'custom' => array, //
'poll_id' => string, //
'searchable' => bool, //
'text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | array | Yes | |
| custom | array | Yes | |
| poll_id | string | Yes | |
| searchable | bool | Yes | |
| text | string | Yes |
CampaignResponse
// CampaignResponse array structure
[
'channel_template' => CampaignChannelTemplate, //
'create_channels' => bool, //
'created_at' => float, //
'description' => string, //
'id' => string, //
'message_template' => CampaignMessageTemplate, //
'name' => string, //
'scheduled_for' => float, //
'segment_ids' => array, //
'segments' => array, //
'sender' => UserResponse, //
'sender_id' => string, //
'sender_mode' => string, //
'sender_visibility' => string, //
'show_channels' => bool, //
'skip_push' => bool, //
'skip_webhook' => bool, //
'stats' => CampaignStatsResponse, //
'status' => string, //
'stop_at' => float, //
'updated_at' => float, //
'user_ids' => array, //
'users' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| create_channels | bool | Yes | |
| created_at | float | 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 | bool | Yes | |
| skip_push | bool | Yes | |
| skip_webhook | bool | Yes | |
| stats | CampaignStatsResponse | Yes | |
| status | string | Yes | |
| updated_at | float | Yes | |
| user_ids | array | Yes | |
| users | array | Yes | |
| channel_template | CampaignChannelTemplate | No | |
| message_template | CampaignMessageTemplate | No | |
| scheduled_for | float | No | |
| sender | UserResponse | No | |
| stop_at | float | No |
CampaignStatsResponse
// CampaignStatsResponse array structure
[
'progress' => float, //
'stats_channels_created' => int, //
'stats_completed_at' => float, //
'stats_messages_sent' => int, //
'stats_started_at' => float, //
'stats_users_read' => int, //
'stats_users_sent' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| progress | float | Yes | |
| stats_channels_created | int | Yes | |
| stats_completed_at | float | Yes | |
| stats_messages_sent | int | Yes | |
| stats_started_at | float | Yes | |
| stats_users_read | int | Yes | |
| stats_users_sent | int | Yes |
ChannelBatchMemberRequest
// ChannelBatchMemberRequest array 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 array 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 array 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' => bool, //
'count_messages' => bool, //
'created_at' => float, //
'custom_events' => bool, //
'delivery_events' => bool, //
'mark_messages_pending' => bool, //
'max_message_length' => int, //
'mutes' => bool, //
'name' => string, //
'partition_size' => int, //
'partition_ttl' => string, //
'polls' => bool, //
'push_level' => string, //
'push_notifications' => bool, //
'quotes' => bool, //
'reactions' => bool, //
'read_events' => bool, //
'reminders' => bool, //
'replies' => bool, //
'search' => bool, //
'shared_locations' => bool, //
'skip_last_msg_update_for_system_msgs' => bool, //
'typing_events' => bool, //
'updated_at' => float, //
'uploads' => bool, //
'url_enrichment' => bool, //
'user_message_reminders' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | string | Yes | |
| automod_behavior | string | Yes | |
| commands | array | Yes | List of commands that channel supports |
| connect_events | bool | Yes | |
| count_messages | bool | Yes | |
| created_at | float | Yes | |
| custom_events | bool | Yes | |
| delivery_events | bool | Yes | |
| mark_messages_pending | bool | Yes | |
| max_message_length | int | Yes | |
| mutes | bool | Yes | |
| name | string | Yes | |
| polls | bool | Yes | |
| push_notifications | bool | Yes | |
| quotes | bool | Yes | |
| reactions | bool | Yes | |
| read_events | bool | Yes | |
| reminders | bool | Yes | |
| replies | bool | Yes | |
| search | bool | Yes | |
| shared_locations | bool | Yes | |
| skip_last_msg_update_for_system_msgs | bool | Yes | |
| typing_events | bool | Yes | |
| updated_at | float | Yes | |
| uploads | bool | Yes | |
| url_enrichment | bool | Yes | |
| user_message_reminders | bool | 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 | int | No | |
| partition_ttl | string | No | |
| push_level | string | No |
ChannelDataUpdate
// ChannelDataUpdate array structure
[
'auto_translation_enabled' => bool, //
'auto_translation_language' => string, //
'config_overrides' => ChannelConfig, //
'custom' => array, //
'disabled' => bool, //
'frozen' => bool, //
'team' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | bool | No | |
| auto_translation_language | string | No | |
| config_overrides | ChannelConfig | No | |
| custom | array | No | |
| disabled | bool | No | |
| frozen | bool | No | |
| team | string | No |
ChannelExport
// ChannelExport array structure
[
'cid' => string, //
'id' => string, // Channel ID
'messages_since' => float, // Date to export messages since
'messages_until' => float, // Date to export messages until
'type' => string, // Channel type
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | No | |
| id | string | No | Channel ID |
| messages_since | float | No | Date to export messages since |
| messages_until | float | No | Date to export messages until |
| type | string | No | Channel type |
ChannelInput
// ChannelInput array structure
[
'auto_translation_enabled' => bool, // Enable or disable auto translation
'auto_translation_language' => string, // Switch auto translation language
'config_overrides' => ChannelConfig, //
'created_by' => UserRequest, //
'created_by_id' => string, //
'custom' => array, //
'disabled' => bool, //
'filter_tags' => array, //
'frozen' => bool, // 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 | bool | 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 | array | No | |
| disabled | bool | No | |
| filter_tags | array | No | |
| frozen | bool | 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 array structure
[
'auto_translation_enabled' => bool, //
'auto_translation_language' => string, //
'config_overrides' => ConfigOverridesRequest, //
'created_by' => UserRequest, //
'custom' => array, //
'disabled' => bool, //
'frozen' => bool, //
'invites' => array, //
'members' => array, //
'team' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_enabled | bool | No | |
| auto_translation_language | string | No | |
| config_overrides | ConfigOverridesRequest | No | |
| created_by | UserRequest | No | |
| custom | array | No | |
| disabled | bool | No | |
| frozen | bool | No | |
| invites | array | No | |
| members | array | No | |
| team | string | No |
ChannelMemberRequest
// ChannelMemberRequest array structure
[
'channel_role' => string, // Role of the member in the channel
'custom' => array, //
'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 | array | No | |
| user | UserResponse | No |
ChannelMemberResponse
// ChannelMemberResponse array structure
[
'archived_at' => float, //
'ban_expires' => float, // Expiration date of the ban
'banned' => bool, // Whether member is banned this channel or not
'channel_role' => string, // Role of the member in the channel
'created_at' => float, // Date/time of creation
'custom' => array, //
'deleted_at' => float, //
'deleted_messages' => array, //
'invite_accepted_at' => float, // Date when invite was accepted
'invite_rejected_at' => float, // Date when invite was rejected
'invited' => bool, // Whether member was invited or not
'is_moderator' => bool, // Whether member is channel moderator or not
'notifications_muted' => bool, //
'pinned_at' => float, //
'role' => string, // Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner
'shadow_banned' => bool, // Whether member is shadow banned in this channel or not
'status' => string, //
'updated_at' => float, // Date/time of the last update
'user' => UserResponse, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether member is banned this channel or not |
| channel_role | string | Yes | Role of the member in the channel |
| created_at | float | Yes | Date/time of creation |
| custom | array | Yes | |
| notifications_muted | bool | Yes | |
| shadow_banned | bool | Yes | Whether member is shadow banned in this channel or not |
| updated_at | float | Yes | Date/time of the last update |
| archived_at | float | No | |
| ban_expires | float | No | Expiration date of the ban |
| deleted_at | float | No | |
| deleted_messages | array | No | |
| invite_accepted_at | float | No | Date when invite was accepted |
| invite_rejected_at | float | No | Date when invite was rejected |
| invited | bool | No | Whether member was invited or not |
| is_moderator | bool | No | Whether member is channel moderator or not |
| pinned_at | float | 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 array structure
[
'channel' => ChannelResponse, // Channel that is muted
'created_at' => float, // Date/time of creation
'expires' => float, // Date/time of mute expiration
'updated_at' => float, // Date/time of the last update
'user' => UserResponse, // Owner of channel mute
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| updated_at | float | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel that is muted |
| expires | float | No | Date/time of mute expiration |
| user | UserResponse | No | Owner of channel mute |
ChannelPushPreferencesResponse
// ChannelPushPreferencesResponse array structure
[
'chat_level' => string, //
'chat_preferences' => ChatPreferencesResponse, //
'disabled_until' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| chat_level | string | No | |
| chat_preferences | ChatPreferencesResponse | No | |
| disabled_until | float | No |
ChannelResponse
Represents channel in chat
// ChannelResponse array structure
[
'auto_translation_enabled' => bool, // Whether auto translation is enabled or not
'auto_translation_language' => string, // Language to translate to when auto translation is active
'blocked' => bool, // Whether this channel is blocked by current user or not
'cid' => string, // Channel CID (<type>:<id>)
'config' => ChannelConfigWithInfo, // Channel configuration
'cooldown' => int, // Cooldown period after sending each message
'created_at' => float, // Date/time of creation
'created_by' => UserResponse, // Creator of the channel
'custom' => array, // Custom data for this object
'deleted_at' => float, // Date/time of deletion
'disabled' => bool, //
'filter_tags' => array, // List of filter tags associated with the channel
'frozen' => bool, // Whether channel is frozen or not
'hidden' => bool, // Whether this channel is hidden by current user or not
'hide_messages_before' => float, // Date since when the message history is accessible
'id' => string, // Channel unique ID
'last_message_at' => float, // Date of the last message sent
'member_count' => int, // Number of members in the channel
'members' => array, // List of channel members (max 100)
'message_count' => int, // Number of messages in the channel
'mute_expires_at' => float, // Date of mute expiration
'muted' => bool, // 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' => float, // Date of the latest truncation of the channel
'truncated_by' => UserResponse, //
'type' => string, // Type of the channel
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | Yes | Channel CID (<type>:<id>) |
| created_at | float | Yes | Date/time of creation |
| custom | array | Yes | Custom data for this object |
| disabled | bool | Yes | |
| frozen | bool | Yes | Whether channel is frozen or not |
| id | string | Yes | Channel unique ID |
| type | string | Yes | Type of the channel |
| updated_at | float | Yes | Date/time of the last update |
| auto_translation_enabled | bool | No | Whether auto translation is enabled or not |
| auto_translation_language | string | No | Language to translate to when auto translation is active |
| blocked | bool | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | int | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | float | No | Date/time of deletion |
| filter_tags | array | No | List of filter tags associated with the channel |
| hidden | bool | No | Whether this channel is hidden by current user or not |
| hide_messages_before | float | No | Date since when the message history is accessible |
| last_message_at | float | No | Date of the last message sent |
| member_count | int | No | Number of members in the channel |
| members | array | No | List of channel members (max 100) |
| message_count | int | No | Number of messages in the channel |
| mute_expires_at | float | No | Date of mute expiration |
| muted | bool | 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 | float | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChannelStateResponse
// ChannelStateResponse array structure
[
'active_live_locations' => array, //
'channel' => ChannelResponse, //
'draft' => DraftResponse, //
'duration' => string, //
'hidden' => bool, //
'hide_messages_before' => float, //
'members' => array, //
'membership' => ChannelMemberResponse, //
'messages' => array, //
'pending_messages' => array, //
'pinned_messages' => array, //
'push_preferences' => ChannelPushPreferencesResponse, //
'read' => array, //
'threads' => array, //
'watcher_count' => int, //
'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 | bool | No | |
| hide_messages_before | float | No | |
| membership | ChannelMemberResponse | No | |
| pending_messages | array | No | |
| push_preferences | ChannelPushPreferencesResponse | No | |
| read | array | No | |
| watcher_count | int | No | |
| watchers | array | No |
ChannelStateResponseFields
// ChannelStateResponseFields array structure
[
'active_live_locations' => array, // Active live locations in the channel
'channel' => ChannelResponse, //
'draft' => DraftResponse, //
'hidden' => bool, // Whether this channel is hidden or not
'hide_messages_before' => float, // 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' => int, // 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 | bool | No | Whether this channel is hidden or not |
| hide_messages_before | float | 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 | int | No | Number of channel watchers |
| watchers | array | No | List of user who is watching the channel |
ChatPreferences
// ChatPreferences array 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 array structure
[
'args' => string, // Arguments help text, shown in commands auto-completion
'created_at' => float, // 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' => float, // 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 | float | No | Date/time of creation |
| updated_at | float | No | Date/time of the last update |
ConfigOverridesRequest
Channel configuration overrides
// ConfigOverridesRequest array 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' => bool, // Enable/disable message counting
'grants' => array, // Permission grants modifiers
'max_message_length' => int, // Maximum message length
'push_level' => string, //
'quotes' => bool, // Enable/disable quotes
'reactions' => bool, // Enable/disable reactions
'replies' => bool, // Enable/disable replies
'shared_locations' => bool, // Enable/disable shared locations
'typing_events' => bool, // Enable/disable typing events
'uploads' => bool, // Enable/disable uploads
'url_enrichment' => bool, // Enable/disable URL enrichment
'user_message_reminders' => bool, // 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 | bool | No | Enable/disable message counting |
| grants | array | No | Permission grants modifiers |
| max_message_length | int | No | Maximum message length |
| push_level | string | No | |
| quotes | bool | No | Enable/disable quotes |
| reactions | bool | No | Enable/disable reactions |
| replies | bool | No | Enable/disable replies |
| shared_locations | bool | No | Enable/disable shared locations |
| typing_events | bool | No | Enable/disable typing events |
| uploads | bool | No | Enable/disable uploads |
| url_enrichment | bool | No | Enable/disable URL enrichment |
| user_message_reminders | bool | No | Enable/disable user message reminders |
CreateChannelTypeResponse
// CreateChannelTypeResponse array 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' => bool, //
'count_messages' => bool, //
'created_at' => float, //
'custom_events' => bool, //
'delivery_events' => bool, //
'duration' => string, //
'grants' => array, //
'mark_messages_pending' => bool, //
'max_message_length' => int, //
'mutes' => bool, //
'name' => string, //
'partition_size' => int, //
'partition_ttl' => string, //
'permissions' => array, //
'polls' => bool, //
'push_level' => string, //
'push_notifications' => bool, //
'quotes' => bool, //
'reactions' => bool, //
'read_events' => bool, //
'reminders' => bool, //
'replies' => bool, //
'search' => bool, //
'shared_locations' => bool, //
'skip_last_msg_update_for_system_msgs' => bool, //
'typing_events' => bool, //
'updated_at' => float, //
'uploads' => bool, //
'url_enrichment' => bool, //
'user_message_reminders' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | string | Yes | |
| automod_behavior | string | Yes | |
| commands | array | Yes | |
| connect_events | bool | Yes | |
| count_messages | bool | Yes | |
| created_at | float | Yes | |
| custom_events | bool | Yes | |
| delivery_events | bool | Yes | |
| duration | string | Yes | |
| grants | array | Yes | |
| mark_messages_pending | bool | Yes | |
| max_message_length | int | Yes | |
| mutes | bool | Yes | |
| name | string | Yes | |
| permissions | array | Yes | |
| polls | bool | Yes | |
| push_notifications | bool | Yes | |
| quotes | bool | Yes | |
| reactions | bool | Yes | |
| read_events | bool | Yes | |
| reminders | bool | Yes | |
| replies | bool | Yes | |
| search | bool | Yes | |
| shared_locations | bool | Yes | |
| skip_last_msg_update_for_system_msgs | bool | Yes | |
| typing_events | bool | Yes | |
| updated_at | float | Yes | |
| uploads | bool | Yes | |
| url_enrichment | bool | Yes | |
| user_message_reminders | bool | 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 | int | No | |
| partition_ttl | string | No | |
| push_level | string | No |
CreateCommandResponse
// CreateCommandResponse array structure
[
'command' => Command, // Command object
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| command | Command | No | Command object |
CustomEvent
// CustomEvent array structure
[
'created_at' => float, //
'custom' => array, //
'received_at' => float, //
'type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| custom | array | Yes | |
| type | string | Yes | |
| received_at | float | No |
Data
// Data array structure
[
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DeleteChannelResponse
Basic response information
// DeleteChannelResponse array 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 array structure
[
'duration' => string, // Duration of the request in milliseconds
'result' => array, // 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 | array | No | Map of channel IDs and their deletion results |
| task_id | string | No |
DeleteCommandResponse
// DeleteCommandResponse array 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 array 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 array 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 array 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 array 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 array structure
[
'cid' => string, //
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | No | |
| id | string | No |
DraftResponse
// DraftResponse array structure
[
'channel' => ChannelResponse, //
'channel_cid' => string, //
'created_at' => float, //
'message' => DraftPayloadResponse, //
'parent_id' => string, //
'parent_message' => MessageResponse, //
'quoted_message' => MessageResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | float | Yes | |
| message | DraftPayloadResponse | Yes | |
| channel | ChannelResponse | No | |
| parent_id | string | No | |
| parent_message | MessageResponse | No | |
| quoted_message | MessageResponse | No |
EventRequest
// EventRequest array structure
[
'custom' => array, //
'parent_id' => string, //
'type' => string, //
'user' => UserRequest, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| custom | array | No | |
| parent_id | string | No | |
| user | UserRequest | No | |
| user_id | string | No |
EventResponse
Basic response information
// EventResponse array 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 array 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 array structure
[
'banned_by' => UserResponse, //
'created_at' => float, //
'expires' => float, //
'reason' => string, //
'shadow' => bool, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| banned_by | UserResponse | No | |
| expires | float | No | |
| reason | string | No | |
| shadow | bool | No | |
| user | UserResponse | No |
GetCampaignResponse
Basic response information
// GetCampaignResponse array 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 array 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' => bool, //
'count_messages' => bool, //
'created_at' => float, //
'custom_events' => bool, //
'delivery_events' => bool, //
'duration' => string, // Duration of the request in milliseconds
'grants' => array, //
'mark_messages_pending' => bool, //
'max_message_length' => int, //
'mutes' => bool, //
'name' => string, //
'partition_size' => int, //
'partition_ttl' => string, //
'permissions' => array, //
'polls' => bool, //
'push_level' => string, //
'push_notifications' => bool, //
'quotes' => bool, //
'reactions' => bool, //
'read_events' => bool, //
'reminders' => bool, //
'replies' => bool, //
'search' => bool, //
'shared_locations' => bool, //
'skip_last_msg_update_for_system_msgs' => bool, //
'typing_events' => bool, //
'updated_at' => float, //
'uploads' => bool, //
'url_enrichment' => bool, //
'user_message_reminders' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | string | Yes | |
| automod_behavior | string | Yes | |
| commands | array | Yes | |
| connect_events | bool | Yes | |
| count_messages | bool | Yes | |
| created_at | float | Yes | |
| custom_events | bool | Yes | |
| delivery_events | bool | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| grants | array | Yes | |
| mark_messages_pending | bool | Yes | |
| max_message_length | int | Yes | |
| mutes | bool | Yes | |
| name | string | Yes | |
| permissions | array | Yes | |
| polls | bool | Yes | |
| push_notifications | bool | Yes | |
| quotes | bool | Yes | |
| reactions | bool | Yes | |
| read_events | bool | Yes | |
| reminders | bool | Yes | |
| replies | bool | Yes | |
| search | bool | Yes | |
| shared_locations | bool | Yes | |
| skip_last_msg_update_for_system_msgs | bool | Yes | |
| typing_events | bool | Yes | |
| updated_at | float | Yes | |
| uploads | bool | Yes | |
| url_enrichment | bool | Yes | |
| user_message_reminders | bool | 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 | int | No | |
| partition_ttl | string | No | |
| push_level | string | No |
GetCommandResponse
// GetCommandResponse array structure
[
'args' => string, //
'created_at' => float, //
'description' => string, //
'duration' => string, //
'name' => string, //
'set' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| args | string | Yes | |
| description | string | Yes | |
| duration | string | Yes | |
| name | string | Yes | |
| set | string | Yes | |
| created_at | float | No | |
| updated_at | float | No |
GetDraftResponse
Basic response information
// GetDraftResponse array 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 array 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 array structure
[
'duration' => string, // Duration of the request in milliseconds
'message' => MessageWithChannelResponse, //
'pending_message_metadata' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageWithChannelResponse | Yes | |
| pending_message_metadata | array | No |
GetReactionsResponse
// GetReactionsResponse array 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 array 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 array 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 array 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 array 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 array 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 array 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 array structure
[
'crop' => string, // Crop mode. One of: top, bottom, left, right, center
'height' => int, // Target image height
'resize' => string, // Resize method. One of: clip, crop, scale, fill
'width' => int, // Target image width
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | string | No | Crop mode. One of: top, bottom, left, right, center |
| height | int | No | Target image height |
| resize | string | No | Resize method. One of: clip, crop, scale, fill |
| width | int | No | Target image width |
LabelThresholds
// LabelThresholds array structure
[
'block' => float, // Threshold for automatic message block
'flag' => float, // Threshold for automatic message flag
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| block | float | No | Threshold for automatic message block |
| flag | float | No | Threshold for automatic message flag |
ListChannelTypesResponse
// ListChannelTypesResponse array structure
[
'channel_types' => array, // Object with all channel types
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_types | array | Yes | Object with all channel types |
| duration | string | Yes |
ListCommandsResponse
// ListCommandsResponse array 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 array 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 array 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 array structure
[
'channel' => ChannelResponse, //
'channel_id' => string, //
'channel_last_message_at' => float, //
'channel_type' => string, //
'cid' => string, //
'created_at' => float, //
'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 | float | Yes | |
| type | string | Yes | |
| channel | ChannelResponse | No | |
| channel_last_message_at | float | No | |
| last_read_message_id | string | No | |
| team | string | No | |
| thread | ThreadResponse | No | |
| user | UserResponseCommonFields | No |
MembersResponse
// MembersResponse array 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 array 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 array structure
[
'approved_at' => float, //
'created_at' => float, //
'created_by_automod' => bool, //
'custom' => array, //
'details' => FlagDetailsResponse, //
'message' => MessageResponse, //
'moderation_feedback' => FlagFeedbackResponse, //
'moderation_result' => MessageModerationResult, //
'reason' => string, //
'rejected_at' => float, //
'reviewed_at' => float, //
'reviewed_by' => UserResponse, //
'updated_at' => float, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| created_by_automod | bool | Yes | |
| updated_at | float | Yes | |
| approved_at | float | No | |
| custom | array | No | |
| details | FlagDetailsResponse | No | |
| message | MessageResponse | No | |
| moderation_feedback | FlagFeedbackResponse | No | |
| moderation_result | MessageModerationResult | No | |
| reason | string | No | |
| rejected_at | float | No | |
| reviewed_at | float | No | |
| reviewed_by | UserResponse | No | |
| user | UserResponse | No |
MessageHistoryEntryResponse
// MessageHistoryEntryResponse array structure
[
'Custom' => array, //
'attachments' => array, //
'is_deleted' => bool, //
'message_id' => string, //
'message_updated_at' => float, //
'message_updated_by_id' => string, //
'text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Custom | array | Yes | |
| attachments | array | Yes | |
| is_deleted | bool | Yes | |
| message_id | string | Yes | |
| message_updated_at | float | Yes | |
| message_updated_by_id | string | Yes | |
| text | string | Yes |
MessagePaginationParams
// MessagePaginationParams array structure
[
'created_at_after' => float, // The timestamp to get messages with a created_at timestamp greater than
'created_at_after_or_equal' => float, // The timestamp to get messages with a created_at timestamp greater than or equal to
'created_at_around' => float, // 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' => float, // The timestamp to get messages with a created_at timestamp smaller than
'created_at_before_or_equal' => float, // 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' => int, // The maximum number of messages to return (max limit
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at_after | float | No | The timestamp to get messages with a created_at timestamp greater than |
| created_at_after_or_equal | float | No | The timestamp to get messages with a created_at timestamp greater than or equ... |
| created_at_around | float | No | The result will be a set of messages, that are both older and newer than the ... |
| created_at_before | float | No | The timestamp to get messages with a created_at timestamp smaller than |
| created_at_before_or_equal | float | 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 | int | No | The maximum number of messages to return (max limit |
MessageRequest
Message data for creating or updating a message
// MessageRequest array structure
[
'attachments' => array, // Array of message attachments
'custom' => array, //
'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' => bool, //
'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' => bool, //
'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' => float, // Date when pinned message expires
'pinned' => bool, // 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' => bool, // Whether thread reply should be shown in the channel as well
'silent' => bool, // 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 | array | 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 | bool | No | |
| mentioned_group_ids | array | No | List of user group IDs to mention. Group members who are also channel members... |
| mentioned_here | bool | 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 | float | No | Date when pinned message expires |
| pinned | bool | 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 | bool | No | Whether thread reply should be shown in the channel as well |
| silent | bool | 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 array structure
[
'attachments' => array, // Array of message attachments
'cid' => string, // Channel unique identifier in <type>:<id> format
'command' => string, // Contains provided slash command
'created_at' => float, // Date/time of creation
'custom' => array, //
'deleted_at' => float, // Date/time of deletion
'deleted_for_me' => bool, //
'deleted_reply_count' => int, //
'draft' => DraftResponse, //
'html' => string, // Contains HTML markup of the message. Can only be set when using server-side API
'i18n' => array, // 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' => array, // 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' => bool, // 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' => bool, // 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' => float, //
'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' => float, // Date when pinned message expires
'pinned' => bool, // Whether message is pinned or not
'pinned_at' => float, // 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' => array, // An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
'reaction_groups' => array, //
'reaction_scores' => array, // An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
'reminder' => ReminderResponseData, //
'reply_count' => int, // 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' => bool, // Whether the message was shadowed or not
'shared_location' => SharedLocationResponseData, // Contains shared location data
'show_in_channel' => bool, // Whether thread reply should be shown in the channel as well
'silent' => bool, // 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' => float, // 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 | float | Yes | Date/time of creation |
| custom | array | Yes | |
| deleted_reply_count | int | 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 | bool | Yes | Whether the message mentioned the channel tag |
| mentioned_here | bool | 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 | bool | Yes | Whether message is pinned or not |
| reaction_counts | array | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | array | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | int | 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 | bool | Yes | Whether the message was shadowed or not |
| silent | bool | 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 | float | 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 | float | No | Date/time of deletion |
| deleted_for_me | bool | No | |
| draft | DraftResponse | No | |
| i18n | array | No | Object with translations. Key language contains the original language key. ... |
| image_labels | array | 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 | float | 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 | float | No | Date when pinned message expires |
| pinned_at | float | 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 | array | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | bool | 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 array 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' => float, // Date/time of creation
'custom' => array, //
'deleted_at' => float, // Date/time of deletion
'deleted_for_me' => bool, //
'deleted_reply_count' => int, //
'draft' => DraftResponse, //
'html' => string, // Contains HTML markup of the message. Can only be set when using server-side API
'i18n' => array, // 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' => array, // 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' => bool, // 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' => bool, // 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' => float, //
'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' => float, // Date when pinned message expires
'pinned' => bool, // Whether message is pinned or not
'pinned_at' => float, // 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' => array, // An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
'reaction_groups' => array, //
'reaction_scores' => array, // An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
'reminder' => ReminderResponseData, //
'reply_count' => int, // 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' => bool, // Whether the message was shadowed or not
'shared_location' => SharedLocationResponseData, // Contains shared location data
'show_in_channel' => bool, // Whether thread reply should be shown in the channel as well
'silent' => bool, // 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' => float, // 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 | float | Yes | Date/time of creation |
| custom | array | Yes | |
| deleted_reply_count | int | 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 | bool | Yes | Whether the message mentioned the channel tag |
| mentioned_here | bool | 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 | bool | Yes | Whether message is pinned or not |
| reaction_counts | array | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | array | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | int | 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 | bool | Yes | Whether the message was shadowed or not |
| silent | bool | 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 | float | 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 | float | No | Date/time of deletion |
| deleted_for_me | bool | No | |
| draft | DraftResponse | No | |
| i18n | array | No | Object with translations. Key language contains the original language key. ... |
| image_labels | array | 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 | float | 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 | float | No | Date when pinned message expires |
| pinned_at | float | 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 | array | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | bool | 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 array 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 array structure
[
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
OwnUserResponse
// OwnUserResponse array structure
[
'avg_response_time' => int, //
'banned' => bool, //
'blocked_user_ids' => array, //
'channel_mutes' => array, //
'created_at' => float, //
'custom' => array, //
'deactivated_at' => float, //
'deleted_at' => float, //
'devices' => array, //
'id' => string, //
'image' => string, //
'invisible' => bool, //
'language' => string, //
'last_active' => float, //
'latest_hidden_channels' => array, //
'mutes' => array, //
'name' => string, //
'online' => bool, //
'privacy_settings' => PrivacySettingsResponse, //
'push_preferences' => PushPreferencesResponse, //
'revoke_tokens_issued_before' => float, //
'role' => string, //
'teams' => array, //
'teams_role' => array, //
'total_unread_count' => int, //
'total_unread_count_by_team' => array, //
'unread_channels' => int, //
'unread_count' => int, //
'unread_threads' => int, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | |
| channel_mutes | array | Yes | |
| created_at | float | Yes | |
| custom | array | Yes | |
| devices | array | Yes | |
| id | string | Yes | |
| invisible | bool | Yes | |
| language | string | Yes | |
| mutes | array | Yes | |
| online | bool | Yes | |
| role | string | Yes | |
| teams | array | Yes | |
| total_unread_count | int | Yes | |
| unread_channels | int | Yes | |
| unread_count | int | Yes | |
| unread_threads | int | Yes | |
| updated_at | float | Yes | |
| avg_response_time | int | No | |
| blocked_user_ids | array | No | |
| deactivated_at | float | No | |
| deleted_at | float | No | |
| image | string | No | |
| last_active | float | No | |
| latest_hidden_channels | array | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | float | No | |
| teams_role | array | No | |
| total_unread_count_by_team | array | No |
PagerResponse
// PagerResponse array structure
[
'next' => string, //
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | string | No | |
| prev | string | No |
PaginationParams
// PaginationParams array structure
[
'limit' => int, //
'offset' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | int | No | |
| offset | int | No |
ParsedPredefinedFilterResponse
// ParsedPredefinedFilterResponse array structure
[
'filter' => array, //
'name' => string, //
'sort' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| filter | array | Yes | |
| name | string | Yes | |
| sort | array | No |
PendingMessageResponse
// PendingMessageResponse array structure
[
'channel' => ChannelResponse, //
'message' => MessageResponse, //
'metadata' => array, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| metadata | array | No | |
| user | UserResponse | No |
Policy
// Policy array structure
[
'action' => int, //
'created_at' => float, //
'name' => string, //
'owner' => bool, //
'priority' => int, //
'resources' => array, //
'roles' => array, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | int | Yes | |
| created_at | float | Yes | |
| name | string | Yes | |
| owner | bool | Yes | |
| priority | int | Yes | |
| resources | array | Yes | |
| roles | array | Yes | |
| updated_at | float | Yes |
PolicyRequest
Policy request
// PolicyRequest array structure
[
'action' => string, //
'name' => string, // User-friendly policy name
'owner' => bool, // Whether policy applies to resource owner or not
'priority' => int, // 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 | bool | Yes | Whether policy applies to resource owner or not |
| priority | int | 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 array structure
[
'allow_answers' => bool, //
'allow_user_suggested_options' => bool, //
'answers_count' => int, //
'created_at' => float, //
'created_by' => UserResponse, //
'created_by_id' => string, //
'custom' => array, //
'description' => string, //
'enforce_unique_vote' => bool, //
'id' => string, //
'is_closed' => bool, //
'latest_answers' => array, //
'latest_votes_by_option' => array, //
'max_votes_allowed' => int, //
'name' => string, //
'options' => array, //
'own_votes' => array, //
'updated_at' => float, //
'vote_count' => int, //
'vote_counts_by_option' => array, //
'voting_visibility' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | bool | Yes | |
| allow_user_suggested_options | bool | Yes | |
| answers_count | int | Yes | |
| created_at | float | Yes | |
| created_by_id | string | Yes | |
| custom | array | Yes | |
| description | string | Yes | |
| enforce_unique_vote | bool | Yes | |
| id | string | Yes | |
| latest_answers | array | Yes | |
| latest_votes_by_option | array | Yes | |
| name | string | Yes | |
| options | array | Yes | |
| own_votes | array | Yes | |
| updated_at | float | Yes | |
| vote_count | int | Yes | |
| vote_counts_by_option | array | Yes | |
| voting_visibility | string | Yes | |
| created_by | UserResponse | No | |
| is_closed | bool | No | |
| max_votes_allowed | int | No |
PollVoteResponse
// PollVoteResponse array 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 array structure
[
'answer_text' => string, //
'created_at' => float, //
'id' => string, //
'is_answer' => bool, //
'option_id' => string, //
'poll_id' => string, //
'updated_at' => float, //
'user' => UserResponse, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| id | string | Yes | |
| option_id | string | Yes | |
| poll_id | string | Yes | |
| updated_at | float | Yes | |
| answer_text | string | No | |
| is_answer | bool | No | |
| user | UserResponse | No | |
| user_id | string | No |
PrivacySettingsResponse
// PrivacySettingsResponse array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array 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 array structure
[
'activity_id' => string, //
'children_counts' => array, //
'created_at' => float, //
'data' => array, //
'deleted_at' => float, //
'id' => string, //
'kind' => string, //
'latest_children' => array, //
'moderation' => array, //
'own_children' => array, //
'parent' => string, //
'score' => float, //
'target_feeds' => array, //
'target_feeds_extra_data' => array, //
'updated_at' => float, //
'user' => User, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | float | Yes | |
| kind | string | Yes | |
| updated_at | float | Yes | |
| user_id | string | Yes | |
| children_counts | array | No | |
| data | array | No | |
| deleted_at | float | No | |
| id | string | No | |
| latest_children | array | No | |
| moderation | array | No | |
| own_children | array | No | |
| parent | string | No | |
| score | float | No | |
| target_feeds | array | No | |
| target_feeds_extra_data | array | No | |
| user | User | No |
ReactionRequest
Represents user reaction to a message
// ReactionRequest array structure
[
'created_at' => float, // Date/time of creation
'custom' => array, //
'score' => int, // Reaction score. If not specified reaction has score of 1
'type' => string, // The type of reaction (e.g. 'like', 'laugh', 'wow')
'updated_at' => float, // 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 | float | No | Date/time of creation |
| custom | array | No | |
| score | int | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | float | No | Date/time of the last update |
| user | UserRequest | No | |
| user_id | string | No |
ReactionResponse
// ReactionResponse array structure
[
'created_at' => float, // Date/time of creation
'custom' => array, // Custom data for this object
'message_id' => string, // Message ID
'score' => int, // Score of the reaction
'type' => string, // Type of reaction
'updated_at' => float, // Date/time of the last update
'user' => UserResponse, // User
'user_id' => string, // User ID
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| custom | array | Yes | Custom data for this object |
| message_id | string | Yes | Message ID |
| score | int | Yes | Score of the reaction |
| type | string | Yes | Type of reaction |
| updated_at | float | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | string | Yes | User ID |
ReadStateResponse
// ReadStateResponse array structure
[
'last_delivered_at' => float, //
'last_delivered_message_id' => string, //
'last_read' => float, //
'last_read_message_id' => string, //
'unread_messages' => int, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | float | Yes | |
| unread_messages | int | Yes | |
| user | UserResponse | Yes | |
| last_delivered_at | float | No | |
| last_delivered_message_id | string | No | |
| last_read_message_id | string | No |
ReminderResponseData
// ReminderResponseData array structure
[
'channel' => ChannelResponse, //
'channel_cid' => string, //
'created_at' => float, //
'message' => MessageResponse, //
'message_id' => string, //
'remind_at' => float, //
'updated_at' => float, //
'user' => UserResponse, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | float | Yes | |
| message_id | string | Yes | |
| updated_at | float | Yes | |
| user_id | string | Yes | |
| channel | ChannelResponse | No | |
| message | MessageResponse | No | |
| remind_at | float | No | |
| user | UserResponse | No |
Response
Basic response information
// Response array 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 array structure
[
'app_pk' => int, //
'config' => PolicyConfig, //
'enabled_at' => float, //
'policy' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| config | PolicyConfig | Yes | |
| enabled_at | float | Yes | |
| policy | string | Yes |
RetentionRunResponse
// RetentionRunResponse array structure
[
'app_pk' => int, //
'date' => string, //
'policy' => string, //
'stats' => RunStats, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| date | string | Yes | |
| policy | string | Yes | |
| stats | RunStats | Yes |
SearchResponse
// SearchResponse array 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 array structure
[
'message' => SearchResultMessage, // Found message
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| message | SearchResultMessage | No | Found message |
SearchWarning
// SearchWarning array structure
[
'channel_search_cids' => array, // Channel CIDs for the searched channels
'channel_search_count' => int, // Number of channels searched
'warning_code' => int, // Code corresponding to the warning
'warning_description' => string, // Description of the warning
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| warning_code | int | 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 | int | No | Number of channels searched |
Segment
// Segment array structure
[
'all_sender_channels' => bool, //
'all_users' => bool, //
'created_at' => float, //
'deleted_at' => float, //
'description' => string, //
'filter' => array, //
'id' => string, //
'name' => string, //
'size' => int, //
'task_id' => string, //
'type' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | bool | Yes | |
| all_users | bool | Yes | |
| created_at | float | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| size | int | Yes | |
| type | string | Yes | |
| updated_at | float | Yes | |
| deleted_at | float | No | |
| description | string | No | |
| filter | array | No | |
| task_id | string | No |
SegmentResponse
// SegmentResponse array structure
[
'all_sender_channels' => bool, //
'all_users' => bool, //
'created_at' => float, //
'deleted_at' => float, //
'description' => string, //
'filter' => array, //
'id' => string, //
'name' => string, //
'size' => int, //
'type' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| all_sender_channels | bool | Yes | |
| all_users | bool | Yes | |
| created_at | float | Yes | |
| deleted_at | float | Yes | |
| description | string | Yes | |
| filter | array | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| size | int | Yes | |
| type | string | Yes | |
| updated_at | float | Yes |
SegmentTargetResponse
// SegmentTargetResponse array structure
[
'app_pk' => int, //
'created_at' => float, //
'segment_id' => string, //
'target_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| segment_id | string | Yes | |
| target_id | string | Yes |
SendMessageResponse
// SendMessageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'message' => MessageResponse, // Message response
'pending_message_metadata' => array, // 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 | array | No | Pending message metadata |
SendReactionResponse
Basic response information
// SendReactionResponse array 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 array 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 array structure
[
'created_by_device_id' => string, //
'end_at' => float, //
'latitude' => float, //
'longitude' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | float | Yes | |
| longitude | float | Yes | |
| created_by_device_id | string | No | |
| end_at | float | No |
SharedLocationResponseData
// SharedLocationResponseData array structure
[
'channel' => ChannelResponse, //
'channel_cid' => string, //
'created_at' => float, //
'created_by_device_id' => string, //
'end_at' => float, //
'latitude' => float, //
'longitude' => float, //
'message' => MessageResponse, //
'message_id' => string, //
'updated_at' => float, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | float | Yes | |
| created_by_device_id | string | Yes | |
| latitude | float | Yes | |
| longitude | float | Yes | |
| message_id | string | Yes | |
| updated_at | float | Yes | |
| user_id | string | Yes | |
| channel | ChannelResponse | No | |
| end_at | float | No | |
| message | MessageResponse | No |
ShowChannelResponse
Basic response information
// ShowChannelResponse array 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 array structure
[
'direction' => int, // 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 | int | 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 array 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 array 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 array structure
[
'active_participant_count' => int, // Active Participant Count
'channel' => ChannelResponse, // Channel
'channel_cid' => string, // Channel CID
'created_at' => float, // Date/time of creation
'created_by' => UserResponse, // Created By User
'created_by_user_id' => string, // Created By User ID
'custom' => array, // Custom data for this object
'deleted_at' => float, // Deleted At
'last_message_at' => float, // Last Message At
'parent_message' => MessageResponse, // Parent Message
'parent_message_id' => string, // Parent Message ID
'participant_count' => int, // Participant Count
'reply_count' => int, // Reply Count
'thread_participants' => array, // Thread Participants
'title' => string, // Title
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | int | Yes | Active Participant Count |
| channel_cid | string | Yes | Channel CID |
| created_at | float | Yes | Date/time of creation |
| created_by_user_id | string | Yes | Created By User ID |
| custom | array | Yes | Custom data for this object |
| parent_message_id | string | Yes | Parent Message ID |
| participant_count | int | Yes | Participant Count |
| title | string | Yes | Title |
| updated_at | float | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | float | No | Deleted At |
| last_message_at | float | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| reply_count | int | No | Reply Count |
| thread_participants | array | No | Thread Participants |
ThreadStateResponse
// ThreadStateResponse array structure
[
'active_participant_count' => int, // Active Participant Count
'channel' => ChannelResponse, // Channel
'channel_cid' => string, // Channel CID
'created_at' => float, // Date/time of creation
'created_by' => UserResponse, // Created By User
'created_by_user_id' => string, // Created By User ID
'custom' => array, // Custom data for this object
'deleted_at' => float, // Deleted At
'draft' => DraftResponse, //
'last_message_at' => float, // Last Message At
'latest_replies' => array, //
'parent_message' => MessageResponse, // Parent Message
'parent_message_id' => string, // Parent Message ID
'participant_count' => int, // Participant Count
'read' => array, //
'reply_count' => int, // Reply Count
'thread_participants' => array, // Thread Participants
'title' => string, // Title
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_participant_count | int | Yes | Active Participant Count |
| channel_cid | string | Yes | Channel CID |
| created_at | float | Yes | Date/time of creation |
| created_by_user_id | string | Yes | Created By User ID |
| custom | array | Yes | Custom data for this object |
| latest_replies | array | Yes | |
| parent_message_id | string | Yes | Parent Message ID |
| participant_count | int | Yes | Participant Count |
| title | string | Yes | Title |
| updated_at | float | Yes | Date/time of the last update |
| channel | ChannelResponse | No | Channel |
| created_by | UserResponse | No | Created By User |
| deleted_at | float | No | Deleted At |
| draft | DraftResponse | No | |
| last_message_at | float | No | Last Message At |
| parent_message | MessageResponse | No | Parent Message |
| read | array | No | |
| reply_count | int | No | Reply Count |
| thread_participants | array | No | Thread Participants |
Thresholds
Sets thresholds for AI moderation
// Thresholds array 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 array structure
[
]Timestamp
// Timestamp array structure
[
'Time' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Time | float | No |
TruncateChannelResponse
// TruncateChannelResponse array 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 array 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 array 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 array structure
[
'counts_by_user' => array, //
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| counts_by_user | array | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
UnreadCountsChannel
// UnreadCountsChannel array structure
[
'channel_id' => string, //
'last_read' => float, //
'unread_count' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_id | string | Yes | |
| last_read | float | Yes | |
| unread_count | int | Yes |
UnreadCountsChannelType
// UnreadCountsChannelType array structure
[
'channel_count' => int, //
'channel_type' => string, //
'unread_count' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_count | int | Yes | |
| channel_type | string | Yes | |
| unread_count | int | Yes |
UnreadCountsThread
// UnreadCountsThread array structure
[
'last_read' => float, //
'last_read_message_id' => string, //
'parent_message_id' => string, //
'unread_count' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| last_read | float | Yes | |
| last_read_message_id | string | Yes | |
| parent_message_id | string | Yes | |
| unread_count | int | Yes |
UpdateChannelPartialResponse
// UpdateChannelPartialResponse array 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 array 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 array 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' => bool, //
'count_messages' => bool, //
'created_at' => float, //
'custom_events' => bool, //
'delivery_events' => bool, //
'duration' => string, //
'grants' => array, //
'mark_messages_pending' => bool, //
'max_message_length' => int, //
'mutes' => bool, //
'name' => string, //
'partition_size' => int, //
'partition_ttl' => string, //
'permissions' => array, //
'polls' => bool, //
'push_level' => string, //
'push_notifications' => bool, //
'quotes' => bool, //
'reactions' => bool, //
'read_events' => bool, //
'reminders' => bool, //
'replies' => bool, //
'search' => bool, //
'shared_locations' => bool, //
'skip_last_msg_update_for_system_msgs' => bool, //
'typing_events' => bool, //
'updated_at' => float, //
'uploads' => bool, //
'url_enrichment' => bool, //
'user_message_reminders' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | string | Yes | |
| automod_behavior | string | Yes | |
| commands | array | Yes | |
| connect_events | bool | Yes | |
| count_messages | bool | Yes | |
| created_at | float | Yes | |
| custom_events | bool | Yes | |
| delivery_events | bool | Yes | |
| duration | string | Yes | |
| grants | array | Yes | |
| mark_messages_pending | bool | Yes | |
| max_message_length | int | Yes | |
| mutes | bool | Yes | |
| name | string | Yes | |
| permissions | array | Yes | |
| polls | bool | Yes | |
| push_notifications | bool | Yes | |
| quotes | bool | Yes | |
| reactions | bool | Yes | |
| read_events | bool | Yes | |
| reminders | bool | Yes | |
| replies | bool | Yes | |
| search | bool | Yes | |
| shared_locations | bool | Yes | |
| skip_last_msg_update_for_system_msgs | bool | Yes | |
| typing_events | bool | Yes | |
| updated_at | float | Yes | |
| uploads | bool | Yes | |
| url_enrichment | bool | Yes | |
| user_message_reminders | bool | 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 | int | No | |
| partition_ttl | string | No | |
| push_level | string | No |
UpdateCommandResponse
// UpdateCommandResponse array structure
[
'command' => Command, // Command object
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| command | Command | No | Command object |
UpdateMemberPartialResponse
// UpdateMemberPartialResponse array 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 array structure
[
'duration' => string, // Duration of the request in milliseconds
'message' => MessageResponse, // Updated message
'pending_message_metadata' => array, // 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 | array | No | Pending message metadata |
UpdateMessageResponse
Basic response information
// UpdateMessageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'message' => MessageResponse, //
'pending_message_metadata' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| message | MessageResponse | Yes | |
| pending_message_metadata | array | No |
UpdateReminderResponse
Basic response information
// UpdateReminderResponse array 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 array 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 array 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 array 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 array structure
[
'data' => array, //
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | array | No |
UserCustomEventRequest
// UserCustomEventRequest array structure
[
'custom' => array, //
'type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| custom | array | No |
UserRequest
User request object
// UserRequest array structure
[
'custom' => array, // Custom user data
'id' => string, // User ID
'image' => string, // User's profile image URL
'invisible' => bool, //
'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' => array, // Map of team-specific roles for the user
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | array | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | bool | 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 | array | No | Map of team-specific roles for the user |
UserResponse
User response object
// UserResponse array structure
[
'avg_response_time' => int, //
'ban_expires' => float, // Date when ban expires
'banned' => bool, // Whether a user is banned or not
'blocked_user_ids' => array, //
'bypass_moderation' => bool, //
'created_at' => float, // Date/time of creation
'custom' => array, // Custom data for this object
'deactivated_at' => float, // Date of deactivation
'deleted_at' => float, // Date/time of deletion
'devices' => array, // List of devices user is using
'id' => string, // Unique user identifier
'image' => string, //
'invisible' => bool, //
'language' => string, // Preferred language of a user
'last_active' => float, // Date of last activity
'name' => string, // Optional name of user
'online' => bool, // Whether a user online or not
'privacy_settings' => PrivacySettingsResponse, // User privacy settings
'push_notifications' => PushNotificationSettingsResponse, // User push notification settings
'revoke_tokens_issued_before' => float, // Revocation date for tokens
'role' => string, // Determines the set of user permissions
'shadow_banned' => bool, // Whether a user is shadow banned
'teams' => array, // List of teams user is a part of
'teams_role' => array, //
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | array | Yes | |
| created_at | float | Yes | Date/time of creation |
| custom | array | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | bool | Yes | |
| language | string | Yes | Preferred language of a user |
| online | bool | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | bool | Yes | Whether a user is shadow banned |
| teams | array | Yes | List of teams user is a part of |
| updated_at | float | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float | No | Date of deactivation |
| deleted_at | float | No | Date/time of deletion |
| devices | array | No | List of devices user is using |
| image | string | No | |
| last_active | float | 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 | float | No | Revocation date for tokens |
| teams_role | array | No |
VoteData
// VoteData array 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 array structure
[
'automoderation' => bool, //
'automoderation_scores' => ModerationResponse, //
'channel' => ChannelResponse, //
'channel_id' => string, //
'channel_last_message_at' => float, //
'channel_type' => string, //
'cid' => string, //
'connection_id' => string, //
'created_at' => float, //
'created_by' => UserResponse, //
'custom' => array, //
'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' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| custom | array | Yes | |
| type | string | Yes | |
| automoderation | bool | No | |
| automoderation_scores | ModerationResponse | No | |
| channel | ChannelResponse | No | |
| channel_id | string | No | |
| channel_last_message_at | float | 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 | int | No |
WrappedUnreadCountsResponse
Basic response information
// WrappedUnreadCountsResponse array structure
[
'channel_type' => array, //
'channels' => array, //
'duration' => string, // Duration of the request in milliseconds
'threads' => array, //
'total_unread_count' => int, //
'total_unread_count_by_team' => array, //
'total_unread_threads_count' => int, //
]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 | int | Yes | |
| total_unread_threads_count | int | Yes | |
| total_unread_count_by_team | array | No |