Appearance
Common
About 16498 wordsAbout 55 min
Typescript SDK - Feeds 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 and verify the configuration of your app. Use this method when you need to access or review the app's settings for troubleshooting or validation purposes.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get App Settings
const response = await client.getApp();
console.log(response);Response: GetApplicationResponse
updateApp
Modify the application settings to adjust the configuration according to your requirements. This method is useful when you need to update settings to improve functionality or comply with new policies.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update App Settings
const response = await client.updateApp({
activity_metrics_config: {},
allowed_flag_reasons: [],
apn_config: { Disabled: false },
});
console.log(response);Example: with async_moderation_config and async_url_enrich_enabled
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update App Settings
const response = await client.updateApp({
async_moderation_config: { callback: { mode: 'value' } },
async_url_enrich_enabled: false,
});
console.log(response);Example: with auto_translation_enabled and before_message_send_hook_url
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update App Settings
const response = await client.updateApp({
auto_translation_enabled: false,
before_message_send_hook_url: 'value',
});
console.log(response);Example: with cdn_expiration_seconds and channel_hide_members_only
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update App Settings
const response = await client.updateApp({
cdn_expiration_seconds: 10,
channel_hide_members_only: false,
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_metrics_config | Record<string, any> | No | - |
| allowed_flag_reasons | []string | No | - |
| apn_config | APNConfig | No | - |
| async_moderation_config | AsyncModerationConfiguration | No | - |
| async_url_enrich_enabled | boolean | No | - |
| auto_translation_enabled | boolean | No | - |
| before_message_send_hook_url | string | No | - |
| cdn_expiration_seconds | number | No | - |
| channel_hide_members_only | boolean | No | - |
| custom_action_handler_url | string | No | - |
| datadog_info | DataDogInfo | No | - |
| disable_auth_checks | boolean | No | - |
| disable_permissions_checks | boolean | No | - |
| enforce_unique_usernames | string | No | - |
| event_hooks | []EventHook | No | - |
| feeds_moderation_enabled | boolean | No | - |
| feeds_v2_region | string | No | - |
| file_upload_config | FileUploadConfig | No | - |
| firebase_config | FirebaseConfig | No | - |
| grants | Record<string, any> | No | - |
| guest_user_creation_disabled | boolean | No | - |
| huawei_config | HuaweiConfig | No | - |
| image_moderation_block_labels | []string | No | - |
| image_moderation_enabled | boolean | No | - |
| image_moderation_labels | []string | No | - |
| image_upload_config | FileUploadConfig | No | - |
| max_aggregated_activities_length | number | No | - |
| migrate_permissions_to_v2 | boolean | No | - |
| moderation_analytics_enabled | boolean | No | - |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | - |
| moderation_enabled | boolean | No | - |
| moderation_s3_image_access_role_arn | string | No | - |
| moderation_webhook_url | string | No | - |
| multi_tenant_enabled | boolean | No | - |
| permission_version | string | No | - |
| push_config | PushConfig | No | - |
| reminders_interval | number | No | - |
| reminders_max_members | number | 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 | boolean | No | - |
| user_search_disallowed_roles | []string | No | - |
| webhook_events | []string | No | - |
| webhook_url | string | No | - |
| xiaomi_config | XiaomiConfig | No | - |
listBlockLists
Obtain a list of all block lists to manage or review the existing lists effectively. Use this method when you need a comprehensive overview of all block lists in your system.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List block lists
const response = await client.listBlockLists({
team: 'value',
});
console.log(response);Response: ListBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| team | string | No | - |
createBlockList
Establish a new block list to prevent certain elements from interacting with your application. This method is essential when introducing new restrictions or security measures.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create block list
const response = await client.createBlockList({
name: 'My Feed',
words: [],
type: 'like',
is_plural_check_enabled: false,
});
console.log(response);Example: with team and is_leet_check_enabled
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create block list
const response = await client.createBlockList({
name: 'My Feed',
words: [],
team: 'value',
is_leet_check_enabled: false,
});
console.log(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 | boolean | No | - |
| is_plural_check_enabled | boolean | No | - |
| team | string | No | - |
| type | string | No | Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word |
getBlockList
Access the details of a specific block list to understand its contents and purpose. Use this method when you need to inspect or verify the entries of a particular block list.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get block list
const response = await client.getBlockList({
name: 'My Feed',
team: 'value',
});
console.log(response);Response: GetBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| team | string | No | - |
updateBlockList
Modify an existing block list to add, remove, or change its entries. This is useful when updating the list to reflect new restrictions or allow previously blocked interactions.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update block list
const response = await client.updateBlockList({
name: 'My Feed',
is_leet_check_enabled: false,
is_plural_check_enabled: false,
});
console.log(response);Example: with team and words
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update block list
const response = await client.updateBlockList({
name: 'My Feed',
team: 'value',
words: [],
});
console.log(response);Response: UpdateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| is_leet_check_enabled | boolean | No | - |
| is_plural_check_enabled | boolean | No | - |
| team | string | No | - |
| words | []string | No | List of words to block |
deleteBlockList
Remove a block list to eliminate its restrictions from your application. Use this method when a block list is no longer needed, or when consolidating lists for efficiency.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete block list
const response = await client.deleteBlockList({
name: 'My Feed',
team: 'value',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| team | string | No | - |
checkPush
Verify the configuration and status of push notification services to ensure they are functioning correctly. This method is beneficial when diagnosing issues or confirming the setup of push notifications.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check push
const response = await client.checkPush({
user_id: 'john',
event_type: 'value',
firebase_data_template: 'value',
});
console.log(response);Example: with firebase_template and message_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check push
const response = await client.checkPush({
firebase_template: 'value',
message_id: 'value',
});
console.log(response);Example: with push_provider_name and push_provider_type
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check push
const response = await client.checkPush({
push_provider_name: 'value',
push_provider_type: 'value',
});
console.log(response);Example: with skip_devices and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check push
const response = await client.checkPush({
skip_devices: false,
user: { id: 'activity-123', custom: {} },
});
console.log(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 | boolean | No | Don't require existing devices to render templates |
| user | UserRequest | No | - |
| user_id | string | No | - |
checkSNS
Check the configuration and status of SNS (Simple Notification Service) to ensure proper operation. Use this method when you need to troubleshoot or validate SNS integration.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check SNS
const response = await client.checkSNS({
sns_key: 'value',
sns_secret: 'value',
sns_topic_arn: 'value',
});
console.log(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
Assess the configuration and status of SQS (Simple Queue Service) to ensure messages are being processed correctly. This is helpful for troubleshooting issues or confirming the setup of SQS.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check SQS
const response = await client.checkSQS({
sqs_key: 'value',
sqs_secret: 'value',
sqs_url: 'value',
});
console.log(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 comprehensive list of all registered devices, useful for monitoring and managing device inventory.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List devices
const response = await client.listDevices({
user_id: 'john',
});
console.log(response);Response: ListDevicesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
createDevice
Add a new device to your system, ideal for onboarding new hardware into your network.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create device
const response = await client.createDevice({
id: 'activity-123',
push_provider: 'value',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with push_provider_name and voip_token
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create device
const response = await client.createDevice({
id: 'activity-123',
push_provider: 'value',
push_provider_name: 'value',
voip_token: false,
});
console.log(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 | boolean | No | When true the token is for Apple VoIP push notifications |
deleteDevice
Remove a specific device from your records, perfect for decommissioning or replacing outdated equipment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete device
const response = await client.deleteDevice({
id: 'activity-123',
user_id: 'john',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| user_id | string | No | - |
exportUsers
Generate and download a complete list of users, helpful for data analysis or migration to other systems.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Export users
const response = await client.exportUsers({
user_ids: ['user-1', 'user-2'],
});
console.log(response);Response: ExportUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
listExternalStorage
Get an overview of all configured external storage options, useful for managing and optimizing data storage solutions.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List external storage
const response = await client.listExternalStorage();
console.log(response);Response: ListExternalStorageResponse
createExternalStorage
Set up a new external storage configuration, enabling you to expand your data storage capabilities.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create external storage
const response = await 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' },
});
console.log(response);Example: with gcs_credentials and path
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create external storage
const response = await client.createExternalStorage({
bucket: 'value',
name: 'My Feed',
storage_type: 'value',
gcs_credentials: 'value',
path: 'value',
});
console.log(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 an existing external storage setup, allowing for adjustments in storage parameters or credentials.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update External Storage
const response = await 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' },
});
console.log(response);Example: with gcs_credentials and path
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update External Storage
const response = await client.updateExternalStorage({
name: 'My Feed',
bucket: 'value',
storage_type: 'value',
gcs_credentials: 'value',
path: 'value',
});
console.log(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 retiring or replacing storage solutions.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete external storage
const response = await client.deleteExternalStorage({
name: 'My Feed',
});
console.log(response);Response: DeleteExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
checkExternalStorage
Verify the status and connectivity of an external storage system, ensuring reliable data access and storage integrity.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check External Storage
const response = await client.checkExternalStorage({
name: 'My Feed',
});
console.log(response);Response: CheckExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
createGuest
Register a temporary guest user, ideal for providing limited access to your system without creating a permanent account.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create Guest
const response = await client.createGuest({
user: { id: 'activity-123', custom: {} },
});
console.log(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 system, useful for initiating data imports via a web link.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create import URL
const response = await client.createImportURL({
filename: 'value',
});
console.log(response);Response: CreateImportURLResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | string | No | - |
listImports
Retrieves a list of all active and completed data imports, helping users track the status and history of their import activities.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get import
const response = await client.listImports();
console.log(response);Response: ListImportsResponse
createImport
Initiates a new data import process, allowing users to bring external data into the system for further analysis or usage.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create import
const response = await client.createImport({
mode: 'value',
path: 'value',
merge_custom: false,
});
console.log(response);Response: CreateImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | Yes | - |
| path | string | Yes | - |
| merge_custom | boolean | No | - |
listImportV2Tasks
Provides a list of all tasks associated with the version 2 import process, enabling users to monitor and manage complex data import operations.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List import v2 tasks
const response = await client.listImportV2Tasks({
state: 10,
});
console.log(response);Response: ListImportV2TasksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| state | number | No | - |
createImportV2Task
Starts a new task within the version 2 import framework, offering more granular control over individual data import operations.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create import v2 task
const response = await client.createImportV2Task({
product: 'value',
settings: { merge_custom: false },
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: CreateImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| product | string | Yes | - |
| settings | ImportV2TaskSettings | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
getImporterExternalStorage
Retrieve details about an external storage configuration. Use this method to check the settings of a previously configured external storage system.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get external storage
const response = await client.getImporterExternalStorage();
console.log(response);Response: GetExternalStorageResponse
upsertImporterExternalStorage
Create or update an external storage configuration. Use this method to ensure your external storage settings are current and correct.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert external storage
const response = await client.upsertImporterExternalStorage({
type: 'like',
aws_s3: { bucket: 'value', region: 'value', role_arn: 'value', path_prefix: 'value' },
});
console.log(response);Response: UpsertExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| aws_s3 | UpsertExternalStorageAWSS3Request | No | - |
deleteImporterExternalStorage
Remove an existing external storage configuration. Use this method when you want to disconnect or clean up unused storage settings.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete external storage
const response = await client.deleteImporterExternalStorage();
console.log(response);Response: DeleteExternalStorageResponse
validateImporterExternalStorage
Verify the connectivity and configuration of an external storage system. Use this method to test and confirm that your external storage setup is functioning properly.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Validate external storage
const response = await client.validateImporterExternalStorage();
console.log(response);Response: ValidateExternalStorageResponse
getImportV2Task
Fetches detailed information about a specific version 2 import task, allowing users to check the progress and details of their import activities.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get import v2 task
const response = await client.getImportV2Task({
id: 'activity-123',
});
console.log(response);Response: GetImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
deleteImportV2Task
Removes a specific task from the version 2 import process, useful for canceling unwanted or erroneous data import operations.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete import v2 task
const response = await client.deleteImportV2Task({
id: 'activity-123',
});
console.log(response);Response: DeleteImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
getImport
Obtains details about a specific data import, providing users with insights into the import’s configuration and status.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get import
const response = await client.getImport({
id: 'activity-123',
});
console.log(response);Response: GetImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
getOG
Retrieves Open Graph data, which can be used to enhance the display of web content when shared on social media platforms.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get OG
const response = await client.getOG({
url: 'value',
});
console.log(response);Response: GetOGResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | - |
listPermissions
Lists all permissions available to a user or within a system, helping users understand their access rights and control over data and functionalities.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List permissions
const response = await client.listPermissions();
console.log(response);Response: ListPermissionsResponse
getPermission
Retrieve the permission settings for a specific user or entity, useful for checking access rights before performing operations.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get permission
const response = await client.getPermission({
id: 'activity-123',
});
console.log(response);Response: GetCustomPermissionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
createPoll
Initiate a new poll with specified parameters, ideal for gathering feedback or opinions from a group of users.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create poll
const response = await client.createPoll({
name: 'My Feed',
user_id: 'john',
id: 'activity-123',
});
console.log(response);Example: with allow_user_suggested_options and description
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create poll
const response = await client.createPoll({
name: 'My Feed',
allow_user_suggested_options: false,
description: 'A description',
});
console.log(response);Example: with enforce_unique_vote and Custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create poll
const response = await client.createPoll({
name: 'My Feed',
enforce_unique_vote: false,
Custom: {},
});
console.log(response);Example: with is_closed and max_votes_allowed
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create poll
const response = await client.createPoll({
name: 'My Feed',
is_closed: false,
max_votes_allowed: 10,
});
console.log(response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the poll |
| Custom | Record<string, any> | No | - |
| allow_answers | boolean | No | Indicates whether users can suggest user defined answers |
| allow_user_suggested_options | boolean | No | - |
| description | string | No | A description of the poll |
| enforce_unique_vote | boolean | No | Indicates whether users can cast multiple votes |
| id | string | No | - |
| is_closed | boolean | No | Indicates whether the poll is open for voting |
| max_votes_allowed | number | 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's details, such as its title or description, to keep it relevant and up-to-date.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update poll
const response = await client.updatePoll({
id: 'activity-123',
name: 'My Feed',
user_id: 'john',
allow_answers: false,
});
console.log(response);Example: with allow_user_suggested_options and description
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update poll
const response = await client.updatePoll({
id: 'activity-123',
name: 'My Feed',
allow_user_suggested_options: false,
description: 'A description',
});
console.log(response);Example: with enforce_unique_vote and is_closed
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update poll
const response = await client.updatePoll({
id: 'activity-123',
name: 'My Feed',
enforce_unique_vote: false,
is_closed: false,
});
console.log(response);Example: with max_votes_allowed and options
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update poll
const response = await client.updatePoll({
id: 'activity-123',
name: 'My Feed',
max_votes_allowed: 10,
options: [],
});
console.log(response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Poll ID |
| name | string | Yes | Poll name |
| Custom | Record<string, any> | No | - |
| allow_answers | boolean | No | Allow answers |
| allow_user_suggested_options | boolean | No | Allow user suggested options |
| description | string | No | Poll description |
| enforce_unique_vote | boolean | No | Enforce unique vote |
| is_closed | boolean | No | Is closed |
| max_votes_allowed | number | No | Max votes allowed |
| options | []PollOptionRequest | No | Poll options |
| user | UserRequest | No | - |
| user_id | string | No | - |
| voting_visibility | string | No | Voting visibility |
queryPolls
Search and filter through existing polls based on specific criteria, helping you quickly find the polls of interest.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query polls
const response = await client.queryPolls({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query polls
const response = await client.queryPolls({
sort: [],
prev: null,
});
console.log(response);Example: with next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query polls
const response = await client.queryPolls({
next: null,
});
console.log(response);Response: QueryPollsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
| filter | Record<string, any> | No | Filter to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
getPoll
Access the details of a specific poll, essential for reviewing its content and status before engagement.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get poll
const response = await client.getPoll({
poll_id: 'poll-123',
user_id: 'john',
});
console.log(response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| user_id | string | No | - |
updatePollPartial
Make targeted updates to specific fields of a poll without altering its entire structure, useful for quick adjustments.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial update poll
const response = await client.updatePollPartial({
poll_id: 'poll-123',
user_id: 'john',
unset: [],
});
console.log(response);Example: with user and set
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial update poll
const response = await client.updatePollPartial({
poll_id: 'poll-123',
user: { id: 'activity-123', custom: {} },
set: {},
});
console.log(response);Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| set | Record<string, any> | 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 system, useful for maintaining a clean and relevant set of active polls.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete poll
const response = await client.deletePoll({
poll_id: 'poll-123',
user_id: 'john',
});
console.log(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, expanding the choices available to participants for more comprehensive feedback.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create poll option
const response = await client.createPollOption({
poll_id: 'poll-123',
text: 'Hello, world!',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with Custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create poll option
const response = await client.createPollOption({
poll_id: 'poll-123',
text: 'Hello, world!',
Custom: {},
});
console.log(response);Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| text | string | Yes | Option text |
| Custom | Record<string, any> | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
updatePollOption
Modify an existing poll option to correct or improve the available responses, ensuring clarity and accuracy.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update poll option
const response = await client.updatePollOption({
poll_id: 'poll-123',
id: 'activity-123',
text: 'Hello, world!',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with Custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update poll option
const response = await client.updatePollOption({
poll_id: 'poll-123',
id: 'activity-123',
text: 'Hello, world!',
Custom: {},
});
console.log(response);Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| id | string | Yes | Option ID |
| text | string | Yes | Option text |
| Custom | Record<string, any> | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
getPollOption
Retrieve details about a specific poll option, aiding in the analysis or review of available choices within a poll.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get poll option
const response = await client.getPollOption({
poll_id: 'poll-123',
option_id: 'value',
user_id: 'john',
});
console.log(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 a poll, useful for managing and updating active polls by eliminating outdated or incorrect choices.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete poll option
const response = await client.deletePollOption({
poll_id: 'poll-123',
option_id: 'value',
user_id: 'john',
});
console.log(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 poll, enabling you to assess poll engagement and results in real-time.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query votes
const response = await client.queryPollVotes({
poll_id: 'poll-123',
user_id: 'john',
limit: 25,
});
console.log(response);Example: with filter and sort
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query votes
const response = await client.queryPollVotes({
poll_id: 'poll-123',
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query votes
const response = await client.queryPollVotes({
poll_id: 'poll-123',
prev: null,
next: null,
});
console.log(response);Response: PollVotesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | string | Yes | - |
| user_id | string | No | - |
| filter | Record<string, any> | No | Filter to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
updatePushNotificationPreferences
Modify user preferences for receiving push notifications, ensuring users only receive relevant and desired notifications.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Push notification preferences
const response = await client.updatePushNotificationPreferences({
preferences: [],
});
console.log(response);Response: UpsertPushPreferencesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| preferences | []PushPreferenceInput | Yes | A list of push preferences for channels, calls, or the user. |
listPushProviders
Obtain a list of all available push notification providers, helpful for understanding your options and managing your notification delivery services.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List push providers
const response = await client.listPushProviders();
console.log(response);Response: ListPushProvidersResponse
upsertPushProvider
Create or update the configuration of a push notification provider, allowing you to maintain an effective notification system by adding new providers or adjusting existing ones.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert a push provider
const response = await client.upsertPushProvider({
push_provider: { name: 'My Feed', apn_auth_key: 'value' },
});
console.log(response);Response: UpsertPushProviderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| push_provider | PushProviderRequest | No | - |
deletePushProvider
Remove a push notification provider from your system, ideal for cleaning up outdated configurations or switching to a different service provider.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a push provider
const response = await client.deletePushProvider({
type: 'like',
name: 'My Feed',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| name | string | Yes | - |
getPushTemplates
Access a collection of predefined push notification templates, streamlining the process of sending consistent and branded notifications to your users.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get push notification templates
const response = await client.getPushTemplates({
push_provider_type: 'value',
push_provider_name: 'value',
});
console.log(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, enabling you to maintain up-to-date and relevant messaging for your user communications.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert a push notification template
const response = await client.upsertPushTemplate({
event_type: 'value',
push_provider_type: 'value',
enable_push: false,
push_provider_name: 'value',
});
console.log(response);Example: with template
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert a push notification template
const response = await client.upsertPushTemplate({
event_type: 'value',
push_provider_type: 'value',
template: 'value',
});
console.log(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 | boolean | No | Whether to send push notification for this event |
| push_provider_name | string | No | Push provider name |
| template | string | No | Push template |
getRateLimits
Retrieve the current rate limits applied to your API usage, helping you understand and manage your application's request throughput.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get rate limits
const response = await client.getRateLimits({
server_side: false,
android: false,
ios: false,
});
console.log(response);Example: with web and endpoints
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get rate limits
const response = await client.getRateLimits({
web: false,
endpoints: 'value',
});
console.log(response);Response: GetRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| server_side | boolean | No | - |
| android | boolean | No | - |
| ios | boolean | No | - |
| web | boolean | No | - |
| endpoints | string | No | - |
listRoles
Get a comprehensive list of all defined user roles within your application, useful for managing permissions and access control effectively.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List roles
const response = await client.listRoles();
console.log(response);Response: ListRolesResponse
createRole
Create a new role within the system to define specific permissions and access levels for users. Use this method to manage and assign roles that align with your organizational needs.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create role
const response = await client.createRole({
name: 'My Feed',
});
console.log(response);Response: CreateRoleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Role name |
deleteRole
Remove an existing role from the system to maintain an updated and efficient role management structure. Use this method when a role is no longer needed or applicable.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete role
const response = await client.deleteRole({
name: 'My Feed',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
getTask
Retrieve the current status and progress of a specific task to monitor its completion and identify potential issues. Use this method to track task performance and ensure timely updates.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get status of a task
const response = await client.getTask({
id: 'activity-123',
});
console.log(response);Response: GetTaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
uploadFile
Add a file to the server to facilitate storage and access within your application. Use this method to manage file resources and enhance document availability for users.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upload file
const response = await client.uploadFile({
file: 'value',
user: { id: 'activity-123' },
});
console.log(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 file from the server to manage storage and ensure only relevant files are retained. Use this method to free up space and maintain an organized file system.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete file
const response = await client.deleteFile({
url: 'value',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | No | - |
uploadImage
Upload an image to the server for integration into your application’s content. Use this method to manage visual assets and improve the aesthetic and functional aspects of your application.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upload image
const response = await client.uploadImage({
file: 'value',
upload_sizes: [],
user: { id: 'activity-123' },
});
console.log(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
Delete an image from the server to manage space and ensure only necessary images are stored. Use this method when an image is outdated or no longer required.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete image
const response = await client.deleteImage({
url: 'value',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | No | - |
listUserGroups
Retrieve a list of all user groups. Use this method to view all existing user groups in your system for management or auditing purposes.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List user groups
const response = await client.listUserGroups({
limit: 25,
id_gt: 'value',
created_at_gt: 'value',
});
console.log(response);Example: with team_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List user groups
const response = await client.listUserGroups({
team_id: 'value',
});
console.log(response);Response: ListUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | No | - |
| id_gt | string | No | - |
| created_at_gt | string | No | - |
| team_id | string | No | - |
createUserGroup
Establish a new user group. Use this method to organize users into a new group for easier management and permissions assignment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create user group
const response = await client.createUserGroup({
name: 'My Feed',
id: 'activity-123',
description: 'A description',
});
console.log(response);Example: with member_ids and team_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create user group
const response = await client.createUserGroup({
name: 'My Feed',
member_ids: [],
team_id: 'value',
});
console.log(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 method to quickly locate user groups that meet certain conditions or attributes.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Search user groups
const response = await client.searchUserGroups({
query: 'value',
limit: 25,
name_gt: 'value',
});
console.log(response);Example: with id_gt and team_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Search user groups
const response = await client.searchUserGroups({
query: 'value',
id_gt: 'value',
team_id: 'value',
});
console.log(response);Response: SearchUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | - |
| limit | number | No | - |
| name_gt | string | No | - |
| id_gt | string | No | - |
| team_id | string | No | - |
getUserGroup
Obtain detailed information about a specific user group. Use this method to review the properties and configuration of a particular user group.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get user group
const response = await client.getUserGroup({
id: 'activity-123',
team_id: 'value',
});
console.log(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 the attributes or membership of a user group as needed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update user group
const response = await client.updateUserGroup({
id: 'activity-123',
name: 'My Feed',
description: 'A description',
});
console.log(response);Example: with team_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update user group
const response = await client.updateUserGroup({
id: 'activity-123',
team_id: 'value',
});
console.log(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 method when a user group is no longer needed, to maintain cleanliness and organization.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete user group
const response = await client.deleteUserGroup({
id: 'activity-123',
team_id: 'value',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| team_id | string | No | - |
addUserGroupMembers
Use this method to add multiple users to a specified user group, streamlining group management and access control. Ideal for onboarding new team members or updating group memberships efficiently.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add user group members
const response = await client.addUserGroupMembers({
id: 'activity-123',
member_ids: [],
as_admin: false,
team_id: 'value',
});
console.log(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 | boolean | No | Whether to add the members as group admins. Defaults to false |
| team_id | string | No | - |
removeUserGroupMembers
This method allows you to remove multiple users from a specified user group, helping to maintain organized and current access permissions. It is useful for managing group changes when users no longer need access or have left a team.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Remove user group members
const response = await client.removeUserGroupMembers({
id: 'activity-123',
member_ids: [],
team_id: 'value',
});
console.log(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
Retrieve information about users based on specific criteria to analyze user data or make informed decisions. Use this method to efficiently filter and access user details in your application.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query users
const response = await client.queryUsers({
payload: 'value',
});
console.log(response);Response: QueryUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
updateUsers
Add or modify user information to ensure current and accurate user data within the system. Use this method to manage user profiles effectively and support proper user engagement.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert users
const response = await client.updateUsers({
users: {},
});
console.log(response);Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| users | Record<string, any> | Yes | Object containing users |
updateUsersPartial
Apply partial updates to a user's information, allowing for specific changes without overwriting the entire user profile. Use this method for targeted updates to user data, enhancing flexibility and precision.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partially update user
const response = await client.updateUsersPartial({
users: [],
});
console.log(response);Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| users | []UpdateUserPartialRequest | Yes | - |
getBlockedUsers
Retrieve a list of users that have been blocked. Use this method to monitor and manage users who are restricted from accessing certain features or areas of your application.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get list of blocked Users
const response = await client.getBlockedUsers({
user_id: 'john',
});
console.log(response);Response: GetBlockedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
blockUsers
Prevent specified users from accessing certain features or areas of your application. This method is useful for managing user behavior and maintaining community standards.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Block user
const response = await client.blockUsers({
blocked_user_id: 'value',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(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
Temporarily disable the accounts of specified users, making them inactive. Use this when you need to pause a user's access without permanently deleting their data.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Deactivate users
const response = await client.deactivateUsers({
user_ids: ['user-1', 'user-2'],
created_by_id: 'value',
mark_channels_deleted: false,
});
console.log(response);Example: with mark_messages_deleted
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Deactivate users
const response = await client.deactivateUsers({
user_ids: ['user-1', 'user-2'],
mark_messages_deleted: false,
});
console.log(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 | boolean | No | - |
| mark_messages_deleted | boolean | No | Makes messages appear to be deleted |
deleteUsers
Permanently remove users and all their associated data from your application. Use this method for irreversible actions when you need to completely eliminate a user's presence.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete Users
const response = await client.deleteUsers({
user_ids: ['user-1', 'user-2'],
calls: 'value',
conversations: 'value',
});
console.log(response);Example: with files and messages
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete Users
const response = await client.deleteUsers({
user_ids: ['user-1', 'user-2'],
files: false,
messages: 'value',
});
console.log(response);Example: with new_call_owner_id and new_channel_owner_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete Users
const response = await client.deleteUsers({
user_ids: ['user-1', 'user-2'],
new_call_owner_id: 'value',
new_channel_owner_id: 'value',
});
console.log(response);Example: with user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete Users
const response = await client.deleteUsers({
user_ids: ['user-1', 'user-2'],
user: { id: "john" },
});
console.log(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 | boolean | 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
Fetch the current live location data of users. This is useful in applications where real-time location tracking is necessary, such as delivery or ride-sharing services.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get user live locations
const response = await client.getUserLiveLocations({
user_id: 'john',
});
console.log(response);Response: SharedLocationsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
updateLiveLocation
Update the live location data for a user. Use this method to ensure that your application has the most current and accurate location information for users.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update live location
const response = await client.updateLiveLocation({
message_id: 'value',
user_id: 'john',
end_at: 10,
});
console.log(response);Example: with latitude and longitude
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update live location
const response = await client.updateLiveLocation({
message_id: 'value',
latitude: 10,
longitude: 10,
});
console.log(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
Reactivate previously deactivated user accounts, restoring their access to the application. Use this method to reinstate users who were temporarily paused.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Reactivate users
const response = await client.reactivateUsers({
user_ids: ['user-1', 'user-2'],
created_by_id: 'value',
restore_channels: false,
});
console.log(response);Example: with restore_messages
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Reactivate users
const response = await client.reactivateUsers({
user_ids: ['user-1', 'user-2'],
restore_messages: false,
});
console.log(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 | boolean | No | - |
| restore_messages | boolean | No | Restore previously deleted messages |
restoreUsers
Restore users and their data after they have been deleted, if you have a recovery mechanism in place. This is useful for recovering mistakenly deleted user accounts.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Restore users
const response = await client.restoreUsers({
user_ids: ['user-1', 'user-2'],
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
unblockUsers
Remove the block on specified users, allowing them to regain access to previously restricted features or areas. Use this to reverse previous blocking actions when a user is deemed compliant.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unblock user
const response = await client.unblockUsers({
blocked_user_id: 'value',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: UnblockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| blocked_user_id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
deactivateUser
Temporarily deactivate a single user account, suspending their access. Use this when you need to pause an individual user's account without deleting their data.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Deactivate user
const response = await client.deactivateUser({
user_id: 'john',
created_by_id: 'value',
mark_messages_deleted: false,
});
console.log(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 | boolean | No | Makes messages appear to be deleted |
exportUser
ExportUser allows you to retrieve all data associated with a specific user in a structured format, which is useful for data analysis, migration, or compliance purposes.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Export user
const response = await client.exportUser({
user_id: 'john',
});
console.log(response);Response: ExportUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
reactivateUser
ReactivateUser enables you to restore a previously deactivated user account, making it active again, which is beneficial for reinstating user access after temporary deactivation.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Reactivate user
const response = await client.reactivateUser({
user_id: 'john',
name: 'My Feed',
created_by_id: 'value',
});
console.log(response);Example: with restore_messages
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Reactivate user
const response = await client.reactivateUser({
user_id: 'john',
restore_messages: false,
});
console.log(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 | boolean | 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
interface AIImageConfig {
async?: boolean;
enabled?: boolean;
ocr_rules?: OCRRule[];
rules?: AWSRekognitionRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| ocr_rules | OCRRule[] | No | |
| rules | AWSRekognitionRule[] | No |
AITextConfig
interface AITextConfig {
async?: boolean;
enabled?: boolean;
profile?: string;
rules?: BodyguardRule[];
severity_rules?: BodyguardSeverityRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| profile | string | No | |
| rules | BodyguardRule[] | No | |
| severity_rules | BodyguardSeverityRule[] | No |
AIVideoConfig
interface AIVideoConfig {
async?: boolean;
enabled?: boolean;
rules?: AWSRekognitionRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AWSRekognitionRule[] | No |
APNConfig
interface APNConfig {
Disabled?: boolean;
auth_key?: string;
auth_type?: 'certificate' | 'token';
bundle_id?: string;
development?: boolean;
host?: string;
key_id?: string;
notification_template?: string;
p12_cert?: string;
team_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | boolean | No | |
| auth_key | string | No | |
| auth_type | 'certificate' | 'token' | No |
| bundle_id | string | No | |
| development | boolean | No | |
| host | string | No | |
| key_id | string | No | |
| notification_template | string | No | |
| p12_cert | string | No | |
| team_id | string | No |
Action
interface Action {
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
interface AddUserGroupMembersResponse {
duration: string;
user_group?: UserGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
AppResponseFields
interface AppResponseFields {
activity_metrics_config?: Record<string, any>;
allow_multi_user_devices: boolean;
allowed_flag_reasons?: string[];
async_url_enrich_enabled: boolean;
auto_translation_enabled: boolean;
before_message_send_hook_url?: string;
call_types: Record<string, any>;
campaign_enabled: boolean;
cdn_expiration_seconds: number;
channel_configs: Record<string, any>;
custom_action_handler_url: string;
datadog_info?: DataDogInfo;
disable_auth_checks: boolean;
disable_permissions_checks: boolean;
enforce_unique_usernames: string;
event_hooks: EventHook[];
file_upload_config: FileUploadConfig;
geofences?: GeofenceResponse[];
grants: Record<string, any>;
guest_user_creation_disabled: boolean;
id: number;
image_moderation_enabled: boolean;
image_moderation_labels?: string[];
image_upload_config: FileUploadConfig;
max_aggregated_activities_length: number;
moderation_audio_call_moderation_enabled: boolean;
moderation_dashboard_preferences?: ModerationDashboardPreferences;
moderation_enabled: boolean;
moderation_llm_configurability_enabled: boolean;
moderation_multitenant_blocklist_enabled: boolean;
moderation_s3_image_access_role_arn?: string;
moderation_video_call_moderation_enabled: boolean;
moderation_webhook_url: string;
multi_tenant_enabled: boolean;
name: string;
organization: string;
permission_version: string;
placement: string;
policies: Record<string, any>;
push_notifications: PushNotificationFields;
reminders_interval: number;
revoke_tokens_issued_before?: number;
sns_key: string;
sns_secret: string;
sns_topic_arn: string;
sqs_key: string;
sqs_secret: string;
sqs_url: string;
suspended: boolean;
suspended_explanation: string;
use_hook_v2: boolean;
user_response_time_enabled: boolean;
user_search_disallowed_roles: string[];
webhook_events: string[];
webhook_url: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_multi_user_devices | boolean | Yes | |
| async_url_enrich_enabled | boolean | Yes | |
| auto_translation_enabled | boolean | Yes | |
| call_types | Record<string, any> | Yes | |
| campaign_enabled | boolean | Yes | |
| cdn_expiration_seconds | number | Yes | |
| channel_configs | Record<string, any> | Yes | |
| custom_action_handler_url | string | Yes | |
| disable_auth_checks | boolean | Yes | |
| disable_permissions_checks | boolean | Yes | |
| enforce_unique_usernames | string | Yes | |
| event_hooks | EventHook[] | Yes | |
| file_upload_config | FileUploadConfig | Yes | |
| grants | Record<string, any> | Yes | |
| guest_user_creation_disabled | boolean | Yes | |
| id | number | Yes | |
| image_moderation_enabled | boolean | Yes | |
| image_upload_config | FileUploadConfig | Yes | |
| max_aggregated_activities_length | number | Yes | |
| moderation_audio_call_moderation_enabled | boolean | Yes | |
| moderation_enabled | boolean | Yes | |
| moderation_llm_configurability_enabled | boolean | Yes | |
| moderation_multitenant_blocklist_enabled | boolean | Yes | |
| moderation_video_call_moderation_enabled | boolean | Yes | |
| moderation_webhook_url | string | Yes | |
| multi_tenant_enabled | boolean | Yes | |
| name | string | Yes | |
| organization | string | Yes | |
| permission_version | string | Yes | |
| placement | string | Yes | |
| policies | Record<string, any> | Yes | |
| push_notifications | PushNotificationFields | Yes | |
| reminders_interval | number | 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 | boolean | Yes | |
| suspended_explanation | string | Yes | |
| use_hook_v2 | boolean | Yes | |
| user_response_time_enabled | boolean | Yes | |
| user_search_disallowed_roles | string[] | Yes | |
| webhook_events | string[] | Yes | |
| webhook_url | string | Yes | |
| activity_metrics_config | Record<string, any> | No | |
| allowed_flag_reasons | string[] | No | |
| before_message_send_hook_url | string | No | |
| datadog_info | DataDogInfo | No | |
| geofences | GeofenceResponse[] | No | |
| image_moderation_labels | string[] | No | |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | |
| moderation_s3_image_access_role_arn | string | No | |
| revoke_tokens_issued_before | number | No |
AsyncModerationCallbackConfig
interface AsyncModerationCallbackConfig {
mode?: 'CALLBACK_MODE_NONE' | 'CALLBACK_MODE_REST' | 'CALLBACK_MODE_TWIRP';
server_url?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| mode | 'CALLBACK_MODE_NONE' | 'CALLBACK_MODE_REST' | 'CALLBACK_MODE_TWIRP' |
| server_url | string | No |
AsyncModerationConfiguration
interface AsyncModerationConfiguration {
callback?: AsyncModerationCallbackConfig;
timeout_ms?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| timeout_ms | number | No |
AutomodPlatformCircumventionConfig
interface AutomodPlatformCircumventionConfig {
async?: boolean;
enabled?: boolean;
rules?: AutomodRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AutomodRule[] | No |
AutomodSemanticFiltersConfig
interface AutomodSemanticFiltersConfig {
async?: boolean;
enabled?: boolean;
rules?: AutomodSemanticFiltersRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AutomodSemanticFiltersRule[] | No |
AutomodToxicityConfig
interface AutomodToxicityConfig {
async?: boolean;
enabled?: boolean;
rules?: AutomodRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AutomodRule[] | No |
AzureRequest
Config for creating Azure Blob Storage storage
interface AzureRequest {
abs_account_name: string;
abs_client_id: string;
abs_client_secret: string;
abs_tenant_id: string;
}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
interface BlockListConfig {
async?: boolean;
enabled?: boolean;
match_substring?: boolean;
rules?: BlockListRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| match_substring | boolean | No | |
| rules | BlockListRule[] | No |
BlockListResponse
Block list contains restricted words
interface BlockListResponse {
created_at?: number;
id?: string;
is_leet_check_enabled: boolean;
is_plural_check_enabled: boolean;
name: string;
team?: string;
type: string;
updated_at?: number;
words: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| is_leet_check_enabled | boolean | Yes | |
| is_plural_check_enabled | boolean | Yes | |
| name | string | Yes | Block list name |
| type | string | Yes | Block list type. One of: regex, domain, domain_allowlist, email, email_allowl... |
| words | string[] | Yes | List of words to block |
| created_at | number | No | Date/time of creation |
| id | string | No | |
| team | string | No | |
| updated_at | number | No | Date/time of the last update |
BlockUsersResponse
interface BlockUsersResponse {
blocked_by_user_id: string;
blocked_user_id: string;
created_at: number;
duration: string;
}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 | number | Yes | Timestamp when the user was blocked |
| duration | string | Yes | Duration of the request in milliseconds |
BlockedUserResponse
interface BlockedUserResponse {
blocked_user: UserResponse;
blocked_user_id: string;
created_at: number;
user: UserResponse;
user_id: string;
}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 | number | Yes | |
| user | UserResponse | Yes | User who blocked another user |
| user_id | string | Yes | ID of the user who blocked another user |
BodyguardImageAnalysisConfig
interface BodyguardImageAnalysisConfig {
rules?: BodyguardRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | BodyguardRule[] | No |
ChannelResponse
Represents channel in chat
interface ChannelResponse {
auto_translation_enabled?: boolean;
auto_translation_language?: string;
blocked?: boolean;
cid: string;
config?: ChannelConfigWithInfo;
cooldown?: number;
created_at: number;
created_by?: UserResponse;
custom: Record<string, any>;
deleted_at?: number;
disabled: boolean;
filter_tags?: string[];
frozen: boolean;
hidden?: boolean;
hide_messages_before?: number;
id: string;
last_message_at?: number;
member_count?: number;
members?: ChannelMemberResponse[];
message_count?: number;
mute_expires_at?: number;
muted?: boolean;
own_capabilities?: ChannelOwnCapability[];
team?: string;
truncated_at?: number;
truncated_by?: UserResponse;
type: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | Yes | Channel CID (<type>:<id>) |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| disabled | boolean | Yes | |
| frozen | boolean | Yes | Whether channel is frozen or not |
| id | string | Yes | Channel unique ID |
| type | string | Yes | Type of the channel |
| updated_at | number | Yes | Date/time of the last update |
| auto_translation_enabled | boolean | No | Whether auto translation is enabled or not |
| auto_translation_language | string | No | Language to translate to when auto translation is active |
| blocked | boolean | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | number | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | number | No | Date/time of deletion |
| filter_tags | string[] | No | List of filter tags associated with the channel |
| hidden | boolean | No | Whether this channel is hidden by current user or not |
| hide_messages_before | number | No | Date since when the message history is accessible |
| last_message_at | number | No | Date of the last message sent |
| member_count | number | No | Number of members in the channel |
| members | ChannelMemberResponse[] | No | List of channel members (max 100) |
| message_count | number | No | Number of messages in the channel |
| mute_expires_at | number | No | Date of mute expiration |
| muted | boolean | No | Whether this channel is muted or not |
| own_capabilities | ChannelOwnCapability[] | No | List of channel capabilities of authenticated user |
| team | string | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | number | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChatPreferencesInput
interface ChatPreferencesInput {
channel_mentions?: 'all' | 'none';
default_preference?: 'all' | 'none';
direct_mentions?: 'all' | 'none';
group_mentions?: 'all' | 'none';
here_mentions?: 'all' | 'none';
role_mentions?: 'all' | 'none';
thread_replies?: 'all' | 'none';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_mentions | 'all' | 'none' | No |
| default_preference | 'all' | 'none' | No |
| direct_mentions | 'all' | 'none' | No |
| group_mentions | 'all' | 'none' | No |
| here_mentions | 'all' | 'none' | No |
| role_mentions | 'all' | 'none' | No |
| thread_replies | 'all' | 'none' | No |
CheckExternalStorageResponse
Basic response information
interface CheckExternalStorageResponse {
duration: string;
file_url: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file_url | string | Yes |
CheckPushResponse
interface CheckPushResponse {
device_errors?: Record<string, any>;
duration: string;
event_type?: string;
general_errors?: string[];
rendered_apn_template?: string;
rendered_firebase_template?: string;
rendered_message?: Record<string, any>;
skip_devices?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| device_errors | Record<string, any> | No | Object with device errors |
| event_type | string | No | The event type that was tested |
| general_errors | string[] | No | List of general errors |
| rendered_apn_template | string | No | |
| rendered_firebase_template | string | No | |
| rendered_message | Record<string, any> | No | |
| skip_devices | boolean | No | Don't require existing devices to render templates |
CheckSNSResponse
interface CheckSNSResponse {
data?: Record<string, any>;
duration: string;
error?: string;
status: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| status | string | Yes | Validation result. One of: ok, error |
| data | Record<string, any> | No | Error data |
| error | string | No | Error text |
CheckSQSResponse
interface CheckSQSResponse {
data?: Record<string, any>;
duration: string;
error?: string;
status: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| status | string | Yes | Validation result. One of: ok, error |
| data | Record<string, any> | No | Error data |
| error | string | No | Error text |
CreateBlockListResponse
Basic response information
interface CreateBlockListResponse {
blocklist?: BlockListResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
CreateExternalStorageResponse
Basic response information
interface CreateExternalStorageResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
CreateGuestResponse
interface CreateGuestResponse {
access_token: string;
duration: string;
user: UserResponse;
}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
interface CreateImportResponse {
duration: string;
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
interface CreateImportURLResponse {
duration: string;
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
interface CreateImportV2TaskResponse {
app_pk: number;
created_at: number;
duration: string;
id: string;
product: string;
settings: ImportV2TaskSettings;
state: number;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | number | Yes | |
| created_at | number | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | number | Yes | |
| updated_at | number | Yes |
CreateRoleResponse
Basic response information
interface CreateRoleResponse {
duration: string;
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
interface CreateUserGroupResponse {
duration: string;
user_group?: UserGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The created user group |
Data
interface Data {
id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DataDogInfo
interface DataDogInfo {
api_key?: string;
enabled?: boolean;
site?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| api_key | string | No | |
| enabled | boolean | No | |
| site | string | No |
DeactivateUserResponse
interface DeactivateUserResponse {
duration: string;
user?: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
DeactivateUsersResponse
Basic response information
interface DeactivateUsersResponse {
duration: string;
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
interface DeleteExternalStorageResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteImportV2TaskResponse
Basic response information
interface DeleteImportV2TaskResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteUsersResponse
interface DeleteUsersResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes | ID of the task to delete users |
DeviceResponse
Response for Device
interface DeviceResponse {
created_at: number;
disabled?: boolean;
disabled_reason?: string;
id: string;
push_provider: string;
push_provider_name?: string;
user_id: string;
voip?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Date/time of creation |
| id | string | Yes | Device ID |
| push_provider | string | Yes | Push provider |
| user_id | string | Yes | User ID |
| disabled | boolean | 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 | boolean | No | When true the token is for Apple VoIP push notifications |
ErrorResult
interface ErrorResult {
stacktrace?: string;
type: string;
version?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| stacktrace | string | No | |
| version | string | No |
EventHook
interface EventHook {
callback?: AsyncModerationCallbackConfig;
created_at?: number;
enabled?: boolean;
event_types?: string[];
hook_type?: string;
id?: string;
product?: string;
should_send_custom_events?: boolean;
sns_auth_type?: string;
sns_event_based_message_group_id_enabled?: boolean;
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?: number;
updated_at?: number;
webhook_url?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| created_at | number | No | |
| enabled | boolean | No | |
| event_types | string[] | No | |
| hook_type | string | No | |
| id | string | No | |
| product | string | No | |
| should_send_custom_events | boolean | No | |
| sns_auth_type | string | No | |
| sns_event_based_message_group_id_enabled | boolean | 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 | number | No | |
| updated_at | number | No | |
| webhook_url | string | No |
ExportUserResponse
interface ExportUserResponse {
duration: string;
messages?: MessageResponse[];
reactions?: ReactionResponse[];
user?: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| messages | MessageResponse[] | No | List of exported messages |
| reactions | ReactionResponse[] | No | List of exported reactions |
| user | UserResponse | No | Exported user object |
ExportUsersResponse
Basic response information
interface ExportUsersResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes |
FeedsPreferences
interface FeedsPreferences {
comment?: 'all' | 'none';
comment_mention?: 'all' | 'none';
comment_reaction?: 'all' | 'none';
comment_reply?: 'all' | 'none';
custom_activity_types?: Record<string, any>;
follow?: 'all' | 'none';
mention?: 'all' | 'none';
reaction?: 'all' | 'none';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | 'all' | 'none' | No |
| comment_mention | 'all' | 'none' | No |
| comment_reaction | 'all' | 'none' | No |
| comment_reply | 'all' | 'none' | No |
| custom_activity_types | Record<string, any> | No | Push notification preferences for custom activity types. Map of activity type... |
| follow | 'all' | 'none' | No |
| mention | 'all' | 'none' | No |
| reaction | 'all' | 'none' | No |
Field
interface Field {
short: boolean;
title: string;
value: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | boolean | Yes | |
| title | string | Yes | |
| value | string | Yes |
FileUploadConfig
interface FileUploadConfig {
allowed_file_extensions?: string[];
allowed_mime_types?: string[];
blocked_file_extensions?: string[];
blocked_mime_types?: string[];
size_limit: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| size_limit | number | Yes | |
| allowed_file_extensions | string[] | No | |
| allowed_mime_types | string[] | No | |
| blocked_file_extensions | string[] | No | |
| blocked_mime_types | string[] | No |
FileUploadResponse
interface FileUploadResponse {
duration: string;
file?: string;
thumb_url?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file | string | No | URL to the uploaded asset. Should be used to put to asset_url attachment field |
| thumb_url | string | No | URL of the file thumbnail for supported file formats. Should be put to `thumb... |
FirebaseConfig
interface FirebaseConfig {
Disabled?: boolean;
apn_template?: string;
credentials_json?: string;
data_template?: string;
notification_template?: string;
server_key?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | boolean | No | |
| apn_template | string | No | |
| credentials_json | string | No | |
| data_template | string | No | |
| notification_template | string | No | |
| server_key | string | No |
FullUserResponse
interface FullUserResponse {
avg_response_time?: number;
ban_expires?: number;
banned: boolean;
blocked_user_ids: string[];
bypass_moderation?: boolean;
channel_mutes: ChannelMute[];
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
devices: DeviceResponse[];
id: string;
image?: string;
invisible: boolean;
language: string;
last_active?: number;
latest_hidden_channels?: string[];
mutes: UserMuteResponse[];
name?: string;
online: boolean;
privacy_settings?: PrivacySettingsResponse;
revoke_tokens_issued_before?: number;
role: string;
shadow_banned: boolean;
teams: string[];
teams_role?: Record<string, any>;
total_unread_count: number;
unread_channels: number;
unread_count: number;
unread_threads: number;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | |
| blocked_user_ids | string[] | Yes | |
| channel_mutes | ChannelMute[] | Yes | |
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| devices | DeviceResponse[] | Yes | |
| id | string | Yes | |
| invisible | boolean | Yes | |
| language | string | Yes | |
| mutes | UserMuteResponse[] | Yes | |
| online | boolean | Yes | |
| role | string | Yes | |
| shadow_banned | boolean | Yes | |
| teams | string[] | Yes | |
| total_unread_count | number | Yes | |
| unread_channels | number | Yes | |
| unread_count | number | Yes | |
| unread_threads | number | Yes | |
| updated_at | number | Yes | |
| avg_response_time | number | No | |
| ban_expires | number | No | |
| bypass_moderation | boolean | No | |
| deactivated_at | number | No | |
| deleted_at | number | No | |
| image | string | No | |
| last_active | number | No | |
| latest_hidden_channels | string[] | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| revoke_tokens_issued_before | number | No | |
| teams_role | Record<string, any> | No |
GetApplicationResponse
Basic response information
interface GetApplicationResponse {
app: AppResponseFields;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app | AppResponseFields | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
GetBlockListResponse
Response for get block list
interface GetBlockListResponse {
blocklist?: BlockListResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| blocklist | BlockListResponse | No | Block list object |
GetBlockedUsersResponse
interface GetBlockedUsersResponse {
blocks: BlockedUserResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocks | BlockedUserResponse[] | Yes | Array of blocked user object |
| duration | string | Yes | Duration of the request in milliseconds |
GetCustomPermissionResponse
Basic response information
interface GetCustomPermissionResponse {
duration: string;
permission: Permission;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| permission | Permission | Yes |
GetExternalStorageAWSS3Response
interface GetExternalStorageAWSS3Response {
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
interface GetExternalStorageResponse {
aws_s3?: GetExternalStorageAWSS3Response;
created_at: number;
duration: string;
type: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| type | string | Yes | |
| updated_at | number | Yes | |
| aws_s3 | GetExternalStorageAWSS3Response | No |
GetImportResponse
Basic response information
interface GetImportResponse {
duration: string;
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
interface GetImportV2TaskResponse {
app_pk: number;
created_at: number;
duration: string;
id: string;
product: string;
result?: Record<string, any>;
settings: ImportV2TaskSettings;
state: number;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | number | Yes | |
| created_at | number | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | number | Yes | |
| updated_at | number | Yes | |
| result | Record<string, any> | No |
GetOGResponse
interface GetOGResponse {
actions?: Action[];
asset_url?: string;
author_icon?: string;
author_link?: string;
author_name?: string;
color?: string;
custom: Record<string, any>;
duration: string;
fallback?: string;
fields?: Field[];
footer?: string;
footer_icon?: string;
giphy?: Images;
image_url?: string;
og_scrape_url?: string;
original_height?: number;
original_width?: number;
pretext?: string;
text?: string;
thumb_url?: string;
title?: string;
title_link?: string;
type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| duration | string | Yes | |
| actions | Action[] | 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 | Field[] | 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 | number | No | |
| original_width | number | 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
interface GetPushTemplatesResponse {
duration: string;
templates: PushTemplateResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| templates | PushTemplateResponse[] | Yes |
GetRateLimitsResponse
interface GetRateLimitsResponse {
android?: Record<string, any>;
duration: string;
ios?: Record<string, any>;
server_side?: Record<string, any>;
web?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| android | Record<string, any> | No | Map of endpoint rate limits for the Android platform |
| ios | Record<string, any> | No | Map of endpoint rate limits for the iOS platform |
| server_side | Record<string, any> | No | Map of endpoint rate limits for the server-side platform |
| web | Record<string, any> | No | Map of endpoint rate limits for the web platform |
GetTaskResponse
interface GetTaskResponse {
created_at: number;
duration: string;
error?: ErrorResult;
result?: Record<string, any>;
status: string;
task_id: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| duration | string | Yes | |
| status | string | Yes | Current status of task |
| task_id | string | Yes | ID of task |
| updated_at | number | Yes | |
| error | ErrorResult | No | Error produced by task |
| result | Record<string, any> | No | Result produced by task after completion |
GetUserGroupResponse
Response for getting a user group
interface GetUserGroupResponse {
duration: string;
user_group?: UserGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The user group |
GoogleVisionConfig
interface GoogleVisionConfig {
enabled?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | No |
HuaweiConfig
interface HuaweiConfig {
Disabled?: boolean;
id?: string;
secret?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | boolean | No | |
| id | string | No | |
| secret | string | No |
ImageSize
interface ImageSize {
crop?: string;
height?: number;
resize?: string;
width?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | string | No | Crop mode. One of: top, bottom, left, right, center |
| height | number | No | Target image height |
| resize | string | No | Resize method. One of: clip, crop, scale, fill |
| width | number | No | Target image width |
ImageUploadResponse
interface ImageUploadResponse {
duration: string;
file?: string;
thumb_url?: string;
upload_sizes?: ImageSize[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file | string | No | |
| thumb_url | string | No | |
| upload_sizes | ImageSize[] | No | Array of image size configurations |
Images
interface Images {
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
interface ImportTask {
created_at: number;
history: ImportTaskHistory[];
id: string;
mode: string;
path: string;
size?: number;
state: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| history | ImportTaskHistory[] | Yes | |
| id | string | Yes | |
| mode | string | Yes | |
| path | string | Yes | |
| state | string | Yes | |
| updated_at | number | Yes | |
| size | number | No |
ImportV2TaskItem
interface ImportV2TaskItem {
app_pk: number;
created_at: number;
id: string;
product: string;
result?: Record<string, any>;
settings: ImportV2TaskSettings;
state: number;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | number | Yes | |
| created_at | number | Yes | |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | number | Yes | |
| updated_at | number | Yes | |
| result | Record<string, any> | No |
ImportV2TaskSettings
interface ImportV2TaskSettings {
merge_custom?: boolean;
mode?: string;
path?: string;
s3?: ImportV2TaskSettingsS3;
skip_references_check?: boolean;
source?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| merge_custom | boolean | No | |
| mode | string | No | |
| path | string | No | |
| s3 | ImportV2TaskSettingsS3 | No | |
| skip_references_check | boolean | No | |
| source | string | No |
ImportV2TaskSettingsS3
interface ImportV2TaskSettingsS3 {
bucket?: string;
dir?: string;
region?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | No | |
| dir | string | No | |
| region | string | No |
LLMConfig
interface LLMConfig {
app_context?: string;
async?: boolean;
enabled?: boolean;
rules?: LLMRule[];
severity_descriptions?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | string | No | |
| async | boolean | No | |
| enabled | boolean | No | |
| rules | LLMRule[] | No | |
| severity_descriptions | Record<string, any> | No |
ListBlockListResponse
Basic response information
interface ListBlockListResponse {
blocklists: BlockListResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklists | BlockListResponse[] | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
ListDevicesResponse
List devices response
interface ListDevicesResponse {
devices: DeviceResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| devices | DeviceResponse[] | Yes | List of devices |
| duration | string | Yes |
ListExternalStorageResponse
Basic response information
interface ListExternalStorageResponse {
duration: string;
external_storages: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| external_storages | Record<string, any> | Yes |
ListImportV2TasksResponse
Basic response information
interface ListImportV2TasksResponse {
duration: string;
import_tasks: ImportV2TaskItem[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_tasks | ImportV2TaskItem[] | Yes | |
| next | string | No | |
| prev | string | No |
ListImportsResponse
Basic response information
interface ListImportsResponse {
duration: string;
import_tasks: ImportTask[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_tasks | ImportTask[] | Yes |
ListPermissionsResponse
Basic response information
interface ListPermissionsResponse {
duration: string;
permissions: Permission[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| permissions | Permission[] | Yes |
ListPushProvidersResponse
Basic response information
interface ListPushProvidersResponse {
duration: string;
push_providers: PushProviderResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| push_providers | PushProviderResponse[] | Yes |
ListRolesResponse
Basic response information
interface ListRolesResponse {
duration: string;
roles: Role[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| roles | Role[] | Yes |
ListUserGroupsResponse
Response for listing user groups
interface ListUserGroupsResponse {
duration: string;
user_groups: UserGroupResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_groups | UserGroupResponse[] | Yes | List of user groups |
MessageResponse
Represents any chat message
interface MessageResponse {
attachments: Attachment[];
cid: string;
command?: string;
created_at: number;
custom: Record<string, any>;
deleted_at?: number;
deleted_for_me?: boolean;
deleted_reply_count: number;
draft?: DraftResponse;
html: string;
i18n?: Record<string, any>;
id: string;
image_labels?: Record<string, any>;
latest_reactions: ReactionResponse[];
member?: ChannelMemberResponse;
mentioned_channel: boolean;
mentioned_group_ids?: string[];
mentioned_here: boolean;
mentioned_roles?: string[];
mentioned_users: UserResponse[];
message_text_updated_at?: number;
mml?: string;
moderation?: ModerationV2Response;
own_reactions: ReactionResponse[];
parent_id?: string;
pin_expires?: number;
pinned: boolean;
pinned_at?: number;
pinned_by?: UserResponse;
poll?: PollResponseData;
poll_id?: string;
quoted_message?: MessageResponse;
quoted_message_id?: string;
reaction_counts: Record<string, any>;
reaction_groups?: Record<string, any>;
reaction_scores: Record<string, any>;
reminder?: ReminderResponseData;
reply_count: number;
restricted_visibility: string[];
shadowed: boolean;
shared_location?: SharedLocationResponseData;
show_in_channel?: boolean;
silent: boolean;
text: string;
thread_participants?: UserResponse[];
type: string;
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | Yes | Array of message attachments |
| cid | string | Yes | Channel unique identifier in <type>:<id> format |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | |
| deleted_reply_count | number | Yes | |
| html | string | Yes | Contains HTML markup of the message. Can only be set when using server-side API |
| id | string | Yes | Message ID is unique string identifier of the message |
| latest_reactions | ReactionResponse[] | Yes | List of 10 latest reactions to this message |
| mentioned_channel | boolean | Yes | Whether the message mentioned the channel tag |
| mentioned_here | boolean | Yes | Whether the message mentioned online users with @here tag |
| mentioned_users | UserResponse[] | Yes | List of mentioned users |
| own_reactions | ReactionResponse[] | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | boolean | Yes | Whether message is pinned or not |
| reaction_counts | Record<string, any> | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Record<string, any> | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | number | Yes | Number of replies to this message |
| restricted_visibility | string[] | Yes | A list of user ids that have restricted visibility to the message, if the lis... |
| shadowed | boolean | Yes | Whether the message was shadowed or not |
| silent | boolean | Yes | Whether message is silent or not |
| text | string | Yes | Text of the message. Should be empty if mml is provided |
| type | string | Yes | Contains type of the message. One of: regular, ephemeral, error, reply, syste... |
| updated_at | number | Yes | Date/time of the last update |
| user | UserResponse | Yes | Sender of the message. Required when using server-side API |
| command | string | No | Contains provided slash command |
| deleted_at | number | No | Date/time of deletion |
| deleted_for_me | boolean | No | |
| draft | DraftResponse | No | |
| i18n | Record<string, any> | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Record<string, any> | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | string[] | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | string[] | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | number | No | |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | number | No | Date when pinned message expires |
| pinned_at | number | No | Date when message got pinned |
| pinned_by | UserResponse | No | Contains user who pinned the message |
| poll | PollResponseData | No | |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message | MessageResponse | No | Contains quoted message |
| quoted_message_id | string | No | |
| reaction_groups | Record<string, any> | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | boolean | No | Whether thread reply should be shown in the channel as well |
| thread_participants | UserResponse[] | No | List of users who participate in thread |
ModerationConfig
interface ModerationConfig {
ai_image_config?: AIImageConfig;
ai_image_lite_config?: BodyguardImageAnalysisConfig;
ai_text_config?: AITextConfig;
ai_video_config?: AIVideoConfig;
async?: boolean;
automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
automod_toxicity_config?: AutomodToxicityConfig;
block_list_config?: BlockListConfig;
created_at?: number;
google_vision_config?: GoogleVisionConfig;
key?: string;
llm_config?: LLMConfig;
supported_video_call_harm_types?: string[];
team?: string;
updated_at?: number;
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 | boolean | 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 | number | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | string | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | string[] | No | |
| team | string | No | |
| updated_at | number | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationDashboardPreferences
interface ModerationDashboardPreferences {
allowed_moderation_action_reasons?: string[];
async_review_queue_upsert?: boolean;
disable_audit_logs?: boolean;
disable_flagging_reviewed_entity?: boolean;
escalation_queue_enabled?: boolean;
escalation_reasons?: string[];
flag_user_on_flagged_content?: boolean;
keyframe_classifications_map?: Record<string, any>;
media_queue_blur_enabled?: boolean;
overview_dashboard?: OverviewDashboardConfig;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allowed_moderation_action_reasons | string[] | No | |
| async_review_queue_upsert | boolean | No | |
| disable_audit_logs | boolean | No | |
| disable_flagging_reviewed_entity | boolean | No | |
| escalation_queue_enabled | boolean | No | |
| escalation_reasons | string[] | No | |
| flag_user_on_flagged_content | boolean | No | |
| keyframe_classifications_map | Record<string, any> | No | |
| media_queue_blur_enabled | boolean | No | |
| overview_dashboard | OverviewDashboardConfig | No |
OnlyUserID
interface OnlyUserID {
id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
OverviewDashboardConfig
interface OverviewDashboardConfig {
default_date_range_days?: number;
visible_charts?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| default_date_range_days | number | No | |
| visible_charts | string[] | No |
PagerRequest
interface PagerRequest {
limit?: number;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | number | No | |
| next | string | No | |
| prev | string | No |
Permission
interface Permission {
action: string;
condition?: Record<string, any>;
custom: boolean;
description: string;
id: string;
level: string;
name: string;
owner: boolean;
same_team: boolean;
tags: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Action name this permission is for (e.g. SendMessage) |
| custom | boolean | 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 | boolean | Yes | Whether this permission applies to resource owner or not |
| same_team | boolean | Yes | Whether this permission applies to teammates (multi-tenancy mode only) |
| tags | string[] | Yes | List of tags of the permission |
| condition | Record<string, any> | No | MongoDB style condition which decides whether or not the permission is granted |
PollOptionInput
interface PollOptionInput {
custom?: Record<string, any>;
text?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | No | |
| text | string | No |
PollOptionRequest
interface PollOptionRequest {
custom?: Record<string, any>;
id: string;
text?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| custom | Record<string, any> | No | |
| text | string | No |
PollOptionResponse
interface PollOptionResponse {
duration: string;
poll_option: PollOptionResponseData;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll_option | PollOptionResponseData | Yes | Poll option |
PollOptionResponseData
interface PollOptionResponseData {
custom: Record<string, any>;
id: string;
text: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| id | string | Yes | |
| text | string | Yes |
PollResponse
interface PollResponse {
duration: string;
poll: PollResponseData;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | Yes | Poll |
PollResponseData
interface PollResponseData {
allow_answers: boolean;
allow_user_suggested_options: boolean;
answers_count: number;
created_at: number;
created_by?: UserResponse;
created_by_id: string;
custom: Record<string, any>;
description: string;
enforce_unique_vote: boolean;
id: string;
is_closed?: boolean;
latest_answers: PollVoteResponseData[];
latest_votes_by_option: Record<string, any>;
max_votes_allowed?: number;
name: string;
options: PollOptionResponseData[];
own_votes: PollVoteResponseData[];
updated_at: number;
vote_count: number;
vote_counts_by_option: Record<string, any>;
voting_visibility: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | boolean | Yes | |
| allow_user_suggested_options | boolean | Yes | |
| answers_count | number | Yes | |
| created_at | number | Yes | |
| created_by_id | string | Yes | |
| custom | Record<string, any> | Yes | |
| description | string | Yes | |
| enforce_unique_vote | boolean | Yes | |
| id | string | Yes | |
| latest_answers | PollVoteResponseData[] | Yes | |
| latest_votes_by_option | Record<string, any> | Yes | |
| name | string | Yes | |
| options | PollOptionResponseData[] | Yes | |
| own_votes | PollVoteResponseData[] | Yes | |
| updated_at | number | Yes | |
| vote_count | number | Yes | |
| vote_counts_by_option | Record<string, any> | Yes | |
| voting_visibility | string | Yes | |
| created_by | UserResponse | No | |
| is_closed | boolean | No | |
| max_votes_allowed | number | No |
PollVoteResponseData
interface PollVoteResponseData {
answer_text?: string;
created_at: number;
id: string;
is_answer?: boolean;
option_id: string;
poll_id: string;
updated_at: number;
user?: UserResponse;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| id | string | Yes | |
| option_id | string | Yes | |
| poll_id | string | Yes | |
| updated_at | number | Yes | |
| answer_text | string | No | |
| is_answer | boolean | No | |
| user | UserResponse | No | |
| user_id | string | No |
PollVotesResponse
interface PollVotesResponse {
duration: string;
next?: string;
prev?: string;
votes: PollVoteResponseData[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| votes | PollVoteResponseData[] | Yes | Poll votes |
| next | string | No | |
| prev | string | No |
PrivacySettingsResponse
interface PrivacySettingsResponse {
delivery_receipts?: DeliveryReceiptsResponse;
read_receipts?: ReadReceiptsResponse;
typing_indicators?: TypingIndicatorsResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushConfig
interface PushConfig {
offline_only?: boolean;
version: 'v1' | 'v2' | 'v3';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| version | 'v1' | 'v2' | 'v3' |
| offline_only | boolean | No |
PushPreferenceInput
interface PushPreferenceInput {
call_level?: 'all' | 'none' | 'default';
channel_cid?: string;
chat_level?: 'all' | 'mentions' | 'direct_mentions' | 'all_mentions' | 'none' | 'default';
chat_preferences?: ChatPreferencesInput;
disabled_until?: number;
feeds_level?: 'all' | 'none' | 'default';
feeds_preferences?: FeedsPreferences;
remove_disable?: boolean;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_level | 'all' | 'none' | 'default' |
| channel_cid | string | No | Set the push preferences for a specific channel. If empty it sets the default... |
| chat_level | 'all' | 'mentions' | 'direct_mentions' |
| chat_preferences | ChatPreferencesInput | No | |
| disabled_until | number | No | Disable push notifications till a certain time |
| feeds_level | 'all' | 'none' | 'default' |
| feeds_preferences | FeedsPreferences | No | Set granular feeds preferences for reactions, comments, new followers, mentio... |
| remove_disable | boolean | 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
interface PushProvider {
apn_auth_key?: string;
apn_auth_type?: string;
apn_development?: boolean;
apn_host?: string;
apn_key_id?: string;
apn_notification_template?: string;
apn_p12_cert?: string;
apn_team_id?: string;
apn_topic?: string;
created_at: number;
description?: string;
disabled_at?: number;
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?: PushTemplate[];
type: string;
updated_at: number;
xiaomi_app_secret?: string;
xiaomi_package_name?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| name | string | Yes | |
| type | string | Yes | |
| updated_at | number | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | boolean | 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 | number | 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 | PushTemplate[] | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushProviderRequest
interface PushProviderRequest {
apn_auth_key?: string;
apn_auth_type?: string;
apn_development?: boolean;
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?: number;
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 | boolean | 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 | number | 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
interface PushProviderResponse {
apn_auth_key?: string;
apn_auth_type?: string;
apn_development?: boolean;
apn_host?: string;
apn_key_id?: string;
apn_p12_cert?: string;
apn_sandbox_certificate?: boolean;
apn_supports_remote_notifications?: boolean;
apn_supports_voip_notifications?: boolean;
apn_team_id?: string;
apn_topic?: string;
created_at: number;
description?: string;
disabled_at?: number;
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: number;
xiaomi_app_secret?: string;
xiaomi_package_name?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| name | string | Yes | |
| type | string | Yes | |
| updated_at | number | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | boolean | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_p12_cert | string | No | |
| apn_sandbox_certificate | boolean | No | |
| apn_supports_remote_notifications | boolean | No | |
| apn_supports_voip_notifications | boolean | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | number | 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
interface PushTemplate {
created_at: number;
enable_push: boolean;
event_type: 'message.new' | 'message.updated' | 'reaction.new' | 'notification.reminder_due' | 'feeds.activity.added' | 'feeds.comment.added' | 'feeds.activity.reaction.added' | 'feeds.comment.reaction.added' | 'feeds.follow.created' | 'feeds.notification_feed.updated';
template?: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| enable_push | boolean | Yes | |
| event_type | 'message.new' | 'message.updated' | 'reaction.new' |
| updated_at | number | Yes | |
| template | string | No |
PushTemplateResponse
interface PushTemplateResponse {
created_at: number;
enable_push: boolean;
event_type: string;
push_provider_internal_id: string;
template?: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Time when the template was created |
| enable_push | boolean | 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 | number | Yes | Time when the template was last updated |
| template | string | No | The push notification template |
QueryPollsResponse
interface QueryPollsResponse {
duration: string;
next?: string;
polls: PollResponseData[];
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| polls | PollResponseData[] | Yes | Polls data returned by the query |
| next | string | No | |
| prev | string | No |
QueryUsersResponse
interface QueryUsersResponse {
duration: string;
users: FullUserResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| users | FullUserResponse[] | Yes | Array of users as result of filters applied. |
ReactionResponse
interface ReactionResponse {
created_at: number;
custom: Record<string, any>;
message_id: string;
score: number;
type: string;
updated_at: number;
user: UserResponse;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| message_id | string | Yes | Message ID |
| score | number | Yes | Score of the reaction |
| type | string | Yes | Type of reaction |
| updated_at | number | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | string | Yes | User ID |
ReactivateUserResponse
interface ReactivateUserResponse {
duration: string;
user?: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
ReactivateUsersResponse
Basic response information
interface ReactivateUsersResponse {
duration: string;
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
interface RemoveUserGroupMembersResponse {
duration: string;
user_group?: UserGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
Response
Basic response information
interface Response {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
Role
interface Role {
created_at: number;
custom: boolean;
name: string;
scopes: string[];
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Date/time of creation |
| custom | boolean | Yes | Whether this is a custom role or built-in |
| name | string | Yes | Unique role name |
| scopes | string[] | Yes | List of scopes where this role is currently present. .app means that role i... |
| updated_at | number | Yes | Date/time of the last update |
S3Request
Config for creating Amazon S3 storage.
interface S3Request {
s3_api_key?: string;
s3_custom_endpoint_url?: string;
s3_region: string;
s3_secret?: string;
}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
interface SearchUserGroupsResponse {
duration: string;
user_groups: UserGroupResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_groups | UserGroupResponse[] | Yes | List of matching user groups |
SharedLocationResponse
interface SharedLocationResponse {
channel?: ChannelResponse;
channel_cid: string;
created_at: number;
created_by_device_id: string;
duration: string;
end_at?: number;
latitude: number;
longitude: number;
message?: MessageResponse;
message_id: string;
updated_at: number;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | Channel CID |
| created_at | number | Yes | Date/time of creation |
| created_by_device_id | string | Yes | Device ID that created the live location |
| duration | string | Yes | |
| latitude | number | Yes | Latitude coordinate |
| longitude | number | Yes | Longitude coordinate |
| message_id | string | Yes | Message ID |
| updated_at | number | Yes | Date/time of the last update |
| user_id | string | Yes | User ID |
| channel | ChannelResponse | No | |
| end_at | number | No | Time when the live location expires |
| message | MessageResponse | No |
SharedLocationResponseData
interface SharedLocationResponseData {
channel?: ChannelResponse;
channel_cid: string;
created_at: number;
created_by_device_id: string;
end_at?: number;
latitude: number;
longitude: number;
message?: MessageResponse;
message_id: string;
updated_at: number;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | number | Yes | |
| created_by_device_id | string | Yes | |
| latitude | number | Yes | |
| longitude | number | Yes | |
| message_id | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| channel | ChannelResponse | No | |
| end_at | number | No | |
| message | MessageResponse | No |
SharedLocationsResponse
interface SharedLocationsResponse {
active_live_locations: SharedLocationResponseData[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_live_locations | SharedLocationResponseData[] | Yes | |
| duration | string | Yes |
SortParamRequest
interface SortParamRequest {
direction?: number;
field?: string;
type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | string | No | Name of field to sort by |
| type | string | No | Type of field to sort by. Empty string or omitted means string type (default)... |
Time
interface Time {
}UnblockUsersResponse
interface UnblockUsersResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
UpdateBlockListResponse
Basic response information
interface UpdateBlockListResponse {
blocklist?: BlockListResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
UpdateExternalStorageResponse
Basic response information
interface UpdateExternalStorageResponse {
bucket: string;
duration: string;
name: string;
path: string;
type: 's3' | 'gcs' | 'abs';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| name | string | Yes | |
| path | string | Yes | |
| type | 's3' | 'gcs' | 'abs' |
UpdateUserGroupResponse
Response for updating a user group
interface UpdateUserGroupResponse {
duration: string;
user_group?: UserGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
UpdateUserPartialRequest
interface UpdateUserPartialRequest {
id: string;
set?: Record<string, any>;
unset?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID to update |
| set | Record<string, any> | No | |
| unset | string[] | No |
UpdateUsersResponse
interface UpdateUsersResponse {
duration: string;
membership_deletion_task_id: string;
users: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| membership_deletion_task_id | string | Yes | |
| users | Record<string, any> | Yes | Object containing users |
UpsertExternalStorageAWSS3Request
interface UpsertExternalStorageAWSS3Request {
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
interface UpsertExternalStorageResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
UpsertPushPreferencesResponse
interface UpsertPushPreferencesResponse {
duration: string;
user_channel_preferences: Record<string, any>;
user_preferences: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user_channel_preferences | Record<string, any> | Yes | The channel specific push notification preferences, only returned for channel... |
| user_preferences | Record<string, any> | Yes | The user preferences, always returned regardless if you edited it |
UpsertPushProviderResponse
Basic response information
interface UpsertPushProviderResponse {
duration: string;
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
interface UpsertPushTemplateResponse {
duration: string;
template?: PushTemplateResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| template | PushTemplateResponse | No |
User
interface User {
data?: Record<string, any>;
id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | Record<string, any> | No |
UserGroupResponse
interface UserGroupResponse {
created_at: number;
created_by?: string;
description?: string;
id: string;
members?: UserGroupMember[];
name: string;
team_id?: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| updated_at | number | Yes | |
| created_by | string | No | |
| description | string | No | |
| members | UserGroupMember[] | No | |
| team_id | string | No |
UserRequest
User request object
interface UserRequest {
custom?: Record<string, any>;
id: string;
image?: string;
invisible?: boolean;
language?: string;
name?: string;
privacy_settings?: PrivacySettingsResponse;
role?: string;
teams?: string[];
teams_role?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | Record<string, any> | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | boolean | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | string | No | User's global role |
| teams | string[] | No | List of teams the user belongs to |
| teams_role | Record<string, any> | No | Map of team-specific roles for the user |
UserResponse
User response object
interface UserResponse {
avg_response_time?: number;
ban_expires?: number;
banned: boolean;
blocked_user_ids: string[];
bypass_moderation?: boolean;
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
devices?: DeviceResponse[];
id: string;
image?: string;
invisible: boolean;
language: string;
last_active?: number;
name?: string;
online: boolean;
privacy_settings?: PrivacySettingsResponse;
push_notifications?: PushNotificationSettingsResponse;
revoke_tokens_issued_before?: number;
role: string;
shadow_banned: boolean;
teams: string[];
teams_role?: Record<string, any>;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | Whether a user is banned or not |
| blocked_user_ids | string[] | Yes | |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | boolean | Yes | |
| language | string | Yes | Preferred language of a user |
| online | boolean | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | boolean | Yes | Whether a user is shadow banned |
| teams | string[] | Yes | List of teams user is a part of |
| updated_at | number | Yes | Date/time of the last update |
| avg_response_time | number | No | |
| ban_expires | number | No | Date when ban expires |
| bypass_moderation | boolean | No | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| devices | DeviceResponse[] | No | List of devices user is using |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | number | No | Revocation date for tokens |
| teams_role | Record<string, any> | No |
ValidateExternalStorageResponse
Basic response information
interface ValidateExternalStorageResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
VelocityFilterConfig
interface VelocityFilterConfig {
advanced_filters?: boolean;
async?: boolean;
cascading_actions?: boolean;
cids_per_user?: number;
enabled?: boolean;
first_message_only?: boolean;
rules?: VelocityFilterConfigRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | boolean | No | |
| async | boolean | No | |
| cascading_actions | boolean | No | |
| cids_per_user | number | No | |
| enabled | boolean | No | |
| first_message_only | boolean | No | |
| rules | VelocityFilterConfigRule[] | No |
VideoCallRuleConfig
interface VideoCallRuleConfig {
flag_all_labels?: boolean;
flagged_labels?: string[];
rules?: HarmConfig[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | boolean | No | |
| flagged_labels | string[] | No | |
| rules | HarmConfig[] | No |
XiaomiConfig
interface XiaomiConfig {
Disabled?: boolean;
package_name?: string;
secret?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | boolean | No | |
| package_name | string | No | |
| secret | string | No |