Appearance
Common
About 19746 wordsAbout 66 min
Php SDK - Chat API
Table of Contents
- getApp
- updateApp
- listBlockLists
- createBlockList
- getBlockList
- updateBlockList
- deleteBlockList
- checkPush
- checkSNS
- checkSQS
- listDevices
- createDevice
- deleteDevice
- exportUsers
- listExternalStorage
- createExternalStorage
- updateExternalStorage
- deleteExternalStorage
- checkExternalStorage
- createGuest
- createImportURL
- listImports
- createImport
- listImportV2Tasks
- createImportV2Task
- getImporterExternalStorage
- upsertImporterExternalStorage
- deleteImporterExternalStorage
- validateImporterExternalStorage
- getImportV2Task
- deleteImportV2Task
- getImport
- getOG
- listPermissions
- getPermission
- createPoll
- updatePoll
- queryPolls
- getPoll
- updatePollPartial
- deletePoll
- createPollOption
- updatePollOption
- getPollOption
- deletePollOption
- queryPollVotes
- updatePushNotificationPreferences
- listPushProviders
- upsertPushProvider
- deletePushProvider
- getPushTemplates
- upsertPushTemplate
- getRateLimits
- listRoles
- createRole
- deleteRole
- getTask
- uploadFile
- deleteFile
- uploadImage
- deleteImage
- listUserGroups
- createUserGroup
- searchUserGroups
- getUserGroup
- updateUserGroup
- deleteUserGroup
- addUserGroupMembers
- removeUserGroupMembers
- queryUsers
- updateUsers
- updateUsersPartial
- getBlockedUsers
- blockUsers
- deactivateUsers
- deleteUsers
- getUserLiveLocations
- updateLiveLocation
- reactivateUsers
- restoreUsers
- unblockUsers
- deactivateUser
- exportUser
- reactivateUser
- Types Reference
getApp
Retrieve the current application settings to understand or verify the configuration. Use this method when you need to view the existing app settings without making changes.
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 App Settings
$response = $client->getApp();
print_r($response);Response: GetApplicationResponse
updateApp
Modify the application settings to align with new requirements or preferences. Use this method when you need to update the app configuration.
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 App Settings
$response = $client->updateApp([
'activity_metrics_config' => {},
'allowed_flag_reasons' => [],
'apn_config' => ['Disabled' => false],
]);
print_r($response);Example: with async_moderation_config and async_url_enrich_enabled
<?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 App Settings
$response = $client->updateApp([
'async_moderation_config' => ['callback' => ['mode' => 'value']],
'async_url_enrich_enabled' => false,
]);
print_r($response);Example: with auto_translation_enabled and before_message_send_hook_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'));
// Update App Settings
$response = $client->updateApp([
'auto_translation_enabled' => false,
'before_message_send_hook_url' => 'value',
]);
print_r($response);Example: with cdn_expiration_seconds and channel_hide_members_only
<?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 App Settings
$response = $client->updateApp([
'cdn_expiration_seconds' => 10,
'channel_hide_members_only' => false,
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_metrics_config | array | No | - |
| allowed_flag_reasons | []string | No | - |
| apn_config | APNConfig | No | - |
| async_moderation_config | AsyncModerationConfiguration | No | - |
| async_url_enrich_enabled | bool | No | - |
| auto_translation_enabled | bool | No | - |
| before_message_send_hook_url | string | No | - |
| cdn_expiration_seconds | int | No | - |
| channel_hide_members_only | bool | No | - |
| custom_action_handler_url | string | No | - |
| datadog_info | DataDogInfo | No | - |
| disable_auth_checks | bool | No | - |
| disable_permissions_checks | bool | No | - |
| enforce_unique_usernames | string | No | - |
| event_hooks | []EventHook | No | - |
| feeds_moderation_enabled | bool | No | - |
| feeds_v2_region | string | No | - |
| file_upload_config | FileUploadConfig | No | - |
| firebase_config | FirebaseConfig | No | - |
| grants | array | No | - |
| guest_user_creation_disabled | bool | No | - |
| huawei_config | HuaweiConfig | No | - |
| image_moderation_block_labels | []string | No | - |
| image_moderation_enabled | bool | No | - |
| image_moderation_labels | []string | No | - |
| image_upload_config | FileUploadConfig | No | - |
| max_aggregated_activities_length | int | No | - |
| migrate_permissions_to_v2 | bool | No | - |
| moderation_analytics_enabled | bool | No | - |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | - |
| moderation_enabled | bool | No | - |
| moderation_s3_image_access_role_arn | string | No | - |
| moderation_webhook_url | string | No | - |
| multi_tenant_enabled | bool | No | - |
| permission_version | string | No | - |
| push_config | PushConfig | No | - |
| reminders_interval | int | No | - |
| reminders_max_members | int | No | - |
| revoke_tokens_issued_before | float | No | - |
| sns_key | string | No | - |
| sns_secret | string | No | - |
| sns_topic_arn | string | No | - |
| sqs_key | string | No | - |
| sqs_secret | string | No | - |
| sqs_url | string | No | - |
| user_response_time_enabled | bool | No | - |
| user_search_disallowed_roles | []string | No | - |
| webhook_events | []string | No | - |
| webhook_url | string | No | - |
| xiaomi_config | XiaomiConfig | No | - |
listBlockLists
Get a list of all existing block lists to review or manage them. Use this method when you need an overview of current block lists.
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 block lists
$response = $client->listBlockLists([
'team' => 'value',
]);
print_r($response);Response: ListBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| team | string | No | - |
createBlockList
Create a new block list to restrict certain content or users as per your criteria. Use this method when setting up a new block list for moderation or content control.
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 block list
$response = $client->createBlockList([
'name' => 'My Feed',
'words' => [],
'type' => 'like',
'is_plural_check_enabled' => false,
]);
print_r($response);Example: with team and is_leet_check_enabled
<?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 block list
$response = $client->createBlockList([
'name' => 'My Feed',
'words' => [],
'team' => 'value',
'is_leet_check_enabled' => false,
]);
print_r($response);Response: CreateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Block list name |
| words | []string | Yes | List of words to block |
| is_leet_check_enabled | bool | No | - |
| is_plural_check_enabled | bool | No | - |
| team | string | No | - |
| type | string | No | Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word |
getBlockList
Access a specific block list to view its details and contents. Use this method when you need to inspect the entries of a particular block 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'));
// Get block list
$response = $client->getBlockList([
'name' => 'My Feed',
'team' => 'value',
]);
print_r($response);Response: GetBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| team | string | No | - |
updateBlockList
Modify an existing block list to add or remove entries as needed. Use this method when updating the criteria or contents of a block 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'));
// Update block list
$response = $client->updateBlockList([
'name' => 'My Feed',
'is_leet_check_enabled' => false,
'is_plural_check_enabled' => false,
]);
print_r($response);Example: with team and words
<?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 block list
$response = $client->updateBlockList([
'name' => 'My Feed',
'team' => 'value',
'words' => [],
]);
print_r($response);Response: UpdateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| is_leet_check_enabled | bool | No | - |
| is_plural_check_enabled | bool | No | - |
| team | string | No | - |
| words | []string | No | List of words to block |
deleteBlockList
Remove a specific block list that is no longer needed. Use this method when you want to delete a block list to stop enforcing its restrictions.
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 block list
$response = $client->deleteBlockList([
'name' => 'My Feed',
'team' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| team | string | No | - |
checkPush
Verify the status and functionality of your push notification setup. Use this method to ensure your push notifications are working correctly.
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 push
$response = $client->checkPush([
'user_id' => 'john',
'event_type' => 'value',
'firebase_data_template' => 'value',
]);
print_r($response);Example: with firebase_template 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'));
// Check push
$response = $client->checkPush([
'firebase_template' => 'value',
'message_id' => 'value',
]);
print_r($response);Example: with push_provider_name and push_provider_type
<?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 push
$response = $client->checkPush([
'push_provider_name' => 'value',
'push_provider_type' => 'value',
]);
print_r($response);Example: with skip_devices 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'));
// Check push
$response = $client->checkPush([
'skip_devices' => false,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: CheckPushResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apn_template | string | No | Push message template for APN |
| event_type | string | No | Type of event for push templates (default: message.new). One of: message.new, message.updated, re... |
| firebase_data_template | string | No | Push message data template for Firebase |
| firebase_template | string | No | Push message template for Firebase |
| message_id | string | No | Message ID to send push notification for |
| push_provider_name | string | No | Name of push provider |
| push_provider_type | string | No | Push provider type. One of: firebase, apn, huawei, xiaomi |
| skip_devices | bool | No | Don't require existing devices to render templates |
| user | UserRequest | No | - |
| user_id | string | No | - |
checkSNS
Test the integration and functionality of your Amazon SNS (Simple Notification Service) setup. Use this method to confirm SNS is configured and operating as expected.
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 SNS
$response = $client->checkSNS([
'sns_key' => 'value',
'sns_secret' => 'value',
'sns_topic_arn' => 'value',
]);
print_r($response);Response: CheckSNSResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sns_key | string | No | AWS SNS access key |
| sns_secret | string | No | AWS SNS key secret |
| sns_topic_arn | string | No | AWS SNS topic ARN |
checkSQS
Check the status and operation of your Amazon SQS (Simple Queue Service) configuration. Use this method to ensure that your SQS setup is functioning properly.
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 SQS
$response = $client->checkSQS([
'sqs_key' => 'value',
'sqs_secret' => 'value',
'sqs_url' => 'value',
]);
print_r($response);Response: CheckSQSResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sqs_key | string | No | AWS SQS access key |
| sqs_secret | string | No | AWS SQS key secret |
| sqs_url | string | No | AWS SQS endpoint URL |
listDevices
Retrieve a list of all registered devices associated with your account, useful for managing and monitoring device activity.
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 devices
$response = $client->listDevices([
'user_id' => 'john',
]);
print_r($response);Response: ListDevicesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
createDevice
Add a new device to your account, enabling it to participate in your chat ecosystem and access related 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'));
// Create device
$response = $client->createDevice([
'id' => 'activity-123',
'push_provider' => 'value',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with push_provider_name and voip_token
<?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 device
$response = $client->createDevice([
'id' => 'activity-123',
'push_provider' => 'value',
'push_provider_name' => 'value',
'voip_token' => false,
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Device ID |
| push_provider | string | Yes | Push provider |
| push_provider_name | string | No | Push provider name |
| user | UserRequest | No | - |
| user_id | string | No | Server-side only. User ID which server acts upon |
| voip_token | bool | No | When true the token is for Apple VoIP push notifications |
deleteDevice
Remove a specified device from your account, which is helpful for maintaining security and managing active devices.
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 device
$response = $client->deleteDevice([
'id' => 'activity-123',
'user_id' => 'john',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| user_id | string | No | - |
exportUsers
Generate and download a list of all users in your chat system, ideal for backups or data 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'));
// Export users
$response = $client->exportUsers([
'user_ids' => ['user-1', 'user-2'],
]);
print_r($response);Response: ExportUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
listExternalStorage
View all configured external storage options, providing an overview of available storage connections for your 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'));
// List external storage
$response = $client->listExternalStorage();
print_r($response);Response: ListExternalStorageResponse
createExternalStorage
Set up a new external storage connection to extend your data storage capabilities, allowing for seamless data integration.
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 external storage
$response = $client->createExternalStorage([
'bucket' => 'value',
'name' => 'My Feed',
'storage_type' => 'value',
'aws_s3' => ['s3_region' => 'value', 's3_api_key' => 'value'],
'azure_blob' => ['abs_account_name' => 'value', 'abs_client_id' => 'value', 'abs_client_secret' => 'value', 'abs_tenant_id' => 'value'],
]);
print_r($response);Example: with gcs_credentials and path
<?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 external storage
$response = $client->createExternalStorage([
'bucket' => 'value',
'name' => 'My Feed',
'storage_type' => 'value',
'gcs_credentials' => 'value',
'path' => 'value',
]);
print_r($response);Response: CreateExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | The name of the bucket on the service provider |
| name | string | Yes | The name of the provider, this must be unique |
| storage_type | string | Yes | The type of storage to use |
| aws_s3 | S3Request | No | Only required if you want to create an Amazon S3 storage |
| azure_blob | AzureRequest | No | Only required if you want to create an Azure Blob Storage |
| gcs_credentials | string | No | - |
| path | string | No | The path prefix to use for storing files |
updateExternalStorage
Modify the settings of an existing external storage connection to ensure it aligns with your current data management 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 External Storage
$response = $client->updateExternalStorage([
'name' => 'My Feed',
'bucket' => 'value',
'storage_type' => 'value',
'aws_s3' => ['s3_region' => 'value', 's3_api_key' => 'value'],
'azure_blob' => ['abs_account_name' => 'value', 'abs_client_id' => 'value', 'abs_client_secret' => 'value', 'abs_tenant_id' => 'value'],
]);
print_r($response);Example: with gcs_credentials and path
<?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 External Storage
$response = $client->updateExternalStorage([
'name' => 'My Feed',
'bucket' => 'value',
'storage_type' => 'value',
'gcs_credentials' => 'value',
'path' => 'value',
]);
print_r($response);Response: UpdateExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| bucket | string | Yes | The name of the bucket on the service provider |
| storage_type | string | Yes | The type of storage to use |
| aws_s3 | S3Request | No | Only required if you want to create an Amazon S3 storage |
| azure_blob | AzureRequest | No | Only required if you want to create an Azure Blob Storage |
| gcs_credentials | string | No | - |
| path | string | No | The path prefix to use for storing files |
deleteExternalStorage
Remove an external storage configuration, useful for cleaning up unused or obsolete storage connections.
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 external storage
$response = $client->deleteExternalStorage([
'name' => 'My Feed',
]);
print_r($response);Response: DeleteExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
checkExternalStorage
Verify the status and connectivity of your external storage setup, ensuring data integrity and accessibility.
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 External Storage
$response = $client->checkExternalStorage([
'name' => 'My Feed',
]);
print_r($response);Response: CheckExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
createGuest
Register a temporary guest user, allowing limited access to your chat system for short-term collaboration or testing.
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 Guest
$response = $client->createGuest([
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: CreateGuestResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user | UserRequest | Yes | User object which server acts upon |
createImportURL
Generates a URL for importing data into the chat application, useful for seamlessly integrating external data sources.
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 import URL
$response = $client->createImportURL([
'filename' => 'value',
]);
print_r($response);Response: CreateImportURLResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | string | No | - |
listImports
Retrieves a list of all data imports, allowing users to track and manage their import 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'));
// Get import
$response = $client->listImports();
print_r($response);Response: ListImportsResponse
createImport
Initiates a new data import process, ideal for users looking to upload large datasets into the chat system.
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 import
$response = $client->createImport([
'mode' => 'value',
'path' => 'value',
'merge_custom' => false,
]);
print_r($response);Response: CreateImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | Yes | - |
| path | string | Yes | - |
| merge_custom | bool | No | - |
listImportV2Tasks
Displays all tasks related to version 2 imports, providing users with a comprehensive overview of their import 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'));
// List import v2 tasks
$response = $client->listImportV2Tasks([
'state' => 10,
]);
print_r($response);Response: ListImportV2TasksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| state | int | No | - |
createImportV2Task
Starts a new import task under version 2, enabling users to handle specific import scenarios with updated 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'));
// Create import v2 task
$response = $client->createImportV2Task([
'product' => 'value',
'settings' => ['merge_custom' => false],
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: CreateImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| product | string | Yes | - |
| settings | ImportV2TaskSettings | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
getImporterExternalStorage
Retrieve details of an existing external storage configuration. Use this method to view the current settings and status of your linked external storage.
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 external storage
$response = $client->getImporterExternalStorage();
print_r($response);Response: GetExternalStorageResponse
upsertImporterExternalStorage
Add or update an external storage configuration. Use this method to ensure your external storage is correctly set up or to modify existing 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'));
// Upsert external storage
$response = $client->upsertImporterExternalStorage([
'type' => 'like',
'aws_s3' => ['bucket' => 'value', 'region' => 'value', 'role_arn' => 'value', 'path_prefix' => 'value'],
]);
print_r($response);Response: UpsertExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| aws_s3 | UpsertExternalStorageAWSS3Request | No | - |
deleteImporterExternalStorage
Remove an existing external storage configuration. Use this when you no longer need to link external storage or to clear outdated 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 external storage
$response = $client->deleteImporterExternalStorage();
print_r($response);Response: DeleteExternalStorageResponse
validateImporterExternalStorage
Check the validity of an external storage configuration. Use this to ensure that your external storage setup is correctly configured and operational.
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'));
// Validate external storage
$response = $client->validateImporterExternalStorage();
print_r($response);Response: ValidateExternalStorageResponse
getImportV2Task
Fetches details of a specific import task in version 2, useful for monitoring progress and diagnosing issues.
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 import v2 task
$response = $client->getImportV2Task([
'id' => 'activity-123',
]);
print_r($response);Response: GetImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
deleteImportV2Task
Removes a specific import task from version 2, helping users manage and clean up their import queues.
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 import v2 task
$response = $client->deleteImportV2Task([
'id' => 'activity-123',
]);
print_r($response);Response: DeleteImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
getImport
Provides information on a specific import, allowing users to review and verify the details of their data uploads.
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 import
$response = $client->getImport([
'id' => 'activity-123',
]);
print_r($response);Response: GetImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
getOG
Retrieves Open Graph data, which is helpful for obtaining metadata about shared content such as links or media.
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 OG
$response = $client->getOG([
'url' => 'value',
]);
print_r($response);Response: GetOGResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | - |
listPermissions
Lists all permissions available, aiding users in understanding and managing access control within 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'));
// List permissions
$response = $client->listPermissions();
print_r($response);Response: ListPermissionsResponse
getPermission
Retrieve the permissions associated with a user or role to determine access levels within the chat system. Use this method to check if a user has the necessary rights to perform specific 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'));
// Get permission
$response = $client->getPermission([
'id' => 'activity-123',
]);
print_r($response);Response: GetCustomPermissionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
createPoll
Create a new poll in the chat application to gather opinions or feedback from users. Use this method to initiate a poll with customizable options and parameters.
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 poll
$response = $client->createPoll([
'name' => 'My Feed',
'user_id' => 'john',
'id' => 'activity-123',
]);
print_r($response);Example: with allow_user_suggested_options and description
<?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 poll
$response = $client->createPoll([
'name' => 'My Feed',
'allow_user_suggested_options' => false,
'description' => 'A description',
]);
print_r($response);Example: with enforce_unique_vote and Custom
<?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 poll
$response = $client->createPoll([
'name' => 'My Feed',
'enforce_unique_vote' => false,
'Custom' => {},
]);
print_r($response);Example: with is_closed and max_votes_allowed
<?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 poll
$response = $client->createPoll([
'name' => 'My Feed',
'is_closed' => false,
'max_votes_allowed' => 10,
]);
print_r($response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the poll |
| Custom | array | No | - |
| allow_answers | bool | No | Indicates whether users can suggest user defined answers |
| allow_user_suggested_options | bool | No | - |
| description | string | No | A description of the poll |
| enforce_unique_vote | bool | No | Indicates whether users can cast multiple votes |
| id | string | No | - |
| is_closed | bool | No | Indicates whether the poll is open for voting |
| max_votes_allowed | int | No | Indicates the maximum amount of votes a user can cast |
| options | []PollOptionInput | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
| voting_visibility | string | No | - |
updatePoll
Modify an existing poll to change its details or options based on new requirements or feedback. Use this method when you need to update the poll's content or settings after creation.
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 poll
$response = $client->updatePoll([
'id' => 'activity-123',
'name' => 'My Feed',
'user_id' => 'john',
'allow_answers' => false,
]);
print_r($response);Example: with allow_user_suggested_options and description
<?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 poll
$response = $client->updatePoll([
'id' => 'activity-123',
'name' => 'My Feed',
'allow_user_suggested_options' => false,
'description' => 'A description',
]);
print_r($response);Example: with enforce_unique_vote and is_closed
<?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 poll
$response = $client->updatePoll([
'id' => 'activity-123',
'name' => 'My Feed',
'enforce_unique_vote' => false,
'is_closed' => false,
]);
print_r($response);Example: with max_votes_allowed and options
<?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 poll
$response = $client->updatePoll([
'id' => 'activity-123',
'name' => 'My Feed',
'max_votes_allowed' => 10,
'options' => [],
]);
print_r($response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Poll ID |
| name | string | Yes | Poll name |
| Custom | array | No | - |
| allow_answers | bool | No | Allow answers |
| allow_user_suggested_options | bool | No | Allow user suggested options |
| description | string | No | Poll description |
| enforce_unique_vote | bool | No | Enforce unique vote |
| is_closed | bool | No | Is closed |
| max_votes_allowed | int | No | Max votes allowed |
| options | []PollOptionRequest | No | Poll options |
| user | UserRequest | No | - |
| user_id | string | No | - |
| voting_visibility | string | No | Voting visibility |
queryPolls
Retrieve a list of polls based on specific criteria or filters. Use this method to find and review polls that match certain conditions or properties.
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 polls
$response = $client->queryPolls([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort 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 polls
$response = $client->queryPolls([
'sort' => [],
'prev' => null,
]);
print_r($response);Example: with 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 polls
$response = $client->queryPolls([
'next' => null,
]);
print_r($response);Response: QueryPollsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
| 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 |
getPoll
Access detailed information about a specific poll, including its options and current status. Use this method when you need to view the complete details of a particular poll.
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 poll
$response = $client->getPoll([
'poll_id' => 'poll-123',
'user_id' => 'john',
]);
print_r($response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| user_id | string | No | - |
updatePollPartial
Make selective updates to certain fields of an existing poll without altering the entire poll. Use this method when you only need to change specific attributes rather than the whole poll structure.
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'));
// Partial update poll
$response = $client->updatePollPartial([
'poll_id' => 'poll-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'));
// Partial update poll
$response = $client->updatePollPartial([
'poll_id' => 'poll-123',
'user' => ['id' => 'activity-123', 'custom' => {}],
'set' => {},
]);
print_r($response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_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 | - |
deletePoll
Remove a poll from the chat application, permanently eliminating it from user access and records. Use this method to clean up outdated or irrelevant polls.
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 poll
$response = $client->deletePoll([
'poll_id' => 'poll-123',
'user_id' => 'john',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| user_id | string | No | - |
createPollOption
Add a new option to an existing poll to expand the choices available to users. Use this method when you need to introduce additional voting options in a poll.
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 poll option
$response = $client->createPollOption([
'poll_id' => 'poll-123',
'text' => 'Hello, world!',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with Custom
<?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 poll option
$response = $client->createPollOption([
'poll_id' => 'poll-123',
'text' => 'Hello, world!',
'Custom' => {},
]);
print_r($response);Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| text | string | Yes | Option text |
| Custom | array | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
updatePollOption
Modify the details of an existing poll option to correct, enhance, or adjust its content. Use this method to refine or update the available choices in a poll.
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 poll option
$response = $client->updatePollOption([
'poll_id' => 'poll-123',
'id' => 'activity-123',
'text' => 'Hello, world!',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with Custom
<?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 poll option
$response = $client->updatePollOption([
'poll_id' => 'poll-123',
'id' => 'activity-123',
'text' => 'Hello, world!',
'Custom' => {},
]);
print_r($response);Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| id | string | Yes | Option ID |
| text | string | Yes | Option text |
| Custom | array | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
getPollOption
Retrieve detailed information about a specific poll option to understand its current setup and status. Use this method to inspect the details of a particular choice within a poll.
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 poll option
$response = $client->getPollOption([
'poll_id' => 'poll-123',
'option_id' => 'value',
'user_id' => 'john',
]);
print_r($response);Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| option_id | string | Yes | - |
| user_id | string | No | - |
deletePollOption
Remove a specific option from an existing poll. Use this method when you need to update a poll by eliminating options that are no longer valid or necessary.
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 poll option
$response = $client->deletePollOption([
'poll_id' => 'poll-123',
'option_id' => 'value',
'user_id' => 'john',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| option_id | string | Yes | - |
| user_id | string | No | - |
queryPollVotes
Retrieve the current vote counts for a specific poll. This method is useful for monitoring poll results and understanding user preferences in real-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'));
// Query votes
$response = $client->queryPollVotes([
'poll_id' => 'poll-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'));
// Query votes
$response = $client->queryPollVotes([
'poll_id' => 'poll-123',
'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 votes
$response = $client->queryPollVotes([
'poll_id' => 'poll-123',
'prev' => null,
'next' => null,
]);
print_r($response);Response: PollVotesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| user_id | string | No | - |
| 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 |
updatePushNotificationPreferences
Modify the push notification settings for a user or application. Use this method to customize how and when notifications are delivered to enhance user 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'));
// Push notification preferences
$response = $client->updatePushNotificationPreferences([
'preferences' => [],
]);
print_r($response);Response: UpsertPushPreferencesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| preferences | []PushPreferenceInput | Yes | A list of push preferences for channels, calls, or the user. |
listPushProviders
Get a list of available push notification providers integrated with your application. This method helps you understand which services are available for sending notifications to users.
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 push providers
$response = $client->listPushProviders();
print_r($response);Response: ListPushProvidersResponse
upsertPushProvider
Add or update a push notification provider in your system. Use this method to manage your notification delivery services, ensuring they are correctly configured 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'));
// Upsert a push provider
$response = $client->upsertPushProvider([
'push_provider' => ['name' => 'My Feed', 'apn_auth_key' => 'value'],
]);
print_r($response);Response: UpsertPushProviderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| push_provider | PushProviderRequest | No | - |
deletePushProvider
Remove a push notification provider from your application’s configuration. Use this method to clean up unused or deprecated providers and streamline your notification setup.
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 a push provider
$response = $client->deletePushProvider([
'type' => 'like',
'name' => 'My Feed',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| name | string | Yes | - |
getPushTemplates
Retrieve a list of available push notification templates. This method is useful for managing and selecting pre-defined message formats to ensure consistent communication with users.
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 push notification templates
$response = $client->getPushTemplates([
'push_provider_type' => 'value',
'push_provider_name' => 'value',
]);
print_r($response);Response: GetPushTemplatesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| push_provider_type | string | Yes | - |
| push_provider_name | string | No | - |
upsertPushTemplate
Create or update a push notification template to streamline the creation of consistent and professional notifications. Use this method to manage your message templates efficiently.
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'));
// Upsert a push notification template
$response = $client->upsertPushTemplate([
'event_type' => 'value',
'push_provider_type' => 'value',
'enable_push' => false,
'push_provider_name' => 'value',
]);
print_r($response);Example: with template
<?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'));
// Upsert a push notification template
$response = $client->upsertPushTemplate([
'event_type' => 'value',
'push_provider_type' => 'value',
'template' => 'value',
]);
print_r($response);Response: UpsertPushTemplateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_type | string | Yes | Event type. One of: message.new, message.updated, reaction.new, notification.reminder_due, feeds.... |
| push_provider_type | string | Yes | Push provider type. One of: firebase, apn, huawei, xiaomi |
| enable_push | bool | No | Whether to send push notification for this event |
| push_provider_name | string | No | Push provider name |
| template | string | No | Push template |
getRateLimits
Fetch the current rate limits applicable to your account or application. Use this method to understand your usage boundaries and prevent exceeding limits that could disrupt service.
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 rate limits
$response = $client->getRateLimits([
'server_side' => false,
'android' => false,
'ios' => false,
]);
print_r($response);Example: with web and endpoints
<?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 rate limits
$response = $client->getRateLimits([
'web' => false,
'endpoints' => 'value',
]);
print_r($response);Response: GetRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| server_side | bool | No | - |
| android | bool | No | - |
| ios | bool | No | - |
| web | bool | No | - |
| endpoints | string | No | - |
listRoles
Obtain a list of roles defined within your application, along with their associated permissions. This method is helpful for managing user access and ensuring appropriate permissions are assigned.
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 roles
$response = $client->listRoles();
print_r($response);Response: ListRolesResponse
createRole
Create a new role within the chat application to define user permissions and access levels; use this when setting up or modifying user roles.
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 role
$response = $client->createRole([
'name' => 'My Feed',
]);
print_r($response);Response: CreateRoleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Role name |
deleteRole
Remove an existing role from the chat application to revoke associated permissions and access; use this when a role is no longer needed.
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 role
$response = $client->deleteRole([
'name' => 'My Feed',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
getTask
Retrieve the current status of a specific task to monitor progress or completion; use this to track task execution.
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 status of a task
$response = $client->getTask([
'id' => 'activity-123',
]);
print_r($response);Response: GetTaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
uploadFile
Upload a file to the chat application to share it with other users or for storage; use this to facilitate file sharing and management.
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->uploadFile([
'file' => 'value',
'user' => ['id' => 'activity-123'],
]);
print_r($response);Response: FileUploadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | string | No | file field |
| user | OnlyUserID | No | user for the request server side only |
deleteFile
Remove a previously uploaded file from the chat application to free up space or maintain data privacy; use this to manage file storage.
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->deleteFile([
'url' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | No | - |
uploadImage
Upload an image to the chat application to share it with other users or for visual content storage; use this to enhance conversations with images.
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->uploadImage([
'file' => 'value',
'upload_sizes' => [],
'user' => ['id' => 'activity-123'],
]);
print_r($response);Response: ImageUploadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | string | No | - |
| upload_sizes | []ImageSize | No | field with JSON-encoded array of image size configurations |
| user | OnlyUserID | No | - |
deleteImage
Remove a previously uploaded image from the chat application to manage storage or privacy; use this to control visual content availability.
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->deleteImage([
'url' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | No | - |
listUserGroups
Retrieve a list of all user groups. Use this to view and manage the groups available within your 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'));
// List user groups
$response = $client->listUserGroups([
'limit' => 25,
'id_gt' => 'value',
'created_at_gt' => 'value',
]);
print_r($response);Example: with team_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'));
// List user groups
$response = $client->listUserGroups([
'team_id' => 'value',
]);
print_r($response);Response: ListUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | int | No | - |
| id_gt | string | No | - |
| created_at_gt | string | No | - |
| team_id | string | No | - |
createUserGroup
Create a new user group. Use this method to organize users into groups for better management and access control.
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 user group
$response = $client->createUserGroup([
'name' => 'My Feed',
'id' => 'activity-123',
'description' => 'A description',
]);
print_r($response);Example: with member_ids and team_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'));
// Create user group
$response = $client->createUserGroup([
'name' => 'My Feed',
'member_ids' => [],
'team_id' => 'value',
]);
print_r($response);Response: CreateUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The user friendly name of the user group |
| description | string | No | An optional description for the group |
| id | string | No | Optional user group ID. If not provided, a UUID v7 will be generated |
| member_ids | []string | No | Optional initial list of user IDs to add as members |
| team_id | string | No | Optional team ID to scope the group to a team |
searchUserGroups
Find user groups based on specific criteria. Use this to quickly locate groups that meet your search parameters.
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 user groups
$response = $client->searchUserGroups([
'query' => 'value',
'limit' => 25,
'name_gt' => 'value',
]);
print_r($response);Example: with id_gt and team_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'));
// Search user groups
$response = $client->searchUserGroups([
'query' => 'value',
'id_gt' => 'value',
'team_id' => 'value',
]);
print_r($response);Response: SearchUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | - |
| limit | int | No | - |
| name_gt | string | No | - |
| id_gt | string | No | - |
| team_id | string | No | - |
getUserGroup
Retrieve details of a specific user group. Use this to view information about a particular group and its 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'));
// Get user group
$response = $client->getUserGroup([
'id' => 'activity-123',
'team_id' => 'value',
]);
print_r($response);Response: GetUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| team_id | string | No | - |
updateUserGroup
Modify the details of an existing user group. Use this method to change group settings or update group 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'));
// Update user group
$response = $client->updateUserGroup([
'id' => 'activity-123',
'name' => 'My Feed',
'description' => 'A description',
]);
print_r($response);Example: with team_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'));
// Update user group
$response = $client->updateUserGroup([
'id' => 'activity-123',
'team_id' => 'value',
]);
print_r($response);Response: UpdateUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| description | string | No | The new description for the group |
| name | string | No | The new name of the user group |
| team_id | string | No | - |
deleteUserGroup
Remove a user group from the system. Use this to delete groups that are no longer needed, ensuring the organization of your user base.
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 user group
$response = $client->deleteUserGroup([
'id' => 'activity-123',
'team_id' => 'value',
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| team_id | string | No | - |
addUserGroupMembers
Use this method to add members to a user group, allowing them to access the group's resources and participate in group activities. Ideal for managing team memberships and ensuring the right people are included in specific group communications.
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'));
// Add user group members
$response = $client->addUserGroupMembers([
'id' => 'activity-123',
'member_ids' => [],
'as_admin' => false,
'team_id' => 'value',
]);
print_r($response);Response: AddUserGroupMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| member_ids | []string | Yes | List of user IDs to add as members |
| as_admin | bool | No | Whether to add the members as group admins. Defaults to false |
| team_id | string | No | - |
removeUserGroupMembers
This method removes members from a user group, revoking their access to the group's resources and activities. It is useful for managing group memberships and maintaining security by ensuring only authorized users remain in the group.
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'));
// Remove user group members
$response = $client->removeUserGroupMembers([
'id' => 'activity-123',
'member_ids' => [],
'team_id' => 'value',
]);
print_r($response);Response: RemoveUserGroupMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| member_ids | []string | Yes | List of user IDs to remove |
| team_id | string | No | - |
queryUsers
Search for users within the chat application based on specific criteria to find and interact with them; use this to efficiently locate users.
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 users
$response = $client->queryUsers([
'payload' => 'value',
]);
print_r($response);Response: QueryUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
updateUsers
Add new users or modify existing user details within the chat application to keep user information current; use this for comprehensive user management.
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'));
// Upsert users
$response = $client->updateUsers([
'users' => {},
]);
print_r($response);Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| users | array | Yes | Object containing users |
updateUsersPartial
Make specific updates to existing user details without altering the entire user profile; use this for targeted changes to user 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'));
// Partially update user
$response = $client->updateUsersPartial([
'users' => [],
]);
print_r($response);Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| users | []UpdateUserPartialRequest | Yes | - |
getBlockedUsers
Retrieve a list of users currently blocked from accessing chat services, useful for managing and reviewing user restrictions.
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 list of blocked Users
$response = $client->getBlockedUsers([
'user_id' => 'john',
]);
print_r($response);Response: GetBlockedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
blockUsers
Block specified users from accessing chat features, ideal for temporarily restricting users due to policy violations or other administrative reasons.
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'));
// Block user
$response = $client->blockUsers([
'blocked_user_id' => 'value',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: BlockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| blocked_user_id | string | Yes | User id to block |
| user | UserRequest | No | - |
| user_id | string | No | - |
deactivateUsers
Deactivate multiple user accounts to suspend their access and activity, often used for managing inactive or problematic accounts.
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'));
// Deactivate users
$response = $client->deactivateUsers([
'user_ids' => ['user-1', 'user-2'],
'created_by_id' => 'value',
'mark_channels_deleted' => false,
]);
print_r($response);Example: with mark_messages_deleted
<?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'));
// Deactivate users
$response = $client->deactivateUsers([
'user_ids' => ['user-1', 'user-2'],
'mark_messages_deleted' => false,
]);
print_r($response);Response: DeactivateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | User IDs to deactivate |
| created_by_id | string | No | ID of the user who deactivated the users |
| mark_channels_deleted | bool | No | - |
| mark_messages_deleted | bool | No | Makes messages appear to be deleted |
deleteUsers
Permanently remove user accounts and all associated data, suitable for complying with data privacy requests or clearing inactive accounts.
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 Users
$response = $client->deleteUsers([
'user_ids' => ['user-1', 'user-2'],
'calls' => 'value',
'conversations' => 'value',
]);
print_r($response);Example: with files 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'));
// Delete Users
$response = $client->deleteUsers([
'user_ids' => ['user-1', 'user-2'],
'files' => false,
'messages' => 'value',
]);
print_r($response);Example: with new_call_owner_id and new_channel_owner_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'));
// Delete Users
$response = $client->deleteUsers([
'user_ids' => ['user-1', 'user-2'],
'new_call_owner_id' => 'value',
'new_channel_owner_id' => 'value',
]);
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'));
// Delete Users
$response = $client->deleteUsers([
'user_ids' => ['user-1', 'user-2'],
'user' => { id: "john" },
]);
print_r($response);Response: DeleteUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | IDs of users to delete |
| calls | string | No | Calls delete mode. Affected calls are those that include exactly two members, one of whom is the ... |
| conversations | string | No | Conversation channels delete mode. Conversation channel is any channel which only has two members... |
| files | bool | No | Delete user files. * false or empty string - doesn't delete any files * true - deletes all files ... |
| messages | string | No | Message delete mode. * null or empty string - doesn't delete user messages * soft - marks all use... |
| new_call_owner_id | string | No | - |
| new_channel_owner_id | string | No | - |
| user | string | No | User delete mode. * soft - marks user as deleted and retains all user data * pruning - marks user... |
getUserLiveLocations
Access the real-time location of users, useful for features that depend on location-based services or tracking.
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 user live locations
$response = $client->getUserLiveLocations([
'user_id' => 'john',
]);
print_r($response);Response: SharedLocationsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
updateLiveLocation
Refresh the live location data for a user, ensuring that location-based services have the most current 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'));
// Update live location
$response = $client->updateLiveLocation([
'message_id' => 'value',
'user_id' => 'john',
'end_at' => 10,
]);
print_r($response);Example: with latitude and longitude
<?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 live location
$response = $client->updateLiveLocation([
'message_id' => 'value',
'latitude' => 10,
'longitude' => 10,
]);
print_r($response);Response: SharedLocationResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | string | Yes | Live location ID |
| user_id | string | No | - |
| end_at | float | No | Time when the live location expires |
| latitude | float | No | Latitude coordinate |
| longitude | float | No | Longitude coordinate |
reactivateUsers
Restore access to previously deactivated user accounts, allowing them to resume using chat services.
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'));
// Reactivate users
$response = $client->reactivateUsers([
'user_ids' => ['user-1', 'user-2'],
'created_by_id' => 'value',
'restore_channels' => false,
]);
print_r($response);Example: with restore_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'));
// Reactivate users
$response = $client->reactivateUsers([
'user_ids' => ['user-1', 'user-2'],
'restore_messages' => false,
]);
print_r($response);Response: ReactivateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | User IDs to reactivate |
| created_by_id | string | No | ID of the user who's reactivating the users |
| restore_channels | bool | No | - |
| restore_messages | bool | No | Restore previously deleted messages |
restoreUsers
Reinstate users who were previously deleted, recovering their account and data if within a grace period, useful for 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'));
// Restore users
$response = $client->restoreUsers([
'user_ids' => ['user-1', 'user-2'],
]);
print_r($response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
unblockUsers
Remove restrictions on users who were previously blocked, allowing them to access chat services again.
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'));
// Unblock user
$response = $client->unblockUsers([
'blocked_user_id' => 'value',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Response: UnblockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| blocked_user_id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
deactivateUser
Suspend a specific user's account, preventing access and activity, typically used for addressing individual account issues.
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'));
// Deactivate user
$response = $client->deactivateUser([
'user_id' => 'john',
'created_by_id' => 'value',
'mark_messages_deleted' => false,
]);
print_r($response);Response: DeactivateUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
| created_by_id | string | No | ID of the user who deactivated the user |
| mark_messages_deleted | bool | No | Makes messages appear to be deleted |
exportUser
Exports the user's data for backup or analysis purposes, ensuring you have a local copy of their information when needed.
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 user
$response = $client->exportUser([
'user_id' => 'john',
]);
print_r($response);Response: ExportUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
reactivateUser
Reactivates a previously deactivated user, allowing them to regain access to their account and continue using the chat service.
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'));
// Reactivate user
$response = $client->reactivateUser([
'user_id' => 'john',
'name' => 'My Feed',
'created_by_id' => 'value',
]);
print_r($response);Example: with restore_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'));
// Reactivate user
$response = $client->reactivateUser([
'user_id' => 'john',
'restore_messages' => false,
]);
print_r($response);Response: ReactivateUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
| created_by_id | string | No | ID of the user who's reactivating the user |
| name | string | No | Set this field to put new name for the user |
| restore_messages | bool | No | Restore previously deleted messages |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AIImageConfig
// AIImageConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'ocr_rules' => array, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| ocr_rules | array | No | |
| rules | array | No |
AITextConfig
// AITextConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'profile' => string, //
'rules' => array, //
'severity_rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| profile | string | No | |
| rules | array | No | |
| severity_rules | array | No |
AIVideoConfig
// AIVideoConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
APNConfig
// APNConfig array structure
[
'Disabled' => bool, //
'auth_key' => string, //
'auth_type' => string, //
'bundle_id' => string, //
'development' => bool, //
'host' => string, //
'key_id' => string, //
'notification_template' => string, //
'p12_cert' => string, //
'team_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| auth_key | string | No | |
| auth_type | string | No | |
| bundle_id | string | No | |
| development | bool | No | |
| host | string | No | |
| key_id | string | No | |
| notification_template | string | No | |
| p12_cert | string | No | |
| team_id | string | No |
Action
// Action array structure
[
'name' => string, //
'style' => string, //
'text' => string, //
'type' => string, //
'value' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| style | string | No | |
| value | string | No |
AddUserGroupMembersResponse
Response for adding members to a user group
// AddUserGroupMembersResponse array structure
[
'duration' => string, //
'user_group' => UserGroupResponse, // The updated user group
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
AppResponseFields
// AppResponseFields array structure
[
'activity_metrics_config' => array, //
'allow_multi_user_devices' => bool, //
'allowed_flag_reasons' => array, //
'async_url_enrich_enabled' => bool, //
'auto_translation_enabled' => bool, //
'before_message_send_hook_url' => string, //
'call_types' => array, //
'campaign_enabled' => bool, //
'cdn_expiration_seconds' => int, //
'channel_configs' => array, //
'custom_action_handler_url' => string, //
'datadog_info' => DataDogInfo, //
'disable_auth_checks' => bool, //
'disable_permissions_checks' => bool, //
'enforce_unique_usernames' => string, //
'event_hooks' => array, //
'file_upload_config' => FileUploadConfig, //
'geofences' => array, //
'grants' => array, //
'guest_user_creation_disabled' => bool, //
'id' => int, //
'image_moderation_enabled' => bool, //
'image_moderation_labels' => array, //
'image_upload_config' => FileUploadConfig, //
'max_aggregated_activities_length' => int, //
'moderation_audio_call_moderation_enabled' => bool, //
'moderation_dashboard_preferences' => ModerationDashboardPreferences, //
'moderation_enabled' => bool, //
'moderation_llm_configurability_enabled' => bool, //
'moderation_multitenant_blocklist_enabled' => bool, //
'moderation_s3_image_access_role_arn' => string, //
'moderation_video_call_moderation_enabled' => bool, //
'moderation_webhook_url' => string, //
'multi_tenant_enabled' => bool, //
'name' => string, //
'organization' => string, //
'permission_version' => string, //
'placement' => string, //
'policies' => array, //
'push_notifications' => PushNotificationFields, //
'reminders_interval' => int, //
'revoke_tokens_issued_before' => float, //
'sns_key' => string, //
'sns_secret' => string, //
'sns_topic_arn' => string, //
'sqs_key' => string, //
'sqs_secret' => string, //
'sqs_url' => string, //
'suspended' => bool, //
'suspended_explanation' => string, //
'use_hook_v2' => bool, //
'user_response_time_enabled' => bool, //
'user_search_disallowed_roles' => array, //
'webhook_events' => array, //
'webhook_url' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_multi_user_devices | bool | Yes | |
| async_url_enrich_enabled | bool | Yes | |
| auto_translation_enabled | bool | Yes | |
| call_types | array | Yes | |
| campaign_enabled | bool | Yes | |
| cdn_expiration_seconds | int | Yes | |
| channel_configs | array | Yes | |
| custom_action_handler_url | string | Yes | |
| disable_auth_checks | bool | Yes | |
| disable_permissions_checks | bool | Yes | |
| enforce_unique_usernames | string | Yes | |
| event_hooks | array | Yes | |
| file_upload_config | FileUploadConfig | Yes | |
| grants | array | Yes | |
| guest_user_creation_disabled | bool | Yes | |
| id | int | Yes | |
| image_moderation_enabled | bool | Yes | |
| image_upload_config | FileUploadConfig | Yes | |
| max_aggregated_activities_length | int | Yes | |
| moderation_audio_call_moderation_enabled | bool | Yes | |
| moderation_enabled | bool | Yes | |
| moderation_llm_configurability_enabled | bool | Yes | |
| moderation_multitenant_blocklist_enabled | bool | Yes | |
| moderation_video_call_moderation_enabled | bool | Yes | |
| moderation_webhook_url | string | Yes | |
| multi_tenant_enabled | bool | Yes | |
| name | string | Yes | |
| organization | string | Yes | |
| permission_version | string | Yes | |
| placement | string | Yes | |
| policies | array | Yes | |
| push_notifications | PushNotificationFields | Yes | |
| reminders_interval | int | Yes | |
| sns_key | string | Yes | |
| sns_secret | string | Yes | |
| sns_topic_arn | string | Yes | |
| sqs_key | string | Yes | |
| sqs_secret | string | Yes | |
| sqs_url | string | Yes | |
| suspended | bool | Yes | |
| suspended_explanation | string | Yes | |
| use_hook_v2 | bool | Yes | |
| user_response_time_enabled | bool | Yes | |
| user_search_disallowed_roles | array | Yes | |
| webhook_events | array | Yes | |
| webhook_url | string | Yes | |
| activity_metrics_config | array | No | |
| allowed_flag_reasons | array | No | |
| before_message_send_hook_url | string | No | |
| datadog_info | DataDogInfo | No | |
| geofences | array | No | |
| image_moderation_labels | array | No | |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | |
| moderation_s3_image_access_role_arn | string | No | |
| revoke_tokens_issued_before | float | No |
AsyncModerationCallbackConfig
// AsyncModerationCallbackConfig array structure
[
'mode' => string, //
'server_url' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| mode | string | No | |
| server_url | string | No |
AsyncModerationConfiguration
// AsyncModerationConfiguration array structure
[
'callback' => AsyncModerationCallbackConfig, //
'timeout_ms' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| timeout_ms | int | No |
AutomodPlatformCircumventionConfig
// AutomodPlatformCircumventionConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
AutomodSemanticFiltersConfig
// AutomodSemanticFiltersConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
AutomodToxicityConfig
// AutomodToxicityConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
AzureRequest
Config for creating Azure Blob Storage storage
// AzureRequest array structure
[
'abs_account_name' => string, // The account name
'abs_client_id' => string, // The client id
'abs_client_secret' => string, // The client secret
'abs_tenant_id' => string, // The tenant id
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| abs_account_name | string | Yes | The account name |
| abs_client_id | string | Yes | The client id |
| abs_client_secret | string | Yes | The client secret |
| abs_tenant_id | string | Yes | The tenant id |
BlockListConfig
// BlockListConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'match_substring' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| match_substring | bool | No | |
| rules | array | No |
BlockListResponse
Block list contains restricted words
// BlockListResponse array structure
[
'created_at' => float, // Date/time of creation
'id' => string, //
'is_leet_check_enabled' => bool, //
'is_plural_check_enabled' => bool, //
'name' => string, // Block list name
'team' => string, //
'type' => string, // Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word
'updated_at' => float, // Date/time of the last update
'words' => array, // List of words to block
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| is_leet_check_enabled | bool | Yes | |
| is_plural_check_enabled | bool | Yes | |
| name | string | Yes | Block list name |
| type | string | Yes | Block list type. One of: regex, domain, domain_allowlist, email, email_allowl... |
| words | array | Yes | List of words to block |
| created_at | float | No | Date/time of creation |
| id | string | No | |
| team | string | No | |
| updated_at | float | No | Date/time of the last update |
BlockUsersResponse
// BlockUsersResponse array structure
[
'blocked_by_user_id' => string, // User id who blocked another user
'blocked_user_id' => string, // User id who got blocked
'created_at' => float, // Timestamp when the user was blocked
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocked_by_user_id | string | Yes | User id who blocked another user |
| blocked_user_id | string | Yes | User id who got blocked |
| created_at | float | Yes | Timestamp when the user was blocked |
| duration | string | Yes | Duration of the request in milliseconds |
BlockedUserResponse
// BlockedUserResponse array structure
[
'blocked_user' => UserResponse, // User who got blocked
'blocked_user_id' => string, // ID of the user who got blocked
'created_at' => float, //
'user' => UserResponse, // User who blocked another user
'user_id' => string, // ID of the user who blocked another user
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocked_user | UserResponse | Yes | User who got blocked |
| blocked_user_id | string | Yes | ID of the user who got blocked |
| created_at | float | Yes | |
| user | UserResponse | Yes | User who blocked another user |
| user_id | string | Yes | ID of the user who blocked another user |
BodyguardImageAnalysisConfig
// BodyguardImageAnalysisConfig array structure
[
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | array | 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 |
ChatPreferencesInput
// ChatPreferencesInput array structure
[
'channel_mentions' => string, //
'default_preference' => string, //
'direct_mentions' => 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 | |
| group_mentions | string | No | |
| here_mentions | string | No | |
| role_mentions | string | No | |
| thread_replies | string | No |
CheckExternalStorageResponse
Basic response information
// CheckExternalStorageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'file_url' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file_url | string | Yes |
CheckPushResponse
// CheckPushResponse array structure
[
'device_errors' => array, // Object with device errors
'duration' => string, //
'event_type' => string, // The event type that was tested
'general_errors' => array, // List of general errors
'rendered_apn_template' => string, //
'rendered_firebase_template' => string, //
'rendered_message' => array, //
'skip_devices' => bool, // Don't require existing devices to render templates
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| device_errors | array | No | Object with device errors |
| event_type | string | No | The event type that was tested |
| general_errors | array | No | List of general errors |
| rendered_apn_template | string | No | |
| rendered_firebase_template | string | No | |
| rendered_message | array | No | |
| skip_devices | bool | No | Don't require existing devices to render templates |
CheckSNSResponse
// CheckSNSResponse array structure
[
'data' => array, // Error data
'duration' => string, //
'error' => string, // Error text
'status' => string, // Validation result. One of: ok, error
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| status | string | Yes | Validation result. One of: ok, error |
| data | array | No | Error data |
| error | string | No | Error text |
CheckSQSResponse
// CheckSQSResponse array structure
[
'data' => array, // Error data
'duration' => string, //
'error' => string, // Error text
'status' => string, // Validation result. One of: ok, error
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| status | string | Yes | Validation result. One of: ok, error |
| data | array | No | Error data |
| error | string | No | Error text |
CreateBlockListResponse
Basic response information
// CreateBlockListResponse array structure
[
'blocklist' => BlockListResponse, //
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
CreateExternalStorageResponse
Basic response information
// CreateExternalStorageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
CreateGuestResponse
// CreateGuestResponse array structure
[
'access_token' => string, // the access token to authenticate the user
'duration' => string, // Duration of the request in milliseconds
'user' => UserResponse, // User object which server acts upon
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | the access token to authenticate the user |
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | Yes | User object which server acts upon |
CreateImportResponse
Basic response information
// CreateImportResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'import_task' => ImportTask, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_task | ImportTask | No |
CreateImportURLResponse
Basic response information
// CreateImportURLResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'path' => string, //
'upload_url' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| path | string | Yes | |
| upload_url | string | Yes |
CreateImportV2TaskResponse
Basic response information
// CreateImportV2TaskResponse array structure
[
'app_pk' => int, //
'created_at' => float, //
'duration' => string, // Duration of the request in milliseconds
'id' => string, //
'product' => string, //
'settings' => ImportV2TaskSettings, //
'state' => int, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float | Yes |
CreateRoleResponse
Basic response information
// CreateRoleResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'role' => Role, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| role | Role | Yes |
CreateUserGroupResponse
Response for creating a user group
// CreateUserGroupResponse array structure
[
'duration' => string, //
'user_group' => UserGroupResponse, // The created user group
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The created user group |
Data
// Data array structure
[
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DataDogInfo
// DataDogInfo array structure
[
'api_key' => string, //
'enabled' => bool, //
'site' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| api_key | string | No | |
| enabled | bool | No | |
| site | string | No |
DeactivateUserResponse
// DeactivateUserResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'user' => UserResponse, // Deactivated user object
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
DeactivateUsersResponse
Basic response information
// DeactivateUsersResponse 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 | Yes |
DeleteExternalStorageResponse
Basic response information
// DeleteExternalStorageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteImportV2TaskResponse
Basic response information
// DeleteImportV2TaskResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteUsersResponse
// DeleteUsersResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'task_id' => string, // ID of the task to delete users
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes | ID of the task to delete users |
DeviceResponse
Response for Device
// DeviceResponse array structure
[
'created_at' => float, // Date/time of creation
'disabled' => bool, // Whether device is disabled or not
'disabled_reason' => string, // Reason explaining why device had been disabled
'id' => string, // Device ID
'push_provider' => string, // Push provider
'push_provider_name' => string, // Push provider name
'user_id' => string, // User ID
'voip' => bool, // When true the token is for Apple VoIP push notifications
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| id | string | Yes | Device ID |
| push_provider | string | Yes | Push provider |
| user_id | string | Yes | User ID |
| disabled | bool | No | Whether device is disabled or not |
| disabled_reason | string | No | Reason explaining why device had been disabled |
| push_provider_name | string | No | Push provider name |
| voip | bool | No | When true the token is for Apple VoIP push notifications |
ErrorResult
// ErrorResult array structure
[
'stacktrace' => string, //
'type' => string, //
'version' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| stacktrace | string | No | |
| version | string | No |
EventHook
// EventHook array structure
[
'callback' => AsyncModerationCallbackConfig, //
'created_at' => float, //
'enabled' => bool, //
'event_types' => array, //
'hook_type' => string, //
'id' => string, //
'product' => string, //
'should_send_custom_events' => bool, //
'sns_auth_type' => string, //
'sns_event_based_message_group_id_enabled' => bool, //
'sns_key' => string, //
'sns_region' => string, //
'sns_role_arn' => string, //
'sns_secret' => string, //
'sns_topic_arn' => string, //
'sqs_auth_type' => string, //
'sqs_key' => string, //
'sqs_queue_url' => string, //
'sqs_region' => string, //
'sqs_role_arn' => string, //
'sqs_secret' => string, //
'timeout_ms' => int, //
'updated_at' => float, //
'webhook_url' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| created_at | float | No | |
| enabled | bool | No | |
| event_types | array | No | |
| hook_type | string | No | |
| id | string | No | |
| product | string | No | |
| should_send_custom_events | bool | No | |
| sns_auth_type | string | No | |
| sns_event_based_message_group_id_enabled | bool | No | |
| sns_key | string | No | |
| sns_region | string | No | |
| sns_role_arn | string | No | |
| sns_secret | string | No | |
| sns_topic_arn | string | No | |
| sqs_auth_type | string | No | |
| sqs_key | string | No | |
| sqs_queue_url | string | No | |
| sqs_region | string | No | |
| sqs_role_arn | string | No | |
| sqs_secret | string | No | |
| timeout_ms | int | No | |
| updated_at | float | No | |
| webhook_url | string | No |
ExportUserResponse
// ExportUserResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'messages' => array, // List of exported messages
'reactions' => array, // List of exported reactions
'user' => UserResponse, // Exported user object
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| messages | array | No | List of exported messages |
| reactions | array | No | List of exported reactions |
| user | UserResponse | No | Exported user object |
ExportUsersResponse
Basic response information
// ExportUsersResponse 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 | Yes |
FeedsPreferences
// FeedsPreferences array structure
[
'comment' => string, // Push notification preference for comments on user's activities. One of: all, none
'comment_mention' => string, // Push notification preference for mentions in comments. One of: all, none
'comment_reaction' => string, // Push notification preference for reactions on comments. One of: all, none
'comment_reply' => string, // Push notification preference for replies to comments. One of: all, none
'custom_activity_types' => array, // Push notification preferences for custom activity types. Map of activity type to preference (all or none)
'follow' => string, // Push notification preference for new followers. One of: all, none
'mention' => string, // Push notification preference for mentions in activities. One of: all, none
'reaction' => string, // Push notification preference for reactions on user's activities or comments. One of: all, none
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | string | No | Push notification preference for comments on user's activities. One of: all, ... |
| comment_mention | string | No | Push notification preference for mentions in comments. One of: all, none |
| comment_reaction | string | No | Push notification preference for reactions on comments. One of: all, none |
| comment_reply | string | No | Push notification preference for replies to comments. One of: all, none |
| custom_activity_types | array | No | Push notification preferences for custom activity types. Map of activity type... |
| follow | string | No | Push notification preference for new followers. One of: all, none |
| mention | string | No | Push notification preference for mentions in activities. One of: all, none |
| reaction | string | No | Push notification preference for reactions on user's activities or comments. ... |
Field
// Field array structure
[
'short' => bool, //
'title' => string, //
'value' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | string | Yes | |
| value | string | Yes |
FileUploadConfig
// FileUploadConfig array structure
[
'allowed_file_extensions' => array, //
'allowed_mime_types' => array, //
'blocked_file_extensions' => array, //
'blocked_mime_types' => array, //
'size_limit' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| size_limit | int | Yes | |
| allowed_file_extensions | array | No | |
| allowed_mime_types | array | No | |
| blocked_file_extensions | array | No | |
| blocked_mime_types | array | No |
FileUploadResponse
// FileUploadResponse 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
'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 |
| thumb_url | string | No | URL of the file thumbnail for supported file formats. Should be put to `thumb... |
FirebaseConfig
// FirebaseConfig array structure
[
'Disabled' => bool, //
'apn_template' => string, //
'credentials_json' => string, //
'data_template' => string, //
'notification_template' => string, //
'server_key' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| apn_template | string | No | |
| credentials_json | string | No | |
| data_template | string | No | |
| notification_template | string | No | |
| server_key | string | No |
FullUserResponse
// FullUserResponse array structure
[
'avg_response_time' => int, //
'ban_expires' => float, //
'banned' => bool, //
'blocked_user_ids' => array, //
'bypass_moderation' => bool, //
'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, //
'revoke_tokens_issued_before' => float, //
'role' => string, //
'shadow_banned' => bool, //
'teams' => array, //
'teams_role' => array, //
'total_unread_count' => int, //
'unread_channels' => int, //
'unread_count' => int, //
'unread_threads' => int, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | |
| blocked_user_ids | array | 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 | |
| shadow_banned | bool | 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 | |
| ban_expires | float | No | |
| bypass_moderation | bool | 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 | |
| revoke_tokens_issued_before | float | No | |
| teams_role | array | No |
GetApplicationResponse
Basic response information
// GetApplicationResponse array structure
[
'app' => AppResponseFields, //
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app | AppResponseFields | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
GetBlockListResponse
Response for get block list
// GetBlockListResponse array structure
[
'blocklist' => BlockListResponse, // Block list object
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| blocklist | BlockListResponse | No | Block list object |
GetBlockedUsersResponse
// GetBlockedUsersResponse array structure
[
'blocks' => array, // Array of blocked user object
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocks | array | Yes | Array of blocked user object |
| duration | string | Yes | Duration of the request in milliseconds |
GetCustomPermissionResponse
Basic response information
// GetCustomPermissionResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'permission' => Permission, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| permission | Permission | Yes |
GetExternalStorageAWSS3Response
// GetExternalStorageAWSS3Response array structure
[
'bucket' => string, //
'path_prefix' => string, //
'region' => string, //
'role_arn' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| region | string | Yes | |
| role_arn | string | Yes | |
| path_prefix | string | No |
GetExternalStorageResponse
Basic response information
// GetExternalStorageResponse array structure
[
'aws_s3' => GetExternalStorageAWSS3Response, //
'created_at' => float, //
'duration' => string, // Duration of the request in milliseconds
'type' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| type | string | Yes | |
| updated_at | float | Yes | |
| aws_s3 | GetExternalStorageAWSS3Response | No |
GetImportResponse
Basic response information
// GetImportResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'import_task' => ImportTask, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_task | ImportTask | No |
GetImportV2TaskResponse
Basic response information
// GetImportV2TaskResponse array structure
[
'app_pk' => int, //
'created_at' => float, //
'duration' => string, // Duration of the request in milliseconds
'id' => string, //
'product' => string, //
'result' => array, //
'settings' => ImportV2TaskSettings, //
'state' => int, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float | Yes | |
| result | array | No |
GetOGResponse
// GetOGResponse array structure
[
'actions' => array, //
'asset_url' => string, // URL of detected video or audio
'author_icon' => string, //
'author_link' => string, // og:site
'author_name' => string, // og:site_name
'color' => string, //
'custom' => array, //
'duration' => string, //
'fallback' => string, //
'fields' => array, //
'footer' => string, //
'footer_icon' => string, //
'giphy' => Images, //
'image_url' => string, // URL of detected image
'og_scrape_url' => string, // extracted url from the text
'original_height' => int, //
'original_width' => int, //
'pretext' => string, //
'text' => string, // og:description
'thumb_url' => string, // URL of detected thumb image
'title' => string, // og:title
'title_link' => string, // og:url
'type' => string, // Attachment type, could be empty, image, audio or video
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | Yes | |
| duration | string | Yes | |
| actions | array | No | |
| asset_url | string | No | URL of detected video or audio |
| author_icon | string | No | |
| author_link | string | No | og:site |
| author_name | string | No | og:site_name |
| color | string | No | |
| fallback | string | No | |
| fields | array | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | URL of detected image |
| og_scrape_url | string | No | extracted url from the text |
| original_height | int | No | |
| original_width | int | No | |
| pretext | string | No | |
| text | string | No | og:description |
| thumb_url | string | No | URL of detected thumb image |
| title | string | No | og:title |
| title_link | string | No | og:url |
| type | string | No | Attachment type, could be empty, image, audio or video |
GetPushTemplatesResponse
Basic response information
// GetPushTemplatesResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'templates' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| templates | array | Yes |
GetRateLimitsResponse
// GetRateLimitsResponse array structure
[
'android' => array, // Map of endpoint rate limits for the Android platform
'duration' => string, //
'ios' => array, // Map of endpoint rate limits for the iOS platform
'server_side' => array, // Map of endpoint rate limits for the server-side platform
'web' => array, // Map of endpoint rate limits for the web platform
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| android | array | No | Map of endpoint rate limits for the Android platform |
| ios | array | No | Map of endpoint rate limits for the iOS platform |
| server_side | array | No | Map of endpoint rate limits for the server-side platform |
| web | array | No | Map of endpoint rate limits for the web platform |
GetTaskResponse
// GetTaskResponse array structure
[
'created_at' => float, //
'duration' => string, //
'error' => ErrorResult, // Error produced by task
'result' => array, // Result produced by task after completion
'status' => string, // Current status of task
'task_id' => string, // ID of task
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| duration | string | Yes | |
| status | string | Yes | Current status of task |
| task_id | string | Yes | ID of task |
| updated_at | float | Yes | |
| error | ErrorResult | No | Error produced by task |
| result | array | No | Result produced by task after completion |
GetUserGroupResponse
Response for getting a user group
// GetUserGroupResponse array structure
[
'duration' => string, //
'user_group' => UserGroupResponse, // The user group
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The user group |
GoogleVisionConfig
// GoogleVisionConfig array structure
[
'enabled' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
HuaweiConfig
// HuaweiConfig array structure
[
'Disabled' => bool, //
'id' => string, //
'secret' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| id | string | No | |
| secret | string | No |
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 |
ImageUploadResponse
// ImageUploadResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'file' => 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 | |
| thumb_url | string | No | |
| upload_sizes | array | No | Array of image size configurations |
Images
// Images array structure
[
'fixed_height' => ImageData, //
'fixed_height_downsampled' => ImageData, //
'fixed_height_still' => ImageData, //
'fixed_width' => ImageData, //
'fixed_width_downsampled' => ImageData, //
'fixed_width_still' => ImageData, //
'original' => ImageData, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
ImportTask
// ImportTask array structure
[
'created_at' => float, //
'history' => array, //
'id' => string, //
'mode' => string, //
'path' => string, //
'size' => int, //
'state' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| history | array | Yes | |
| id | string | Yes | |
| mode | string | Yes | |
| path | string | Yes | |
| state | string | Yes | |
| updated_at | float | Yes | |
| size | int | No |
ImportV2TaskItem
// ImportV2TaskItem array structure
[
'app_pk' => int, //
'created_at' => float, //
'id' => string, //
'product' => string, //
'result' => array, //
'settings' => ImportV2TaskSettings, //
'state' => int, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float | Yes | |
| result | array | No |
ImportV2TaskSettings
// ImportV2TaskSettings array structure
[
'merge_custom' => bool, //
'mode' => string, //
'path' => string, //
's3' => ImportV2TaskSettingsS3, //
'skip_references_check' => bool, //
'source' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| merge_custom | bool | No | |
| mode | string | No | |
| path | string | No | |
| s3 | ImportV2TaskSettingsS3 | No | |
| skip_references_check | bool | No | |
| source | string | No |
ImportV2TaskSettingsS3
// ImportV2TaskSettingsS3 array structure
[
'bucket' => string, //
'dir' => string, //
'region' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | No | |
| dir | string | No | |
| region | string | No |
LLMConfig
// LLMConfig array structure
[
'app_context' => string, //
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
'severity_descriptions' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | string | No | |
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No | |
| severity_descriptions | array | No |
ListBlockListResponse
Basic response information
// ListBlockListResponse array structure
[
'blocklists' => array, //
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklists | array | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
ListDevicesResponse
List devices response
// ListDevicesResponse array structure
[
'devices' => array, // List of devices
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| devices | array | Yes | List of devices |
| duration | string | Yes |
ListExternalStorageResponse
Basic response information
// ListExternalStorageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'external_storages' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| external_storages | array | Yes |
ListImportV2TasksResponse
Basic response information
// ListImportV2TasksResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'import_tasks' => array, //
'next' => string, //
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_tasks | array | Yes | |
| next | string | No | |
| prev | string | No |
ListImportsResponse
Basic response information
// ListImportsResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'import_tasks' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_tasks | array | Yes |
ListPermissionsResponse
Basic response information
// ListPermissionsResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'permissions' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| permissions | array | Yes |
ListPushProvidersResponse
Basic response information
// ListPushProvidersResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'push_providers' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| push_providers | array | Yes |
ListRolesResponse
Basic response information
// ListRolesResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'roles' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| roles | array | Yes |
ListUserGroupsResponse
Response for listing user groups
// ListUserGroupsResponse array structure
[
'duration' => string, //
'user_groups' => array, // List of user groups
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_groups | array | Yes | List of user groups |
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 |
ModerationConfig
// ModerationConfig array structure
[
'ai_image_config' => AIImageConfig, //
'ai_image_lite_config' => BodyguardImageAnalysisConfig, //
'ai_text_config' => AITextConfig, //
'ai_video_config' => AIVideoConfig, //
'async' => bool, //
'automod_platform_circumvention_config' => AutomodPlatformCircumventionConfig, //
'automod_semantic_filters_config' => AutomodSemanticFiltersConfig, //
'automod_toxicity_config' => AutomodToxicityConfig, //
'block_list_config' => BlockListConfig, //
'created_at' => float, //
'google_vision_config' => GoogleVisionConfig, //
'key' => string, //
'llm_config' => LLMConfig, //
'supported_video_call_harm_types' => array, //
'team' => string, //
'updated_at' => float, //
'velocity_filter_config' => VelocityFilterConfig, //
'video_call_rule_config' => VideoCallRuleConfig, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_config | AIImageConfig | No | |
| ai_image_lite_config | BodyguardImageAnalysisConfig | No | |
| ai_text_config | AITextConfig | No | |
| ai_video_config | AIVideoConfig | No | |
| async | bool | No | |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | |
| automod_toxicity_config | AutomodToxicityConfig | No | |
| block_list_config | BlockListConfig | No | |
| created_at | float | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | string | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | array | No | |
| team | string | No | |
| updated_at | float | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationDashboardPreferences
// ModerationDashboardPreferences array structure
[
'allowed_moderation_action_reasons' => array, //
'async_review_queue_upsert' => bool, //
'disable_audit_logs' => bool, //
'disable_flagging_reviewed_entity' => bool, //
'escalation_queue_enabled' => bool, //
'escalation_reasons' => array, //
'flag_user_on_flagged_content' => bool, //
'keyframe_classifications_map' => array, //
'media_queue_blur_enabled' => bool, //
'overview_dashboard' => OverviewDashboardConfig, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allowed_moderation_action_reasons | array | No | |
| async_review_queue_upsert | bool | No | |
| disable_audit_logs | bool | No | |
| disable_flagging_reviewed_entity | bool | No | |
| escalation_queue_enabled | bool | No | |
| escalation_reasons | array | No | |
| flag_user_on_flagged_content | bool | No | |
| keyframe_classifications_map | array | No | |
| media_queue_blur_enabled | bool | No | |
| overview_dashboard | OverviewDashboardConfig | No |
OnlyUserID
// OnlyUserID array structure
[
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
OverviewDashboardConfig
// OverviewDashboardConfig array structure
[
'default_date_range_days' => int, //
'visible_charts' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| default_date_range_days | int | No | |
| visible_charts | array | No |
Permission
// Permission array structure
[
'action' => string, // Action name this permission is for (e.g. SendMessage)
'condition' => array, // MongoDB style condition which decides whether or not the permission is granted
'custom' => bool, // Whether this is a custom permission or built-in
'description' => string, // Description of the permission
'id' => string, // Unique permission ID
'level' => string, // Level at which permission could be applied (app or channel). One of: app, channel
'name' => string, // Name of the permission
'owner' => bool, // Whether this permission applies to resource owner or not
'same_team' => bool, // Whether this permission applies to teammates (multi-tenancy mode only)
'tags' => array, // List of tags of the permission
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Action name this permission is for (e.g. SendMessage) |
| custom | bool | Yes | Whether this is a custom permission or built-in |
| description | string | Yes | Description of the permission |
| id | string | Yes | Unique permission ID |
| level | string | Yes | Level at which permission could be applied (app or channel). One of: app, cha... |
| name | string | Yes | Name of the permission |
| owner | bool | Yes | Whether this permission applies to resource owner or not |
| same_team | bool | Yes | Whether this permission applies to teammates (multi-tenancy mode only) |
| tags | array | Yes | List of tags of the permission |
| condition | array | No | MongoDB style condition which decides whether or not the permission is granted |
PollOptionInput
// PollOptionInput array structure
[
'custom' => array, //
'text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | No | |
| text | string | No |
PollOptionRequest
// PollOptionRequest array structure
[
'custom' => array, //
'id' => string, //
'text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| custom | array | No | |
| text | string | No |
PollOptionResponse
// PollOptionResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'poll_option' => PollOptionResponseData, // Poll option
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll_option | PollOptionResponseData | Yes | Poll option |
PollOptionResponseData
// PollOptionResponseData array structure
[
'custom' => array, //
'id' => string, //
'text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | Yes | |
| id | string | Yes | |
| text | string | Yes |
PollResponse
// PollResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'poll' => PollResponseData, // Poll
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | Yes | Poll |
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 |
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 |
PollVotesResponse
// PollVotesResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'next' => string, //
'prev' => string, //
'votes' => array, // Poll votes
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| votes | array | Yes | Poll votes |
| next | string | No | |
| prev | 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 |
PushConfig
// PushConfig array structure
[
'offline_only' => bool, //
'version' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| version | string | Yes | |
| offline_only | bool | No |
PushPreferenceInput
// PushPreferenceInput array structure
[
'call_level' => string, // Set the level of call push notifications for the user. One of: all, none, default
'channel_cid' => string, // Set the push preferences for a specific channel. If empty it sets the default for the user
'chat_level' => string, // Set the level of chat push notifications for the user. Note: "mentions" is deprecated in favor of "direct_mentions". One of: all, mentions, direct_mentions, all_mentions, none, default
'chat_preferences' => ChatPreferencesInput, //
'disabled_until' => float, // Disable push notifications till a certain time
'feeds_level' => string, // Set the level of feeds push notifications for the user. One of: all, none, default
'feeds_preferences' => FeedsPreferences, // Set granular feeds preferences for reactions, comments, new followers, mentions, and custom activity types
'remove_disable' => bool, // Remove the disabled until time. (IE stop snoozing notifications)
'user_id' => string, // The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_level | string | No | Set the level of call push notifications for the user. One of: all, none, def... |
| channel_cid | string | No | Set the push preferences for a specific channel. If empty it sets the default... |
| chat_level | string | No | Set the level of chat push notifications for the user. Note: "mentions" is de... |
| chat_preferences | ChatPreferencesInput | No | |
| disabled_until | float | No | Disable push notifications till a certain time |
| feeds_level | string | No | Set the level of feeds push notifications for the user. One of: all, none, de... |
| feeds_preferences | FeedsPreferences | No | Set granular feeds preferences for reactions, comments, new followers, mentio... |
| remove_disable | bool | No | Remove the disabled until time. (IE stop snoozing notifications) |
| user_id | string | No | The user id for which to set the push preferences. Required when using server... |
PushProvider
// PushProvider array structure
[
'apn_auth_key' => string, //
'apn_auth_type' => string, //
'apn_development' => bool, //
'apn_host' => string, //
'apn_key_id' => string, //
'apn_notification_template' => string, //
'apn_p12_cert' => string, //
'apn_team_id' => string, //
'apn_topic' => string, //
'created_at' => float, //
'description' => string, //
'disabled_at' => float, //
'disabled_reason' => string, //
'firebase_apn_template' => string, //
'firebase_credentials' => string, //
'firebase_data_template' => string, //
'firebase_host' => string, //
'firebase_notification_template' => string, //
'firebase_server_key' => string, //
'huawei_app_id' => string, //
'huawei_app_secret' => string, //
'huawei_host' => string, //
'name' => string, //
'push_templates' => array, //
'type' => string, //
'updated_at' => float, //
'xiaomi_app_secret' => string, //
'xiaomi_package_name' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| name | string | Yes | |
| type | string | Yes | |
| updated_at | float | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | bool | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_notification_template | string | No | |
| apn_p12_cert | string | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | float | No | |
| disabled_reason | string | No | |
| firebase_apn_template | string | No | |
| firebase_credentials | string | No | |
| firebase_data_template | string | No | |
| firebase_host | string | No | |
| firebase_notification_template | string | No | |
| firebase_server_key | string | No | |
| huawei_app_id | string | No | |
| huawei_app_secret | string | No | |
| huawei_host | string | No | |
| push_templates | array | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushProviderRequest
// PushProviderRequest array structure
[
'apn_auth_key' => string, //
'apn_auth_type' => string, //
'apn_development' => bool, //
'apn_host' => string, //
'apn_key_id' => string, //
'apn_notification_template' => string, //
'apn_p12_cert' => string, //
'apn_team_id' => string, //
'apn_topic' => string, //
'description' => string, //
'disabled_at' => float, //
'disabled_reason' => string, //
'firebase_apn_template' => string, //
'firebase_credentials' => string, //
'firebase_data_template' => string, //
'firebase_host' => string, //
'firebase_notification_template' => string, //
'firebase_server_key' => string, //
'huawei_app_id' => string, //
'huawei_app_secret' => string, //
'name' => string, //
'type' => string, //
'xiaomi_app_secret' => string, //
'xiaomi_package_name' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | bool | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_notification_template | string | No | |
| apn_p12_cert | string | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | float | No | |
| disabled_reason | string | No | |
| firebase_apn_template | string | No | |
| firebase_credentials | string | No | |
| firebase_data_template | string | No | |
| firebase_host | string | No | |
| firebase_notification_template | string | No | |
| firebase_server_key | string | No | |
| huawei_app_id | string | No | |
| huawei_app_secret | string | No | |
| type | string | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushProviderResponse
// PushProviderResponse array structure
[
'apn_auth_key' => string, //
'apn_auth_type' => string, //
'apn_development' => bool, //
'apn_host' => string, //
'apn_key_id' => string, //
'apn_p12_cert' => string, //
'apn_sandbox_certificate' => bool, //
'apn_supports_remote_notifications' => bool, //
'apn_supports_voip_notifications' => bool, //
'apn_team_id' => string, //
'apn_topic' => string, //
'created_at' => float, //
'description' => string, //
'disabled_at' => float, //
'disabled_reason' => string, //
'firebase_apn_template' => string, //
'firebase_credentials' => string, //
'firebase_data_template' => string, //
'firebase_host' => string, //
'firebase_notification_template' => string, //
'firebase_server_key' => string, //
'huawei_app_id' => string, //
'huawei_app_secret' => string, //
'name' => string, //
'type' => string, //
'updated_at' => float, //
'xiaomi_app_secret' => string, //
'xiaomi_package_name' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| name | string | Yes | |
| type | string | Yes | |
| updated_at | float | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | bool | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_p12_cert | string | No | |
| apn_sandbox_certificate | bool | No | |
| apn_supports_remote_notifications | bool | No | |
| apn_supports_voip_notifications | bool | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | float | No | |
| disabled_reason | string | No | |
| firebase_apn_template | string | No | |
| firebase_credentials | string | No | |
| firebase_data_template | string | No | |
| firebase_host | string | No | |
| firebase_notification_template | string | No | |
| firebase_server_key | string | No | |
| huawei_app_id | string | No | |
| huawei_app_secret | string | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushTemplate
// PushTemplate array structure
[
'created_at' => float, //
'enable_push' => bool, //
'event_type' => string, //
'template' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| enable_push | bool | Yes | |
| event_type | string | Yes | |
| updated_at | float | Yes | |
| template | string | No |
PushTemplateResponse
// PushTemplateResponse array structure
[
'created_at' => float, // Time when the template was created
'enable_push' => bool, // Whether push notification is enabled for this event
'event_type' => string, // Type of event this template applies to
'push_provider_internal_id' => string, // Internal ID of the push provider
'template' => string, // The push notification template
'updated_at' => float, // Time when the template was last updated
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Time when the template was created |
| enable_push | bool | Yes | Whether push notification is enabled for this event |
| event_type | string | Yes | Type of event this template applies to |
| push_provider_internal_id | string | Yes | Internal ID of the push provider |
| updated_at | float | Yes | Time when the template was last updated |
| template | string | No | The push notification template |
QueryPollsResponse
// QueryPollsResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'next' => string, //
'polls' => array, // Polls data returned by the query
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| polls | array | Yes | Polls data returned by the query |
| next | string | No | |
| prev | string | No |
QueryUsersResponse
// QueryUsersResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'users' => array, // Array of users as result of filters applied.
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| users | array | Yes | Array of users as result of filters applied. |
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 |
ReactivateUserResponse
// ReactivateUserResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'user' => UserResponse, // Deactivated user object
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
ReactivateUsersResponse
Basic response information
// ReactivateUsersResponse 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 | Yes |
RemoveUserGroupMembersResponse
Response for removing members from a user group
// RemoveUserGroupMembersResponse array structure
[
'duration' => string, //
'user_group' => UserGroupResponse, // The updated user group
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
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 |
Role
// Role array structure
[
'created_at' => float, // Date/time of creation
'custom' => bool, // Whether this is a custom role or built-in
'name' => string, // Unique role name
'scopes' => array, // List of scopes where this role is currently present. `.app` means that role is present in app-level grants
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| custom | bool | Yes | Whether this is a custom role or built-in |
| name | string | Yes | Unique role name |
| scopes | array | Yes | List of scopes where this role is currently present. .app means that role i... |
| updated_at | float | Yes | Date/time of the last update |
S3Request
Config for creating Amazon S3 storage.
// S3Request array structure
[
's3_api_key' => string, // The AWS API key. To use Amazon S3 as your storage provider, you have two authentication options: IAM role or API key. If you do not specify the `s3_api_key` parameter, Stream will use IAM role authentication. In that case make sure to have the correct IAM role configured for your application.
's3_custom_endpoint_url' => string, // The custom endpoint for S3. If you want to use a custom endpoint, you must also provide the `s3_api_key` and `s3_secret` parameters.
's3_region' => string, // The AWS region where the bucket is hosted
's3_secret' => string, // The AWS API Secret
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| s3_region | string | Yes | The AWS region where the bucket is hosted |
| s3_api_key | string | No | The AWS API key. To use Amazon S3 as your storage provider, you have two auth... |
| s3_custom_endpoint_url | string | No | The custom endpoint for S3. If you want to use a custom endpoint, you must al... |
| s3_secret | string | No | The AWS API Secret |
SearchUserGroupsResponse
Response for searching user groups
// SearchUserGroupsResponse array structure
[
'duration' => string, //
'user_groups' => array, // List of matching user groups
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_groups | array | Yes | List of matching user groups |
SharedLocationResponse
// SharedLocationResponse array structure
[
'channel' => ChannelResponse, //
'channel_cid' => string, // Channel CID
'created_at' => float, // Date/time of creation
'created_by_device_id' => string, // Device ID that created the live location
'duration' => string, //
'end_at' => float, // Time when the live location expires
'latitude' => float, // Latitude coordinate
'longitude' => float, // Longitude coordinate
'message' => MessageResponse, //
'message_id' => string, // Message ID
'updated_at' => float, // Date/time of the last update
'user_id' => string, // User ID
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | Channel CID |
| created_at | float | Yes | Date/time of creation |
| created_by_device_id | string | Yes | Device ID that created the live location |
| duration | string | Yes | |
| latitude | float | Yes | Latitude coordinate |
| longitude | float | Yes | Longitude coordinate |
| message_id | string | Yes | Message ID |
| updated_at | float | Yes | Date/time of the last update |
| user_id | string | Yes | User ID |
| channel | ChannelResponse | No | |
| end_at | float | No | Time when the live location expires |
| message | MessageResponse | 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 |
SharedLocationsResponse
// SharedLocationsResponse array structure
[
'active_live_locations' => array, //
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_live_locations | array | Yes | |
| duration | string | Yes |
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)... |
Time
// Time array structure
[
]UnblockUsersResponse
// UnblockUsersResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
UpdateBlockListResponse
Basic response information
// UpdateBlockListResponse array structure
[
'blocklist' => BlockListResponse, //
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
UpdateExternalStorageResponse
Basic response information
// UpdateExternalStorageResponse array structure
[
'bucket' => string, //
'duration' => string, // Duration of the request in milliseconds
'name' => string, //
'path' => string, //
'type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| name | string | Yes | |
| path | string | Yes | |
| type | string | Yes |
UpdateUserGroupResponse
Response for updating a user group
// UpdateUserGroupResponse array structure
[
'duration' => string, //
'user_group' => UserGroupResponse, // The updated user group
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
UpdateUserPartialRequest
// UpdateUserPartialRequest array structure
[
'id' => string, // User ID to update
'set' => array, //
'unset' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID to update |
| set | array | No | |
| unset | array | No |
UpdateUsersResponse
// UpdateUsersResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'membership_deletion_task_id' => string, //
'users' => array, // Object containing users
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| membership_deletion_task_id | string | Yes | |
| users | array | Yes | Object containing users |
UpsertExternalStorageAWSS3Request
// UpsertExternalStorageAWSS3Request array structure
[
'bucket' => string, //
'path_prefix' => string, //
'region' => string, //
'role_arn' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| region | string | Yes | |
| role_arn | string | Yes | |
| path_prefix | string | No |
UpsertExternalStorageResponse
Basic response information
// UpsertExternalStorageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
UpsertPushPreferencesResponse
// UpsertPushPreferencesResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'user_channel_preferences' => array, // The channel specific push notification preferences, only returned for channels you've edited.
'user_preferences' => array, // The user preferences, always returned regardless if you edited it
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user_channel_preferences | array | Yes | The channel specific push notification preferences, only returned for channel... |
| user_preferences | array | Yes | The user preferences, always returned regardless if you edited it |
UpsertPushProviderResponse
Basic response information
// UpsertPushProviderResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'push_provider' => PushProviderResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| push_provider | PushProviderResponse | Yes |
UpsertPushTemplateResponse
Basic response information
// UpsertPushTemplateResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'template' => PushTemplateResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| template | PushTemplateResponse | No |
User
// User array structure
[
'data' => array, //
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | array | No |
UserGroupResponse
// UserGroupResponse array structure
[
'created_at' => float, //
'created_by' => string, //
'description' => string, //
'id' => string, //
'members' => array, //
'name' => string, //
'team_id' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| updated_at | float | Yes | |
| created_by | string | No | |
| description | string | No | |
| members | array | No | |
| team_id | string | 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 |
ValidateExternalStorageResponse
Basic response information
// ValidateExternalStorageResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
VelocityFilterConfig
// VelocityFilterConfig array structure
[
'advanced_filters' => bool, //
'async' => bool, //
'cascading_actions' => bool, //
'cids_per_user' => int, //
'enabled' => bool, //
'first_message_only' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | bool | No | |
| async | bool | No | |
| cascading_actions | bool | No | |
| cids_per_user | int | No | |
| enabled | bool | No | |
| first_message_only | bool | No | |
| rules | array | No |
VideoCallRuleConfig
// VideoCallRuleConfig array structure
[
'flag_all_labels' => bool, //
'flagged_labels' => array, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | bool | No | |
| flagged_labels | array | No | |
| rules | array | No |
XiaomiConfig
// XiaomiConfig array structure
[
'Disabled' => bool, //
'package_name' => string, //
'secret' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| package_name | string | No | |
| secret | string | No |