Appearance
Common
About 15840 wordsAbout 53 min
Python SDK - Chat API
Table of Contents
- get_app
- update_app
- list_block_lists
- create_block_list
- get_block_list
- update_block_list
- delete_block_list
- check_push
- check_sns
- check_sqs
- list_devices
- create_device
- delete_device
- export_users
- list_external_storage
- create_external_storage
- update_external_storage
- delete_external_storage
- check_external_storage
- create_guest
- create_import_url
- list_imports
- create_import
- list_import_v2_tasks
- create_import_v2_task
- get_importer_external_storage
- upsert_importer_external_storage
- delete_importer_external_storage
- validate_importer_external_storage
- get_import_v2_task
- delete_import_v2_task
- get_import
- get_og
- list_permissions
- get_permission
- create_poll
- update_poll
- query_polls
- get_poll
- update_poll_partial
- delete_poll
- create_poll_option
- update_poll_option
- get_poll_option
- delete_poll_option
- query_poll_votes
- update_push_notification_preferences
- list_push_providers
- upsert_push_provider
- delete_push_provider
- get_push_templates
- upsert_push_template
- get_rate_limits
- list_roles
- create_role
- delete_role
- get_task
- upload_file
- delete_file
- upload_image
- delete_image
- list_user_groups
- create_user_group
- search_user_groups
- get_user_group
- update_user_group
- delete_user_group
- add_user_group_members
- remove_user_group_members
- query_users
- update_users
- update_users_partial
- get_blocked_users
- block_users
- deactivate_users
- delete_users
- get_user_live_locations
- update_live_location
- reactivate_users
- restore_users
- unblock_users
- deactivate_user
- export_user
- reactivate_user
- Types Reference
get_app
Retrieve the current application settings to understand or verify the configuration. Use this method when you need to view the existing app settings without making changes.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get App Settings
response = client.get_app()
print(response)Response: GetApplicationResponse
update_app
Modify the application settings to align with new requirements or preferences. Use this method when you need to update the app configuration.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update App Settings
response = client.update_app(
activity_metrics_config={},
allowed_flag_reasons=[],
apn_config={"Disabled": False}
)
print(response)Example: with async_moderation_config and async_url_enrich_enabled
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update App Settings
response = client.update_app(
async_moderation_config={"callback": {"mode": "value"}},
async_url_enrich_enabled=False
)
print(response)Example: with auto_translation_enabled and before_message_send_hook_url
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update App Settings
response = client.update_app(
auto_translation_enabled=False,
before_message_send_hook_url="value"
)
print(response)Example: with cdn_expiration_seconds and channel_hide_members_only
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update App Settings
response = client.update_app(
cdn_expiration_seconds=10,
channel_hide_members_only=False
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_metrics_config | dict | No | - |
| allowed_flag_reasons | []string | No | - |
| apn_config | APNConfig | No | - |
| async_moderation_config | AsyncModerationConfiguration | No | - |
| async_url_enrich_enabled | bool | No | - |
| auto_translation_enabled | bool | No | - |
| before_message_send_hook_url | str | No | - |
| cdn_expiration_seconds | int | No | - |
| channel_hide_members_only | bool | No | - |
| custom_action_handler_url | str | No | - |
| datadog_info | DataDogInfo | No | - |
| disable_auth_checks | bool | No | - |
| disable_permissions_checks | bool | No | - |
| enforce_unique_usernames | str | No | - |
| event_hooks | []EventHook | No | - |
| feeds_moderation_enabled | bool | No | - |
| feeds_v2_region | str | No | - |
| file_upload_config | FileUploadConfig | No | - |
| firebase_config | FirebaseConfig | No | - |
| grants | dict | No | - |
| guest_user_creation_disabled | bool | No | - |
| huawei_config | HuaweiConfig | No | - |
| image_moderation_block_labels | []string | No | - |
| image_moderation_enabled | bool | No | - |
| image_moderation_labels | []string | No | - |
| image_upload_config | FileUploadConfig | No | - |
| max_aggregated_activities_length | int | No | - |
| migrate_permissions_to_v2 | bool | No | - |
| moderation_analytics_enabled | bool | No | - |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | - |
| moderation_enabled | bool | No | - |
| moderation_s3_image_access_role_arn | str | No | - |
| moderation_webhook_url | str | No | - |
| multi_tenant_enabled | bool | No | - |
| permission_version | str | No | - |
| push_config | PushConfig | No | - |
| reminders_interval | int | No | - |
| reminders_max_members | int | No | - |
| revoke_tokens_issued_before | float | No | - |
| sns_key | str | No | - |
| sns_secret | str | No | - |
| sns_topic_arn | str | No | - |
| sqs_key | str | No | - |
| sqs_secret | str | No | - |
| sqs_url | str | No | - |
| user_response_time_enabled | bool | No | - |
| user_search_disallowed_roles | []string | No | - |
| webhook_events | []string | No | - |
| webhook_url | str | No | - |
| xiaomi_config | XiaomiConfig | No | - |
list_block_lists
Get a list of all existing block lists to review or manage them. Use this method when you need an overview of current block lists.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List block lists
response = client.list_block_lists(
team="value"
)
print(response)Response: ListBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| team | str | No | - |
create_block_list
Create a new block list to restrict certain content or users as per your criteria. Use this method when setting up a new block list for moderation or content control.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create block list
response = client.create_block_list(
name="My Feed",
words=[],
type="like",
is_plural_check_enabled=False
)
print(response)Example: with team and is_leet_check_enabled
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create block list
response = client.create_block_list(
name="My Feed",
words=[],
team="value",
is_leet_check_enabled=False
)
print(response)Response: CreateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | Block list name |
| words | []string | Yes | List of words to block |
| is_leet_check_enabled | bool | No | - |
| is_plural_check_enabled | bool | No | - |
| team | str | No | - |
| type | str | No | Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word |
get_block_list
Access a specific block list to view its details and contents. Use this method when you need to inspect the entries of a particular block list.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get block list
response = client.get_block_list(
name="My Feed",
team="value"
)
print(response)Response: GetBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
| team | str | No | - |
update_block_list
Modify an existing block list to add or remove entries as needed. Use this method when updating the criteria or contents of a block list.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update block list
response = client.update_block_list(
name="My Feed",
is_leet_check_enabled=False,
is_plural_check_enabled=False
)
print(response)Example: with team and words
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update block list
response = client.update_block_list(
name="My Feed",
team="value",
words=[]
)
print(response)Response: UpdateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
| is_leet_check_enabled | bool | No | - |
| is_plural_check_enabled | bool | No | - |
| team | str | No | - |
| words | []string | No | List of words to block |
delete_block_list
Remove a specific block list that is no longer needed. Use this method when you want to delete a block list to stop enforcing its restrictions.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete block list
response = client.delete_block_list(
name="My Feed",
team="value"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
| team | str | No | - |
check_push
Verify the status and functionality of your push notification setup. Use this method to ensure your push notifications are working correctly.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check push
response = client.check_push(
user_id="john",
event_type="value",
firebase_data_template="value"
)
print(response)Example: with firebase_template and message_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check push
response = client.check_push(
firebase_template="value",
message_id="value"
)
print(response)Example: with push_provider_name and push_provider_type
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check push
response = client.check_push(
push_provider_name="value",
push_provider_type="value"
)
print(response)Example: with skip_devices and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check push
response = client.check_push(
skip_devices=False,
user={"id": "activity-123", "custom": {}}
)
print(response)Response: CheckPushResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apn_template | str | No | Push message template for APN |
| event_type | str | No | Type of event for push templates (default: message.new). One of: message.new, message.updated, re... |
| firebase_data_template | str | No | Push message data template for Firebase |
| firebase_template | str | No | Push message template for Firebase |
| message_id | str | No | Message ID to send push notification for |
| push_provider_name | str | No | Name of push provider |
| push_provider_type | str | No | Push provider type. One of: firebase, apn, huawei, xiaomi |
| skip_devices | bool | No | Don't require existing devices to render templates |
| user | UserRequest | No | - |
| user_id | str | No | - |
check_sns
Test the integration and functionality of your Amazon SNS (Simple Notification Service) setup. Use this method to confirm SNS is configured and operating as expected.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check SNS
response = client.check_sns(
sns_key="value",
sns_secret="value",
sns_topic_arn="value"
)
print(response)Response: CheckSNSResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sns_key | str | No | AWS SNS access key |
| sns_secret | str | No | AWS SNS key secret |
| sns_topic_arn | str | No | AWS SNS topic ARN |
check_sqs
Check the status and operation of your Amazon SQS (Simple Queue Service) configuration. Use this method to ensure that your SQS setup is functioning properly.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check SQS
response = client.check_sqs(
sqs_key="value",
sqs_secret="value",
sqs_url="value"
)
print(response)Response: CheckSQSResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sqs_key | str | No | AWS SQS access key |
| sqs_secret | str | No | AWS SQS key secret |
| sqs_url | str | No | AWS SQS endpoint URL |
list_devices
Retrieve a list of all registered devices associated with your account, useful for managing and monitoring device activity.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List devices
response = client.list_devices(
user_id="john"
)
print(response)Response: ListDevicesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | No | - |
create_device
Add a new device to your account, enabling it to participate in your chat ecosystem and access related features.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create device
response = client.create_device(
id="activity-123",
push_provider="value",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with push_provider_name and voip_token
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create device
response = client.create_device(
id="activity-123",
push_provider="value",
push_provider_name="value",
voip_token=False
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Device ID |
| push_provider | str | Yes | Push provider |
| push_provider_name | str | No | Push provider name |
| user | UserRequest | No | - |
| user_id | str | No | Server-side only. User ID which server acts upon |
| voip_token | bool | No | When true the token is for Apple VoIP push notifications |
delete_device
Remove a specified device from your account, which is helpful for maintaining security and managing active devices.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete device
response = client.delete_device(
id="activity-123",
user_id="john"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| user_id | str | No | - |
export_users
Generate and download a list of all users in your chat system, ideal for backups or data analysis.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Export users
response = client.export_users(
user_ids=["user-1", "user-2"]
)
print(response)Response: ExportUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
list_external_storage
View all configured external storage options, providing an overview of available storage connections for your data.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List external storage
response = client.list_external_storage()
print(response)Response: ListExternalStorageResponse
create_external_storage
Set up a new external storage connection to extend your data storage capabilities, allowing for seamless data integration.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create external storage
response = client.create_external_storage(
bucket="value",
name="My Feed",
storage_type="value",
aws_s3={"s3_region": "value", "s3_api_key": "value"},
azure_blob={"abs_account_name": "value", "abs_client_id": "value", "abs_client_secret": "value", "abs_tenant_id": "value"}
)
print(response)Example: with gcs_credentials and path
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create external storage
response = client.create_external_storage(
bucket="value",
name="My Feed",
storage_type="value",
gcs_credentials="value",
path="value"
)
print(response)Response: CreateExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| bucket | str | Yes | The name of the bucket on the service provider |
| name | str | Yes | The name of the provider, this must be unique |
| storage_type | str | 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 | str | No | - |
| path | str | No | The path prefix to use for storing files |
update_external_storage
Modify the settings of an existing external storage connection to ensure it aligns with your current data management needs.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update External Storage
response = client.update_external_storage(
name="My Feed",
bucket="value",
storage_type="value",
aws_s3={"s3_region": "value", "s3_api_key": "value"},
azure_blob={"abs_account_name": "value", "abs_client_id": "value", "abs_client_secret": "value", "abs_tenant_id": "value"}
)
print(response)Example: with gcs_credentials and path
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update External Storage
response = client.update_external_storage(
name="My Feed",
bucket="value",
storage_type="value",
gcs_credentials="value",
path="value"
)
print(response)Response: UpdateExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
| bucket | str | Yes | The name of the bucket on the service provider |
| storage_type | str | 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 | str | No | - |
| path | str | No | The path prefix to use for storing files |
delete_external_storage
Remove an external storage configuration, useful for cleaning up unused or obsolete storage connections.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete external storage
response = client.delete_external_storage(
name="My Feed"
)
print(response)Response: DeleteExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
check_external_storage
Verify the status and connectivity of your external storage setup, ensuring data integrity and accessibility.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Check External Storage
response = client.check_external_storage(
name="My Feed"
)
print(response)Response: CheckExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
create_guest
Register a temporary guest user, allowing limited access to your chat system for short-term collaboration or testing.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create Guest
response = client.create_guest(
user={"id": "activity-123", "custom": {}}
)
print(response)Response: CreateGuestResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user | UserRequest | Yes | User object which server acts upon |
create_import_url
Generates a URL for importing data into the chat application, useful for seamlessly integrating external data sources.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create import URL
response = client.create_import_url(
filename="value"
)
print(response)Response: CreateImportURLResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | str | No | - |
list_imports
Retrieves a list of all data imports, allowing users to track and manage their import activities.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get import
response = client.list_imports()
print(response)Response: ListImportsResponse
create_import
Initiates a new data import process, ideal for users looking to upload large datasets into the chat system.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create import
response = client.create_import(
mode="value",
path="value",
merge_custom=False
)
print(response)Response: CreateImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | str | Yes | - |
| path | str | Yes | - |
| merge_custom | bool | No | - |
list_import_v2_tasks
Displays all tasks related to version 2 imports, providing users with a comprehensive overview of their import operations.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List import v2 tasks
response = client.list_import_v2_tasks(
state=10
)
print(response)Response: ListImportV2TasksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| state | int | No | - |
create_import_v2_task
Starts a new import task under version 2, enabling users to handle specific import scenarios with updated functionalities.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create import v2 task
response = client.create_import_v2_task(
product="value",
settings={"merge_custom": False},
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: CreateImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| product | str | Yes | - |
| settings | ImportV2TaskSettings | Yes | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
get_importer_external_storage
Retrieve details of an existing external storage configuration. Use this method to view the current settings and status of your linked external storage.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get external storage
response = client.get_importer_external_storage()
print(response)Response: GetExternalStorageResponse
upsert_importer_external_storage
Add or update an external storage configuration. Use this method to ensure your external storage is correctly set up or to modify existing configurations.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert external storage
response = client.upsert_importer_external_storage(
type="like",
aws_s3={"bucket": "value", "region": "value", "role_arn": "value", "path_prefix": "value"}
)
print(response)Response: UpsertExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | str | Yes | - |
| aws_s3 | UpsertExternalStorageAWSS3Request | No | - |
delete_importer_external_storage
Remove an existing external storage configuration. Use this when you no longer need to link external storage or to clear outdated configurations.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete external storage
response = client.delete_importer_external_storage()
print(response)Response: DeleteExternalStorageResponse
validate_importer_external_storage
Check the validity of an external storage configuration. Use this to ensure that your external storage setup is correctly configured and operational.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Validate external storage
response = client.validate_importer_external_storage()
print(response)Response: ValidateExternalStorageResponse
get_import_v2_task
Fetches details of a specific import task in version 2, useful for monitoring progress and diagnosing issues.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get import v2 task
response = client.get_import_v2_task(
id="activity-123"
)
print(response)Response: GetImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
delete_import_v2_task
Removes a specific import task from version 2, helping users manage and clean up their import queues.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete import v2 task
response = client.delete_import_v2_task(
id="activity-123"
)
print(response)Response: DeleteImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
get_import
Provides information on a specific import, allowing users to review and verify the details of their data uploads.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get import
response = client.get_import(
id="activity-123"
)
print(response)Response: GetImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
get_og
Retrieves Open Graph data, which is helpful for obtaining metadata about shared content such as links or media.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get OG
response = client.get_og(
url="value"
)
print(response)Response: GetOGResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | str | Yes | - |
list_permissions
Lists all permissions available, aiding users in understanding and managing access control within the chat application.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List permissions
response = client.list_permissions()
print(response)Response: ListPermissionsResponse
get_permission
Retrieve the permissions associated with a user or role to determine access levels within the chat system. Use this method to check if a user has the necessary rights to perform specific actions.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get permission
response = client.get_permission(
id="activity-123"
)
print(response)Response: GetCustomPermissionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
create_poll
Create a new poll in the chat application to gather opinions or feedback from users. Use this method to initiate a poll with customizable options and parameters.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create poll
response = client.create_poll(
name="My Feed",
user_id="john",
id="activity-123"
)
print(response)Example: with allow_user_suggested_options and description
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create poll
response = client.create_poll(
name="My Feed",
allow_user_suggested_options=False,
description="A description"
)
print(response)Example: with enforce_unique_vote and Custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create poll
response = client.create_poll(
name="My Feed",
enforce_unique_vote=False,
custom={}
)
print(response)Example: with is_closed and max_votes_allowed
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create poll
response = client.create_poll(
name="My Feed",
is_closed=False,
max_votes_allowed=10
)
print(response)Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | The name of the poll |
| custom | dict | No | - |
| allow_answers | bool | No | Indicates whether users can suggest user defined answers |
| allow_user_suggested_options | bool | No | - |
| description | str | No | A description of the poll |
| enforce_unique_vote | bool | No | Indicates whether users can cast multiple votes |
| id | str | No | - |
| is_closed | bool | No | Indicates whether the poll is open for voting |
| max_votes_allowed | int | No | Indicates the maximum amount of votes a user can cast |
| options | []PollOptionInput | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
| voting_visibility | str | No | - |
update_poll
Modify an existing poll to change its details or options based on new requirements or feedback. Use this method when you need to update the poll's content or settings after creation.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update poll
response = client.update_poll(
id="activity-123",
name="My Feed",
user_id="john",
allow_answers=False
)
print(response)Example: with allow_user_suggested_options and description
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update poll
response = client.update_poll(
id="activity-123",
name="My Feed",
allow_user_suggested_options=False,
description="A description"
)
print(response)Example: with enforce_unique_vote and is_closed
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update poll
response = client.update_poll(
id="activity-123",
name="My Feed",
enforce_unique_vote=False,
is_closed=False
)
print(response)Example: with max_votes_allowed and options
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update poll
response = client.update_poll(
id="activity-123",
name="My Feed",
max_votes_allowed=10,
options=[]
)
print(response)Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Poll ID |
| name | str | Yes | Poll name |
| custom | dict | No | - |
| allow_answers | bool | No | Allow answers |
| allow_user_suggested_options | bool | No | Allow user suggested options |
| description | str | No | Poll description |
| enforce_unique_vote | bool | No | Enforce unique vote |
| is_closed | bool | No | Is closed |
| max_votes_allowed | int | No | Max votes allowed |
| options | []PollOptionRequest | No | Poll options |
| user | UserRequest | No | - |
| user_id | str | No | - |
| voting_visibility | str | No | Voting visibility |
query_polls
Retrieve a list of polls based on specific criteria or filters. Use this method to find and review polls that match certain conditions or properties.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query polls
response = client.query_polls(
user_id="john",
limit=25,
filter={}
)
print(response)Example: with sort and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query polls
response = client.query_polls(
sort=[],
prev=None
)
print(response)Example: with next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query polls
response = client.query_polls(
next=None
)
print(response)Response: QueryPollsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | No | - |
| filter | dict | No | Filter to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
get_poll
Access detailed information about a specific poll, including its options and current status. Use this method when you need to view the complete details of a particular poll.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get poll
response = client.get_poll(
poll_id="poll-123",
user_id="john"
)
print(response)Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| user_id | str | No | - |
update_poll_partial
Make selective updates to certain fields of an existing poll without altering the entire poll. Use this method when you only need to change specific attributes rather than the whole poll structure.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial update poll
response = client.update_poll_partial(
poll_id="poll-123",
user_id="john",
unset=[]
)
print(response)Example: with user and set
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial update poll
response = client.update_poll_partial(
poll_id="poll-123",
user={"id": "activity-123", "custom": {}},
set={}
)
print(response)Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| set | dict | No | Sets new field values |
| unset | []string | No | Array of field names to unset |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_poll
Remove a poll from the chat application, permanently eliminating it from user access and records. Use this method to clean up outdated or irrelevant polls.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete poll
response = client.delete_poll(
poll_id="poll-123",
user_id="john"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| user_id | str | No | - |
create_poll_option
Add a new option to an existing poll to expand the choices available to users. Use this method when you need to introduce additional voting options in a poll.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create poll option
response = client.create_poll_option(
poll_id="poll-123",
text="Hello, world!",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with Custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create poll option
response = client.create_poll_option(
poll_id="poll-123",
text="Hello, world!",
custom={}
)
print(response)Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| text | str | Yes | Option text |
| custom | dict | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
update_poll_option
Modify the details of an existing poll option to correct, enhance, or adjust its content. Use this method to refine or update the available choices in a poll.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update poll option
response = client.update_poll_option(
poll_id="poll-123",
id="activity-123",
text="Hello, world!",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with Custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update poll option
response = client.update_poll_option(
poll_id="poll-123",
id="activity-123",
text="Hello, world!",
custom={}
)
print(response)Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| id | str | Yes | Option ID |
| text | str | Yes | Option text |
| custom | dict | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
get_poll_option
Retrieve detailed information about a specific poll option to understand its current setup and status. Use this method to inspect the details of a particular choice within a poll.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get poll option
response = client.get_poll_option(
poll_id="poll-123",
option_id="value",
user_id="john"
)
print(response)Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| option_id | str | Yes | - |
| user_id | str | No | - |
delete_poll_option
Remove a specific option from an existing poll. Use this method when you need to update a poll by eliminating options that are no longer valid or necessary.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete poll option
response = client.delete_poll_option(
poll_id="poll-123",
option_id="value",
user_id="john"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| option_id | str | Yes | - |
| user_id | str | No | - |
query_poll_votes
Retrieve the current vote counts for a specific poll. This method is useful for monitoring poll results and understanding user preferences in real-time.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query votes
response = client.query_poll_votes(
poll_id="poll-123",
user_id="john",
limit=25
)
print(response)Example: with filter and sort
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query votes
response = client.query_poll_votes(
poll_id="poll-123",
filter={},
sort=[]
)
print(response)Example: with prev and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query votes
response = client.query_poll_votes(
poll_id="poll-123",
prev=None,
next=None
)
print(response)Response: PollVotesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| poll_id | str | Yes | - |
| user_id | str | No | - |
| filter | dict | No | Filter to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Array of sort parameters |
update_push_notification_preferences
Modify the push notification settings for a user or application. Use this method to customize how and when notifications are delivered to enhance user engagement.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Push notification preferences
response = client.update_push_notification_preferences(
preferences=[]
)
print(response)Response: UpsertPushPreferencesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| preferences | []PushPreferenceInput | Yes | A list of push preferences for channels, calls, or the user. |
list_push_providers
Get a list of available push notification providers integrated with your application. This method helps you understand which services are available for sending notifications to users.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List push providers
response = client.list_push_providers()
print(response)Response: ListPushProvidersResponse
upsert_push_provider
Add or update a push notification provider in your system. Use this method to manage your notification delivery services, ensuring they are correctly configured and up-to-date.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert a push provider
response = client.upsert_push_provider(
push_provider={"name": "My Feed", "apn_auth_key": "value"}
)
print(response)Response: UpsertPushProviderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| push_provider | PushProviderRequest | No | - |
delete_push_provider
Remove a push notification provider from your application’s configuration. Use this method to clean up unused or deprecated providers and streamline your notification setup.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a push provider
response = client.delete_push_provider(
type="like",
name="My Feed"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | str | Yes | - |
| name | str | Yes | - |
get_push_templates
Retrieve a list of available push notification templates. This method is useful for managing and selecting pre-defined message formats to ensure consistent communication with users.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get push notification templates
response = client.get_push_templates(
push_provider_type="value",
push_provider_name="value"
)
print(response)Response: GetPushTemplatesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| push_provider_type | str | Yes | - |
| push_provider_name | str | No | - |
upsert_push_template
Create or update a push notification template to streamline the creation of consistent and professional notifications. Use this method to manage your message templates efficiently.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert a push notification template
response = client.upsert_push_template(
event_type="value",
push_provider_type="value",
enable_push=False,
push_provider_name="value"
)
print(response)Example: with template
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert a push notification template
response = client.upsert_push_template(
event_type="value",
push_provider_type="value",
template="value"
)
print(response)Response: UpsertPushTemplateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_type | str | Yes | Event type. One of: message.new, message.updated, reaction.new, notification.reminder_due, feeds.... |
| push_provider_type | str | Yes | Push provider type. One of: firebase, apn, huawei, xiaomi |
| enable_push | bool | No | Whether to send push notification for this event |
| push_provider_name | str | No | Push provider name |
| template | str | No | Push template |
get_rate_limits
Fetch the current rate limits applicable to your account or application. Use this method to understand your usage boundaries and prevent exceeding limits that could disrupt service.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get rate limits
response = client.get_rate_limits(
server_side=False,
android=False,
ios=False
)
print(response)Example: with web and endpoints
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get rate limits
response = client.get_rate_limits(
web=False,
endpoints="value"
)
print(response)Response: GetRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| server_side | bool | No | - |
| android | bool | No | - |
| ios | bool | No | - |
| web | bool | No | - |
| endpoints | str | No | - |
list_roles
Obtain a list of roles defined within your application, along with their associated permissions. This method is helpful for managing user access and ensuring appropriate permissions are assigned.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List roles
response = client.list_roles()
print(response)Response: ListRolesResponse
create_role
Create a new role within the chat application to define user permissions and access levels; use this when setting up or modifying user roles.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create role
response = client.create_role(
name="My Feed"
)
print(response)Response: CreateRoleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | Role name |
delete_role
Remove an existing role from the chat application to revoke associated permissions and access; use this when a role is no longer needed.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete role
response = client.delete_role(
name="My Feed"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
get_task
Retrieve the current status of a specific task to monitor progress or completion; use this to track task execution.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get status of a task
response = client.get_task(
id="activity-123"
)
print(response)Response: GetTaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
upload_file
Upload a file to the chat application to share it with other users or for storage; use this to facilitate file sharing and management.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upload file
response = client.upload_file(
file="value",
user={"id": "activity-123"}
)
print(response)Response: FileUploadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | str | No | file field |
| user | OnlyUserID | No | user for the request server side only |
delete_file
Remove a previously uploaded file from the chat application to free up space or maintain data privacy; use this to manage file storage.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete file
response = client.delete_file(
url="value"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | str | No | - |
upload_image
Upload an image to the chat application to share it with other users or for visual content storage; use this to enhance conversations with images.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upload image
response = client.upload_image(
file="value",
upload_sizes=[],
user={"id": "activity-123"}
)
print(response)Response: ImageUploadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | str | No | - |
| upload_sizes | []ImageSize | No | field with JSON-encoded array of image size configurations |
| user | OnlyUserID | No | - |
delete_image
Remove a previously uploaded image from the chat application to manage storage or privacy; use this to control visual content availability.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete image
response = client.delete_image(
url="value"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | str | No | - |
list_user_groups
Retrieve a list of all user groups. Use this to view and manage the groups available within your application.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List user groups
response = client.list_user_groups(
limit=25,
id_gt="value",
created_at_gt="value"
)
print(response)Example: with team_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List user groups
response = client.list_user_groups(
team_id="value"
)
print(response)Response: ListUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | int | No | - |
| id_gt | str | No | - |
| created_at_gt | str | No | - |
| team_id | str | No | - |
create_user_group
Create a new user group. Use this method to organize users into groups for better management and access control.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create user group
response = client.create_user_group(
name="My Feed",
id="activity-123",
description="A description"
)
print(response)Example: with member_ids and team_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create user group
response = client.create_user_group(
name="My Feed",
member_ids=[],
team_id="value"
)
print(response)Response: CreateUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | The user friendly name of the user group |
| description | str | No | An optional description for the group |
| id | str | 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 | str | No | Optional team ID to scope the group to a team |
search_user_groups
Find user groups based on specific criteria. Use this to quickly locate groups that meet your search parameters.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Search user groups
response = client.search_user_groups(
query="value",
limit=25,
name_gt="value"
)
print(response)Example: with id_gt and team_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Search user groups
response = client.search_user_groups(
query="value",
id_gt="value",
team_id="value"
)
print(response)Response: SearchUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | str | Yes | - |
| limit | int | No | - |
| name_gt | str | No | - |
| id_gt | str | No | - |
| team_id | str | No | - |
get_user_group
Retrieve details of a specific user group. Use this to view information about a particular group and its members.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get user group
response = client.get_user_group(
id="activity-123",
team_id="value"
)
print(response)Response: GetUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| team_id | str | No | - |
update_user_group
Modify the details of an existing user group. Use this method to change group settings or update group information.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update user group
response = client.update_user_group(
id="activity-123",
name="My Feed",
description="A description"
)
print(response)Example: with team_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update user group
response = client.update_user_group(
id="activity-123",
team_id="value"
)
print(response)Response: UpdateUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| description | str | No | The new description for the group |
| name | str | No | The new name of the user group |
| team_id | str | No | - |
delete_user_group
Remove a user group from the system. Use this to delete groups that are no longer needed, ensuring the organization of your user base.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete user group
response = client.delete_user_group(
id="activity-123",
team_id="value"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| team_id | str | No | - |
add_user_group_members
Use this method to add members to a user group, allowing them to access the group's resources and participate in group activities. Ideal for managing team memberships and ensuring the right people are included in specific group communications.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add user group members
response = client.add_user_group_members(
id="activity-123",
member_ids=[],
as_admin=False,
team_id="value"
)
print(response)Response: AddUserGroupMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| member_ids | []string | Yes | List of user IDs to add as members |
| as_admin | bool | No | Whether to add the members as group admins. Defaults to false |
| team_id | str | No | - |
remove_user_group_members
This method removes members from a user group, revoking their access to the group's resources and activities. It is useful for managing group memberships and maintaining security by ensuring only authorized users remain in the group.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Remove user group members
response = client.remove_user_group_members(
id="activity-123",
member_ids=[],
team_id="value"
)
print(response)Response: RemoveUserGroupMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| member_ids | []string | Yes | List of user IDs to remove |
| team_id | str | No | - |
query_users
Search for users within the chat application based on specific criteria to find and interact with them; use this to efficiently locate users.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query users
response = client.query_users(
payload="value"
)
print(response)Response: QueryUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| payload | No | - |
update_users
Add new users or modify existing user details within the chat application to keep user information current; use this for comprehensive user management.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert users
response = client.update_users(
users={}
)
print(response)Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| users | dict | Yes | Object containing users |
update_users_partial
Make specific updates to existing user details without altering the entire user profile; use this for targeted changes to user information.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partially update user
response = client.update_users_partial(
users=[]
)
print(response)Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| users | []UpdateUserPartialRequest | Yes | - |
get_blocked_users
Retrieve a list of users currently blocked from accessing chat services, useful for managing and reviewing user restrictions.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get list of blocked Users
response = client.get_blocked_users(
user_id="john"
)
print(response)Response: GetBlockedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | No | - |
block_users
Block specified users from accessing chat features, ideal for temporarily restricting users due to policy violations or other administrative reasons.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Block user
response = client.block_users(
blocked_user_id="value",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: BlockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| blocked_user_id | str | Yes | User id to block |
| user | UserRequest | No | - |
| user_id | str | No | - |
deactivate_users
Deactivate multiple user accounts to suspend their access and activity, often used for managing inactive or problematic accounts.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Deactivate users
response = client.deactivate_users(
user_ids=["user-1", "user-2"],
created_by_id="value",
mark_channels_deleted=False
)
print(response)Example: with mark_messages_deleted
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Deactivate users
response = client.deactivate_users(
user_ids=["user-1", "user-2"],
mark_messages_deleted=False
)
print(response)Response: DeactivateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | User IDs to deactivate |
| created_by_id | str | No | ID of the user who deactivated the users |
| mark_channels_deleted | bool | No | - |
| mark_messages_deleted | bool | No | Makes messages appear to be deleted |
delete_users
Permanently remove user accounts and all associated data, suitable for complying with data privacy requests or clearing inactive accounts.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete Users
response = client.delete_users(
user_ids=["user-1", "user-2"],
calls="value",
conversations="value"
)
print(response)Example: with files and messages
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete Users
response = client.delete_users(
user_ids=["user-1", "user-2"],
files=False,
messages="value"
)
print(response)Example: with new_call_owner_id and new_channel_owner_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete Users
response = client.delete_users(
user_ids=["user-1", "user-2"],
new_call_owner_id="value",
new_channel_owner_id="value"
)
print(response)Example: with user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete Users
response = client.delete_users(
user_ids=["user-1", "user-2"],
user={"id": "john"}
)
print(response)Response: DeleteUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | IDs of users to delete |
| calls | str | No | Calls delete mode. Affected calls are those that include exactly two members, one of whom is the ... |
| conversations | str | No | Conversation channels delete mode. Conversation channel is any channel which only has two members... |
| files | bool | No | Delete user files. * false or empty string - doesn't delete any files * true - deletes all files ... |
| messages | str | No | Message delete mode. * null or empty string - doesn't delete user messages * soft - marks all use... |
| new_call_owner_id | str | No | - |
| new_channel_owner_id | str | No | - |
| user | str | No | User delete mode. * soft - marks user as deleted and retains all user data * pruning - marks user... |
get_user_live_locations
Access the real-time location of users, useful for features that depend on location-based services or tracking.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get user live locations
response = client.get_user_live_locations(
user_id="john"
)
print(response)Response: SharedLocationsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | No | - |
update_live_location
Refresh the live location data for a user, ensuring that location-based services have the most current information.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update live location
response = client.update_live_location(
message_id="value",
user_id="john",
end_at=10
)
print(response)Example: with latitude and longitude
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update live location
response = client.update_live_location(
message_id="value",
latitude=10,
longitude=10
)
print(response)Response: SharedLocationResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message_id | str | Yes | Live location ID |
| user_id | str | No | - |
| end_at | float | No | Time when the live location expires |
| latitude | float | No | Latitude coordinate |
| longitude | float | No | Longitude coordinate |
reactivate_users
Restore access to previously deactivated user accounts, allowing them to resume using chat services.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Reactivate users
response = client.reactivate_users(
user_ids=["user-1", "user-2"],
created_by_id="value",
restore_channels=False
)
print(response)Example: with restore_messages
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Reactivate users
response = client.reactivate_users(
user_ids=["user-1", "user-2"],
restore_messages=False
)
print(response)Response: ReactivateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | User IDs to reactivate |
| created_by_id | str | No | ID of the user who's reactivating the users |
| restore_channels | bool | No | - |
| restore_messages | bool | No | Restore previously deleted messages |
restore_users
Reinstate users who were previously deleted, recovering their account and data if within a grace period, useful for accidental deletions.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Restore users
response = client.restore_users(
user_ids=["user-1", "user-2"]
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_ids | []string | Yes | - |
unblock_users
Remove restrictions on users who were previously blocked, allowing them to access chat services again.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Unblock user
response = client.unblock_users(
blocked_user_id="value",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: UnblockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| blocked_user_id | str | Yes | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
deactivate_user
Suspend a specific user's account, preventing access and activity, typically used for addressing individual account issues.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Deactivate user
response = client.deactivate_user(
user_id="john",
created_by_id="value",
mark_messages_deleted=False
)
print(response)Response: DeactivateUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | Yes | - |
| created_by_id | str | No | ID of the user who deactivated the user |
| mark_messages_deleted | bool | No | Makes messages appear to be deleted |
export_user
Exports the user's data for backup or analysis purposes, ensuring you have a local copy of their information when needed.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Export user
response = client.export_user(
user_id="john"
)
print(response)Response: ExportUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | Yes | - |
reactivate_user
Reactivates a previously deactivated user, allowing them to regain access to their account and continue using the chat service.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Reactivate user
response = client.reactivate_user(
user_id="john",
name="My Feed",
created_by_id="value"
)
print(response)Example: with restore_messages
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Reactivate user
response = client.reactivate_user(
user_id="john",
restore_messages=False
)
print(response)Response: ReactivateUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | Yes | - |
| created_by_id | str | No | ID of the user who's reactivating the user |
| name | str | No | Set this field to put new name for the user |
| restore_messages | bool | No | Restore previously deleted messages |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AIImageConfig
class AIImageConfig(TypedDict, total=False):
async: bool
enabled: bool
ocr_rules: List[OCRRule]
rules: List[AWSRekognitionRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| ocr_rules | List[OCRRule] | No | |
| rules | List[AWSRekognitionRule] | No |
AITextConfig
class AITextConfig(TypedDict, total=False):
async: bool
enabled: bool
profile: str
rules: List[BodyguardRule]
severity_rules: List[BodyguardSeverityRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| profile | str | No | |
| rules | List[BodyguardRule] | No | |
| severity_rules | List[BodyguardSeverityRule] | No |
AIVideoConfig
class AIVideoConfig(TypedDict, total=False):
async: bool
enabled: bool
rules: List[AWSRekognitionRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | List[AWSRekognitionRule] | No |
APNConfig
class APNConfig(TypedDict, total=False):
Disabled: bool
auth_key: str
auth_type: str
bundle_id: str
development: bool
host: str
key_id: str
notification_template: str
p12_cert: str
team_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| auth_key | str | No | |
| auth_type | str | No | |
| bundle_id | str | No | |
| development | bool | No | |
| host | str | No | |
| key_id | str | No | |
| notification_template | str | No | |
| p12_cert | str | No | |
| team_id | str | No |
Action
class Action(TypedDict, total=False):
name: str
style: str
text: str
type: str
value: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | |
| text | str | Yes | |
| type | str | Yes | |
| style | str | No | |
| value | str | No |
AddUserGroupMembersResponse
Response for adding members to a user group
class AddUserGroupMembersResponse(TypedDict, total=False):
duration: str
user_group: UserGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
AppResponseFields
class AppResponseFields(TypedDict, total=False):
activity_metrics_config: Dict[str, Any]
allow_multi_user_devices: bool
allowed_flag_reasons: List[str]
async_url_enrich_enabled: bool
auto_translation_enabled: bool
before_message_send_hook_url: str
call_types: Dict[str, Any]
campaign_enabled: bool
cdn_expiration_seconds: int
channel_configs: Dict[str, Any]
custom_action_handler_url: str
datadog_info: DataDogInfo
disable_auth_checks: bool
disable_permissions_checks: bool
enforce_unique_usernames: str
event_hooks: List[EventHook]
file_upload_config: FileUploadConfig
geofences: List[GeofenceResponse]
grants: Dict[str, Any]
guest_user_creation_disabled: bool
id: int
image_moderation_enabled: bool
image_moderation_labels: List[str]
image_upload_config: FileUploadConfig
max_aggregated_activities_length: int
moderation_audio_call_moderation_enabled: bool
moderation_dashboard_preferences: ModerationDashboardPreferences
moderation_enabled: bool
moderation_llm_configurability_enabled: bool
moderation_multitenant_blocklist_enabled: bool
moderation_s3_image_access_role_arn: str
moderation_video_call_moderation_enabled: bool
moderation_webhook_url: str
multi_tenant_enabled: bool
name: str
organization: str
permission_version: str
placement: str
policies: Dict[str, Any]
push_notifications: PushNotificationFields
reminders_interval: int
revoke_tokens_issued_before: float
sns_key: str
sns_secret: str
sns_topic_arn: str
sqs_key: str
sqs_secret: str
sqs_url: str
suspended: bool
suspended_explanation: str
use_hook_v2: bool
user_response_time_enabled: bool
user_search_disallowed_roles: List[str]
webhook_events: List[str]
webhook_url: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_multi_user_devices | bool | Yes | |
| async_url_enrich_enabled | bool | Yes | |
| auto_translation_enabled | bool | Yes | |
| call_types | Dict[str, Any] | Yes | |
| campaign_enabled | bool | Yes | |
| cdn_expiration_seconds | int | Yes | |
| channel_configs | Dict[str, Any] | Yes | |
| custom_action_handler_url | str | Yes | |
| disable_auth_checks | bool | Yes | |
| disable_permissions_checks | bool | Yes | |
| enforce_unique_usernames | str | Yes | |
| event_hooks | List[EventHook] | Yes | |
| file_upload_config | FileUploadConfig | Yes | |
| grants | Dict[str, Any] | Yes | |
| guest_user_creation_disabled | bool | Yes | |
| id | int | Yes | |
| image_moderation_enabled | bool | Yes | |
| image_upload_config | FileUploadConfig | Yes | |
| max_aggregated_activities_length | int | Yes | |
| moderation_audio_call_moderation_enabled | bool | Yes | |
| moderation_enabled | bool | Yes | |
| moderation_llm_configurability_enabled | bool | Yes | |
| moderation_multitenant_blocklist_enabled | bool | Yes | |
| moderation_video_call_moderation_enabled | bool | Yes | |
| moderation_webhook_url | str | Yes | |
| multi_tenant_enabled | bool | Yes | |
| name | str | Yes | |
| organization | str | Yes | |
| permission_version | str | Yes | |
| placement | str | Yes | |
| policies | Dict[str, Any] | Yes | |
| push_notifications | PushNotificationFields | Yes | |
| reminders_interval | int | Yes | |
| sns_key | str | Yes | |
| sns_secret | str | Yes | |
| sns_topic_arn | str | Yes | |
| sqs_key | str | Yes | |
| sqs_secret | str | Yes | |
| sqs_url | str | Yes | |
| suspended | bool | Yes | |
| suspended_explanation | str | Yes | |
| use_hook_v2 | bool | Yes | |
| user_response_time_enabled | bool | Yes | |
| user_search_disallowed_roles | List[str] | Yes | |
| webhook_events | List[str] | Yes | |
| webhook_url | str | Yes | |
| activity_metrics_config | Dict[str, Any] | No | |
| allowed_flag_reasons | List[str] | No | |
| before_message_send_hook_url | str | No | |
| datadog_info | DataDogInfo | No | |
| geofences | List[GeofenceResponse] | No | |
| image_moderation_labels | List[str] | No | |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | |
| moderation_s3_image_access_role_arn | str | No | |
| revoke_tokens_issued_before | float | No |
AsyncModerationCallbackConfig
class AsyncModerationCallbackConfig(TypedDict, total=False):
mode: str
server_url: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| mode | str | No | |
| server_url | str | No |
AsyncModerationConfiguration
class AsyncModerationConfiguration(TypedDict, total=False):
callback: AsyncModerationCallbackConfig
timeout_ms: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| timeout_ms | int | No |
AutomodPlatformCircumventionConfig
class AutomodPlatformCircumventionConfig(TypedDict, total=False):
async: bool
enabled: bool
rules: List[AutomodRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | List[AutomodRule] | No |
AutomodSemanticFiltersConfig
class AutomodSemanticFiltersConfig(TypedDict, total=False):
async: bool
enabled: bool
rules: List[AutomodSemanticFiltersRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | List[AutomodSemanticFiltersRule] | No |
AutomodToxicityConfig
class AutomodToxicityConfig(TypedDict, total=False):
async: bool
enabled: bool
rules: List[AutomodRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | List[AutomodRule] | No |
AzureRequest
Config for creating Azure Blob Storage storage
class AzureRequest(TypedDict, total=False):
abs_account_name: str
abs_client_id: str
abs_client_secret: str
abs_tenant_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| abs_account_name | str | Yes | The account name |
| abs_client_id | str | Yes | The client id |
| abs_client_secret | str | Yes | The client secret |
| abs_tenant_id | str | Yes | The tenant id |
BlockListConfig
class BlockListConfig(TypedDict, total=False):
async: bool
enabled: bool
match_substring: bool
rules: List[BlockListRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| match_substring | bool | No | |
| rules | List[BlockListRule] | No |
BlockListResponse
Block list contains restricted words
class BlockListResponse(TypedDict, total=False):
created_at: float
id: str
is_leet_check_enabled: bool
is_plural_check_enabled: bool
name: str
team: str
type: str
updated_at: float
words: List[str]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| is_leet_check_enabled | bool | Yes | |
| is_plural_check_enabled | bool | Yes | |
| name | str | Yes | Block list name |
| type | str | Yes | Block list type. One of: regex, domain, domain_allowlist, email, email_allowl... |
| words | List[str] | Yes | List of words to block |
| created_at | float | No | Date/time of creation |
| id | str | No | |
| team | str | No | |
| updated_at | float | No | Date/time of the last update |
BlockUsersResponse
class BlockUsersResponse(TypedDict, total=False):
blocked_by_user_id: str
blocked_user_id: str
created_at: float
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocked_by_user_id | str | Yes | User id who blocked another user |
| blocked_user_id | str | Yes | User id who got blocked |
| created_at | float | Yes | Timestamp when the user was blocked |
| duration | str | Yes | Duration of the request in milliseconds |
BlockedUserResponse
class BlockedUserResponse(TypedDict, total=False):
blocked_user: UserResponse
blocked_user_id: str
created_at: float
user: UserResponse
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocked_user | UserResponse | Yes | User who got blocked |
| blocked_user_id | str | Yes | ID of the user who got blocked |
| created_at | float | Yes | |
| user | UserResponse | Yes | User who blocked another user |
| user_id | str | Yes | ID of the user who blocked another user |
BodyguardImageAnalysisConfig
class BodyguardImageAnalysisConfig(TypedDict, total=False):
rules: List[BodyguardRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | List[BodyguardRule] | No |
ChannelResponse
Represents channel in chat
class ChannelResponse(TypedDict, total=False):
auto_translation_enabled: bool
auto_translation_language: str
blocked: bool
cid: str
config: ChannelConfigWithInfo
cooldown: int
created_at: float
created_by: UserResponse
custom: Dict[str, Any]
deleted_at: float
disabled: bool
filter_tags: List[str]
frozen: bool
hidden: bool
hide_messages_before: float
id: str
last_message_at: float
member_count: int
members: List[ChannelMemberResponse]
message_count: int
mute_expires_at: float
muted: bool
own_capabilities: List[ChannelOwnCapability]
team: str
truncated_at: float
truncated_by: UserResponse
type: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | str | Yes | Channel CID (<type>:<id>) |
| created_at | float | Yes | Date/time of creation |
| custom | Dict[str, Any] | Yes | Custom data for this object |
| disabled | bool | Yes | |
| frozen | bool | Yes | Whether channel is frozen or not |
| id | str | Yes | Channel unique ID |
| type | str | Yes | Type of the channel |
| updated_at | float | Yes | Date/time of the last update |
| auto_translation_enabled | bool | No | Whether auto translation is enabled or not |
| auto_translation_language | str | No | Language to translate to when auto translation is active |
| blocked | bool | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | int | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | float | No | Date/time of deletion |
| filter_tags | List[str] | No | List of filter tags associated with the channel |
| hidden | bool | No | Whether this channel is hidden by current user or not |
| hide_messages_before | float | No | Date since when the message history is accessible |
| last_message_at | float | No | Date of the last message sent |
| member_count | int | No | Number of members in the channel |
| members | List[ChannelMemberResponse] | No | List of channel members (max 100) |
| message_count | int | No | Number of messages in the channel |
| mute_expires_at | float | No | Date of mute expiration |
| muted | bool | No | Whether this channel is muted or not |
| own_capabilities | List[ChannelOwnCapability] | No | List of channel capabilities of authenticated user |
| team | str | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | float | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChatPreferencesInput
class ChatPreferencesInput(TypedDict, total=False):
channel_mentions: str
default_preference: str
direct_mentions: str
group_mentions: str
here_mentions: str
role_mentions: str
thread_replies: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_mentions | str | No | |
| default_preference | str | No | |
| direct_mentions | str | No | |
| group_mentions | str | No | |
| here_mentions | str | No | |
| role_mentions | str | No | |
| thread_replies | str | No |
CheckExternalStorageResponse
Basic response information
class CheckExternalStorageResponse(TypedDict, total=False):
duration: str
file_url: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| file_url | str | Yes |
CheckPushResponse
class CheckPushResponse(TypedDict, total=False):
device_errors: Dict[str, Any]
duration: str
event_type: str
general_errors: List[str]
rendered_apn_template: str
rendered_firebase_template: str
rendered_message: Dict[str, Any]
skip_devices: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| device_errors | Dict[str, Any] | No | Object with device errors |
| event_type | str | No | The event type that was tested |
| general_errors | List[str] | No | List of general errors |
| rendered_apn_template | str | No | |
| rendered_firebase_template | str | No | |
| rendered_message | Dict[str, Any] | No | |
| skip_devices | bool | No | Don't require existing devices to render templates |
CheckSNSResponse
class CheckSNSResponse(TypedDict, total=False):
data: Dict[str, Any]
duration: str
error: str
status: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| status | str | Yes | Validation result. One of: ok, error |
| data | Dict[str, Any] | No | Error data |
| error | str | No | Error text |
CheckSQSResponse
class CheckSQSResponse(TypedDict, total=False):
data: Dict[str, Any]
duration: str
error: str
status: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| status | str | Yes | Validation result. One of: ok, error |
| data | Dict[str, Any] | No | Error data |
| error | str | No | Error text |
CreateBlockListResponse
Basic response information
class CreateBlockListResponse(TypedDict, total=False):
blocklist: BlockListResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
CreateExternalStorageResponse
Basic response information
class CreateExternalStorageResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
CreateGuestResponse
class CreateGuestResponse(TypedDict, total=False):
access_token: str
duration: str
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| access_token | str | Yes | the access token to authenticate the user |
| duration | str | Yes | Duration of the request in milliseconds |
| user | UserResponse | Yes | User object which server acts upon |
CreateImportResponse
Basic response information
class CreateImportResponse(TypedDict, total=False):
duration: str
import_task: ImportTaskProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| import_task | ImportTask | No |
CreateImportURLResponse
Basic response information
class CreateImportURLResponse(TypedDict, total=False):
duration: str
path: str
upload_url: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| path | str | Yes | |
| upload_url | str | Yes |
CreateImportV2TaskResponse
Basic response information
class CreateImportV2TaskResponse(TypedDict, total=False):
app_pk: int
created_at: float
duration: str
id: str
product: str
settings: ImportV2TaskSettings
state: int
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
| id | str | Yes | |
| product | str | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float | Yes |
CreateRoleResponse
Basic response information
class CreateRoleResponse(TypedDict, total=False):
duration: str
role: RoleProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| role | Role | Yes |
CreateUserGroupResponse
Response for creating a user group
class CreateUserGroupResponse(TypedDict, total=False):
duration: str
user_group: UserGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_group | UserGroupResponse | No | The created user group |
Data
class Data(TypedDict, total=False):
id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes |
DataDogInfo
class DataDogInfo(TypedDict, total=False):
api_key: str
enabled: bool
site: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| api_key | str | No | |
| enabled | bool | No | |
| site | str | No |
DeactivateUserResponse
class DeactivateUserResponse(TypedDict, total=False):
duration: str
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
DeactivateUsersResponse
Basic response information
class DeactivateUsersResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| task_id | str | Yes |
DeleteExternalStorageResponse
Basic response information
class DeleteExternalStorageResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
DeleteImportV2TaskResponse
Basic response information
class DeleteImportV2TaskResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
DeleteUsersResponse
class DeleteUsersResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| task_id | str | Yes | ID of the task to delete users |
DeviceResponse
Response for Device
class DeviceResponse(TypedDict, total=False):
created_at: float
disabled: bool
disabled_reason: str
id: str
push_provider: str
push_provider_name: str
user_id: str
voip: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| id | str | Yes | Device ID |
| push_provider | str | Yes | Push provider |
| user_id | str | Yes | User ID |
| disabled | bool | No | Whether device is disabled or not |
| disabled_reason | str | No | Reason explaining why device had been disabled |
| push_provider_name | str | No | Push provider name |
| voip | bool | No | When true the token is for Apple VoIP push notifications |
ErrorResult
class ErrorResult(TypedDict, total=False):
stacktrace: str
type: str
version: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | str | Yes | |
| stacktrace | str | No | |
| version | str | No |
EventHook
class EventHook(TypedDict, total=False):
callback: AsyncModerationCallbackConfig
created_at: float
enabled: bool
event_types: List[str]
hook_type: str
id: str
product: str
should_send_custom_events: bool
sns_auth_type: str
sns_event_based_message_group_id_enabled: bool
sns_key: str
sns_region: str
sns_role_arn: str
sns_secret: str
sns_topic_arn: str
sqs_auth_type: str
sqs_key: str
sqs_queue_url: str
sqs_region: str
sqs_role_arn: str
sqs_secret: str
timeout_ms: int
updated_at: float
webhook_url: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| created_at | float | No | |
| enabled | bool | No | |
| event_types | List[str] | No | |
| hook_type | str | No | |
| id | str | No | |
| product | str | No | |
| should_send_custom_events | bool | No | |
| sns_auth_type | str | No | |
| sns_event_based_message_group_id_enabled | bool | No | |
| sns_key | str | No | |
| sns_region | str | No | |
| sns_role_arn | str | No | |
| sns_secret | str | No | |
| sns_topic_arn | str | No | |
| sqs_auth_type | str | No | |
| sqs_key | str | No | |
| sqs_queue_url | str | No | |
| sqs_region | str | No | |
| sqs_role_arn | str | No | |
| sqs_secret | str | No | |
| timeout_ms | int | No | |
| updated_at | float | No | |
| webhook_url | str | No |
ExportUserResponse
class ExportUserResponse(TypedDict, total=False):
duration: str
messages: List[MessageResponse]
reactions: List[ReactionResponse]
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| messages | List[MessageResponse] | No | List of exported messages |
| reactions | List[ReactionResponse] | No | List of exported reactions |
| user | UserResponse | No | Exported user object |
ExportUsersResponse
Basic response information
class ExportUsersResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| task_id | str | Yes |
FeedsPreferences
class FeedsPreferences(TypedDict, total=False):
comment: str
comment_mention: str
comment_reaction: str
comment_reply: str
custom_activity_types: Dict[str, Any]
follow: str
mention: str
reaction: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | str | No | Push notification preference for comments on user's activities. One of: all, ... |
| comment_mention | str | No | Push notification preference for mentions in comments. One of: all, none |
| comment_reaction | str | No | Push notification preference for reactions on comments. One of: all, none |
| comment_reply | str | No | Push notification preference for replies to comments. One of: all, none |
| custom_activity_types | Dict[str, Any] | No | Push notification preferences for custom activity types. Map of activity type... |
| follow | str | No | Push notification preference for new followers. One of: all, none |
| mention | str | No | Push notification preference for mentions in activities. One of: all, none |
| reaction | str | No | Push notification preference for reactions on user's activities or comments. ... |
Field
class Field(TypedDict, total=False):
short: bool
title: str
value: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | str | Yes | |
| value | str | Yes |
FileUploadConfig
class FileUploadConfig(TypedDict, total=False):
allowed_file_extensions: List[str]
allowed_mime_types: List[str]
blocked_file_extensions: List[str]
blocked_mime_types: List[str]
size_limit: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| size_limit | int | Yes | |
| allowed_file_extensions | List[str] | No | |
| allowed_mime_types | List[str] | No | |
| blocked_file_extensions | List[str] | No | |
| blocked_mime_types | List[str] | No |
FileUploadResponse
class FileUploadResponse(TypedDict, total=False):
duration: str
file: str
thumb_url: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| file | str | No | URL to the uploaded asset. Should be used to put to asset_url attachment field |
| thumb_url | str | No | URL of the file thumbnail for supported file formats. Should be put to `thumb... |
FirebaseConfig
class FirebaseConfig(TypedDict, total=False):
Disabled: bool
apn_template: str
credentials_json: str
data_template: str
notification_template: str
server_key: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| apn_template | str | No | |
| credentials_json | str | No | |
| data_template | str | No | |
| notification_template | str | No | |
| server_key | str | No |
FullUserResponse
class FullUserResponse(TypedDict, total=False):
avg_response_time: int
ban_expires: float
banned: bool
blocked_user_ids: List[str]
bypass_moderation: bool
channel_mutes: List[ChannelMute]
created_at: float
custom: Dict[str, Any]
deactivated_at: float
deleted_at: float
devices: List[DeviceResponse]
id: str
image: str
invisible: bool
language: str
last_active: float
latest_hidden_channels: List[str]
mutes: List[UserMuteResponse]
name: str
online: bool
privacy_settings: PrivacySettingsResponse
revoke_tokens_issued_before: float
role: str
shadow_banned: bool
teams: List[str]
teams_role: Dict[str, Any]
total_unread_count: int
unread_channels: int
unread_count: int
unread_threads: int
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | |
| blocked_user_ids | List[str] | Yes | |
| channel_mutes | List[ChannelMute] | Yes | |
| created_at | float | Yes | |
| custom | Dict[str, Any] | Yes | |
| devices | List[DeviceResponse] | Yes | |
| id | str | Yes | |
| invisible | bool | Yes | |
| language | str | Yes | |
| mutes | List[UserMuteResponse] | Yes | |
| online | bool | Yes | |
| role | str | Yes | |
| shadow_banned | bool | Yes | |
| teams | List[str] | Yes | |
| total_unread_count | int | Yes | |
| unread_channels | int | Yes | |
| unread_count | int | Yes | |
| unread_threads | int | Yes | |
| updated_at | float | Yes | |
| avg_response_time | int | No | |
| ban_expires | float | No | |
| bypass_moderation | bool | No | |
| deactivated_at | float | No | |
| deleted_at | float | No | |
| image | str | No | |
| last_active | float | No | |
| latest_hidden_channels | List[str] | No | |
| name | str | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| revoke_tokens_issued_before | float | No | |
| teams_role | Dict[str, Any] | No |
GetApplicationResponse
Basic response information
class GetApplicationResponse(TypedDict, total=False):
app: AppResponseFields
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| app | AppResponseFields | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
GetBlockListResponse
Response for get block list
class GetBlockListResponse(TypedDict, total=False):
blocklist: BlockListResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| blocklist | BlockListResponse | No | Block list object |
GetBlockedUsersResponse
class GetBlockedUsersResponse(TypedDict, total=False):
blocks: List[BlockedUserResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocks | List[BlockedUserResponse] | Yes | Array of blocked user object |
| duration | str | Yes | Duration of the request in milliseconds |
GetCustomPermissionResponse
Basic response information
class GetCustomPermissionResponse(TypedDict, total=False):
duration: str
permission: PermissionProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| permission | Permission | Yes |
GetExternalStorageAWSS3Response
class GetExternalStorageAWSS3Response(TypedDict, total=False):
bucket: str
path_prefix: str
region: str
role_arn: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | str | Yes | |
| region | str | Yes | |
| role_arn | str | Yes | |
| path_prefix | str | No |
GetExternalStorageResponse
Basic response information
class GetExternalStorageResponse(TypedDict, total=False):
aws_s3: GetExternalStorageAWSS3Response
created_at: float
duration: str
type: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
| type | str | Yes | |
| updated_at | float | Yes | |
| aws_s3 | GetExternalStorageAWSS3Response | No |
GetImportResponse
Basic response information
class GetImportResponse(TypedDict, total=False):
duration: str
import_task: ImportTaskProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| import_task | ImportTask | No |
GetImportV2TaskResponse
Basic response information
class GetImportV2TaskResponse(TypedDict, total=False):
app_pk: int
created_at: float
duration: str
id: str
product: str
result: Dict[str, Any]
settings: ImportV2TaskSettings
state: int
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
| id | str | Yes | |
| product | str | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float | Yes | |
| result | Dict[str, Any] | No |
GetOGResponse
class GetOGResponse(TypedDict, total=False):
actions: List[Action]
asset_url: str
author_icon: str
author_link: str
author_name: str
color: str
custom: Dict[str, Any]
duration: str
fallback: str
fields: List[Field]
footer: str
footer_icon: str
giphy: Images
image_url: str
og_scrape_url: str
original_height: int
original_width: int
pretext: str
text: str
thumb_url: str
title: str
title_link: str
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | Yes | |
| duration | str | Yes | |
| actions | List[Action] | No | |
| asset_url | str | No | URL of detected video or audio |
| author_icon | str | No | |
| author_link | str | No | og:site |
| author_name | str | No | og:site_name |
| color | str | No | |
| fallback | str | No | |
| fields | List[Field] | No | |
| footer | str | No | |
| footer_icon | str | No | |
| giphy | Images | No | |
| image_url | str | No | URL of detected image |
| og_scrape_url | str | No | extracted url from the text |
| original_height | int | No | |
| original_width | int | No | |
| pretext | str | No | |
| text | str | No | og:description |
| thumb_url | str | No | URL of detected thumb image |
| title | str | No | og:title |
| title_link | str | No | og:url |
| type | str | No | Attachment type, could be empty, image, audio or video |
GetPushTemplatesResponse
Basic response information
class GetPushTemplatesResponse(TypedDict, total=False):
duration: str
templates: List[PushTemplateResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| templates | List[PushTemplateResponse] | Yes |
GetRateLimitsResponse
class GetRateLimitsResponse(TypedDict, total=False):
android: Dict[str, Any]
duration: str
ios: Dict[str, Any]
server_side: Dict[str, Any]
web: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| android | Dict[str, Any] | No | Map of endpoint rate limits for the Android platform |
| ios | Dict[str, Any] | No | Map of endpoint rate limits for the iOS platform |
| server_side | Dict[str, Any] | No | Map of endpoint rate limits for the server-side platform |
| web | Dict[str, Any] | No | Map of endpoint rate limits for the web platform |
GetTaskResponse
class GetTaskResponse(TypedDict, total=False):
created_at: float
duration: str
error: ErrorResult
result: Dict[str, Any]
status: str
task_id: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| duration | str | Yes | |
| status | str | Yes | Current status of task |
| task_id | str | Yes | ID of task |
| updated_at | float | Yes | |
| error | ErrorResult | No | Error produced by task |
| result | Dict[str, Any] | No | Result produced by task after completion |
GetUserGroupResponse
Response for getting a user group
class GetUserGroupResponse(TypedDict, total=False):
duration: str
user_group: UserGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_group | UserGroupResponse | No | The user group |
GoogleVisionConfig
class GoogleVisionConfig(TypedDict, total=False):
enabled: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
HuaweiConfig
class HuaweiConfig(TypedDict, total=False):
Disabled: bool
id: str
secret: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| id | str | No | |
| secret | str | No |
ImageSize
class ImageSize(TypedDict, total=False):
crop: str
height: int
resize: str
width: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | str | No | Crop mode. One of: top, bottom, left, right, center |
| height | int | No | Target image height |
| resize | str | No | Resize method. One of: clip, crop, scale, fill |
| width | int | No | Target image width |
ImageUploadResponse
class ImageUploadResponse(TypedDict, total=False):
duration: str
file: str
thumb_url: str
upload_sizes: List[ImageSize]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| file | str | No | |
| thumb_url | str | No | |
| upload_sizes | List[ImageSize] | No | Array of image size configurations |
Images
class Images(TypedDict, total=False):
fixed_height: ImageData
fixed_height_downsampled: ImageData
fixed_height_still: ImageData
fixed_width: ImageData
fixed_width_downsampled: ImageData
fixed_width_still: ImageData
original: ImageDataProperties:
| 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
class ImportTask(TypedDict, total=False):
created_at: float
history: List[ImportTaskHistory]
id: str
mode: str
path: str
size: int
state: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| history | List[ImportTaskHistory] | Yes | |
| id | str | Yes | |
| mode | str | Yes | |
| path | str | Yes | |
| state | str | Yes | |
| updated_at | float | Yes | |
| size | int | No |
ImportV2TaskItem
class ImportV2TaskItem(TypedDict, total=False):
app_pk: int
created_at: float
id: str
product: str
result: Dict[str, Any]
settings: ImportV2TaskSettings
state: int
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float | Yes | |
| id | str | Yes | |
| product | str | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float | Yes | |
| result | Dict[str, Any] | No |
ImportV2TaskSettings
class ImportV2TaskSettings(TypedDict, total=False):
merge_custom: bool
mode: str
path: str
s3: ImportV2TaskSettingsS3
skip_references_check: bool
source: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| merge_custom | bool | No | |
| mode | str | No | |
| path | str | No | |
| s3 | ImportV2TaskSettingsS3 | No | |
| skip_references_check | bool | No | |
| source | str | No |
ImportV2TaskSettingsS3
class ImportV2TaskSettingsS3(TypedDict, total=False):
bucket: str
dir: str
region: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | str | No | |
| dir | str | No | |
| region | str | No |
LLMConfig
class LLMConfig(TypedDict, total=False):
app_context: str
async: bool
enabled: bool
rules: List[LLMRule]
severity_descriptions: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | str | No | |
| async | bool | No | |
| enabled | bool | No | |
| rules | List[LLMRule] | No | |
| severity_descriptions | Dict[str, Any] | No |
ListBlockListResponse
Basic response information
class ListBlockListResponse(TypedDict, total=False):
blocklists: List[BlockListResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklists | List[BlockListResponse] | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
ListDevicesResponse
List devices response
class ListDevicesResponse(TypedDict, total=False):
devices: List[DeviceResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| devices | List[DeviceResponse] | Yes | List of devices |
| duration | str | Yes |
ListExternalStorageResponse
Basic response information
class ListExternalStorageResponse(TypedDict, total=False):
duration: str
external_storages: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| external_storages | Dict[str, Any] | Yes |
ListImportV2TasksResponse
Basic response information
class ListImportV2TasksResponse(TypedDict, total=False):
duration: str
import_tasks: List[ImportV2TaskItem]
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| import_tasks | List[ImportV2TaskItem] | Yes | |
| next | str | No | |
| prev | str | No |
ListImportsResponse
Basic response information
class ListImportsResponse(TypedDict, total=False):
duration: str
import_tasks: List[ImportTask]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| import_tasks | List[ImportTask] | Yes |
ListPermissionsResponse
Basic response information
class ListPermissionsResponse(TypedDict, total=False):
duration: str
permissions: List[Permission]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| permissions | List[Permission] | Yes |
ListPushProvidersResponse
Basic response information
class ListPushProvidersResponse(TypedDict, total=False):
duration: str
push_providers: List[PushProviderResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| push_providers | List[PushProviderResponse] | Yes |
ListRolesResponse
Basic response information
class ListRolesResponse(TypedDict, total=False):
duration: str
roles: List[Role]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| roles | List[Role] | Yes |
ListUserGroupsResponse
Response for listing user groups
class ListUserGroupsResponse(TypedDict, total=False):
duration: str
user_groups: List[UserGroupResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_groups | List[UserGroupResponse] | Yes | List of user groups |
MessageResponse
Represents any chat message
class MessageResponse(TypedDict, total=False):
attachments: List[Attachment]
cid: str
command: str
created_at: float
custom: Dict[str, Any]
deleted_at: float
deleted_for_me: bool
deleted_reply_count: int
draft: DraftResponse
html: str
i18n: Dict[str, Any]
id: str
image_labels: Dict[str, Any]
latest_reactions: List[ReactionResponse]
member: ChannelMemberResponse
mentioned_channel: bool
mentioned_group_ids: List[str]
mentioned_here: bool
mentioned_roles: List[str]
mentioned_users: List[UserResponse]
message_text_updated_at: float
mml: str
moderation: ModerationV2Response
own_reactions: List[ReactionResponse]
parent_id: str
pin_expires: float
pinned: bool
pinned_at: float
pinned_by: UserResponse
poll: PollResponseData
poll_id: str
quoted_message: MessageResponse
quoted_message_id: str
reaction_counts: Dict[str, Any]
reaction_groups: Dict[str, Any]
reaction_scores: Dict[str, Any]
reminder: ReminderResponseData
reply_count: int
restricted_visibility: List[str]
shadowed: bool
shared_location: SharedLocationResponseData
show_in_channel: bool
silent: bool
text: str
thread_participants: List[UserResponse]
type: str
updated_at: float
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List[Attachment] | Yes | Array of message attachments |
| cid | str | Yes | Channel unique identifier in <type>:<id> format |
| created_at | float | Yes | Date/time of creation |
| custom | Dict[str, Any] | Yes | |
| deleted_reply_count | int | Yes | |
| html | str | Yes | Contains HTML markup of the message. Can only be set when using server-side API |
| id | str | Yes | Message ID is unique string identifier of the message |
| latest_reactions | List[ReactionResponse] | Yes | List of 10 latest reactions to this message |
| mentioned_channel | bool | Yes | Whether the message mentioned the channel tag |
| mentioned_here | bool | Yes | Whether the message mentioned online users with @here tag |
| mentioned_users | List[UserResponse] | Yes | List of mentioned users |
| own_reactions | List[ReactionResponse] | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | bool | Yes | Whether message is pinned or not |
| reaction_counts | Dict[str, Any] | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | Dict[str, Any] | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | int | Yes | Number of replies to this message |
| restricted_visibility | List[str] | Yes | A list of user ids that have restricted visibility to the message, if the lis... |
| shadowed | bool | Yes | Whether the message was shadowed or not |
| silent | bool | Yes | Whether message is silent or not |
| text | str | Yes | Text of the message. Should be empty if mml is provided |
| type | str | Yes | Contains type of the message. One of: regular, ephemeral, error, reply, syste... |
| updated_at | float | Yes | Date/time of the last update |
| user | UserResponse | Yes | Sender of the message. Required when using server-side API |
| command | str | No | Contains provided slash command |
| deleted_at | float | No | Date/time of deletion |
| deleted_for_me | bool | No | |
| draft | DraftResponse | No | |
| i18n | Dict[str, Any] | No | Object with translations. Key language contains the original language key. ... |
| image_labels | Dict[str, Any] | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | List[str] | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | List[str] | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | float | No | |
| mml | str | No | Should be empty if text is provided. Can only be set when using server-side... |
| moderation | ModerationV2Response | No | |
| parent_id | str | No | ID of parent message (thread) |
| pin_expires | float | No | Date when pinned message expires |
| pinned_at | float | No | Date when message got pinned |
| pinned_by | UserResponse | No | Contains user who pinned the message |
| poll | PollResponseData | No | |
| poll_id | str | No | Identifier of the poll to include in the message |
| quoted_message | MessageResponse | No | Contains quoted message |
| quoted_message_id | str | No | |
| reaction_groups | Dict[str, Any] | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | bool | No | Whether thread reply should be shown in the channel as well |
| thread_participants | List[UserResponse] | No | List of users who participate in thread |
ModerationConfig
class ModerationConfig(TypedDict, total=False):
ai_image_config: AIImageConfig
ai_image_lite_config: BodyguardImageAnalysisConfig
ai_text_config: AITextConfig
ai_video_config: AIVideoConfig
async: bool
automod_platform_circumvention_config: AutomodPlatformCircumventionConfig
automod_semantic_filters_config: AutomodSemanticFiltersConfig
automod_toxicity_config: AutomodToxicityConfig
block_list_config: BlockListConfig
created_at: float
google_vision_config: GoogleVisionConfig
key: str
llm_config: LLMConfig
supported_video_call_harm_types: List[str]
team: str
updated_at: float
velocity_filter_config: VelocityFilterConfig
video_call_rule_config: VideoCallRuleConfigProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_config | AIImageConfig | No | |
| ai_image_lite_config | BodyguardImageAnalysisConfig | No | |
| ai_text_config | AITextConfig | No | |
| ai_video_config | AIVideoConfig | No | |
| async | bool | No | |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | |
| automod_toxicity_config | AutomodToxicityConfig | No | |
| block_list_config | BlockListConfig | No | |
| created_at | float | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | str | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | List[str] | No | |
| team | str | No | |
| updated_at | float | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationDashboardPreferences
class ModerationDashboardPreferences(TypedDict, total=False):
allowed_moderation_action_reasons: List[str]
async_review_queue_upsert: bool
disable_audit_logs: bool
disable_flagging_reviewed_entity: bool
escalation_queue_enabled: bool
escalation_reasons: List[str]
flag_user_on_flagged_content: bool
keyframe_classifications_map: Dict[str, Any]
media_queue_blur_enabled: bool
overview_dashboard: OverviewDashboardConfigProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| allowed_moderation_action_reasons | List[str] | No | |
| async_review_queue_upsert | bool | No | |
| disable_audit_logs | bool | No | |
| disable_flagging_reviewed_entity | bool | No | |
| escalation_queue_enabled | bool | No | |
| escalation_reasons | List[str] | No | |
| flag_user_on_flagged_content | bool | No | |
| keyframe_classifications_map | Dict[str, Any] | No | |
| media_queue_blur_enabled | bool | No | |
| overview_dashboard | OverviewDashboardConfig | No |
OnlyUserID
class OnlyUserID(TypedDict, total=False):
id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes |
OverviewDashboardConfig
class OverviewDashboardConfig(TypedDict, total=False):
default_date_range_days: int
visible_charts: List[str]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| default_date_range_days | int | No | |
| visible_charts | List[str] | No |
Permission
class Permission(TypedDict, total=False):
action: str
condition: Dict[str, Any]
custom: bool
description: str
id: str
level: str
name: str
owner: bool
same_team: bool
tags: List[str]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | str | Yes | Action name this permission is for (e.g. SendMessage) |
| custom | bool | Yes | Whether this is a custom permission or built-in |
| description | str | Yes | Description of the permission |
| id | str | Yes | Unique permission ID |
| level | str | Yes | Level at which permission could be applied (app or channel). One of: app, cha... |
| name | str | Yes | Name of the permission |
| owner | bool | Yes | Whether this permission applies to resource owner or not |
| same_team | bool | Yes | Whether this permission applies to teammates (multi-tenancy mode only) |
| tags | List[str] | Yes | List of tags of the permission |
| condition | Dict[str, Any] | No | MongoDB style condition which decides whether or not the permission is granted |
PollOptionInput
class PollOptionInput(TypedDict, total=False):
custom: Dict[str, Any]
text: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | No | |
| text | str | No |
PollOptionRequest
class PollOptionRequest(TypedDict, total=False):
custom: Dict[str, Any]
id: str
text: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | |
| custom | Dict[str, Any] | No | |
| text | str | No |
PollOptionResponse
class PollOptionResponse(TypedDict, total=False):
duration: str
poll_option: PollOptionResponseDataProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| poll_option | PollOptionResponseData | Yes | Poll option |
PollOptionResponseData
class PollOptionResponseData(TypedDict, total=False):
custom: Dict[str, Any]
id: str
text: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | Yes | |
| id | str | Yes | |
| text | str | Yes |
PollResponse
class PollResponse(TypedDict, total=False):
duration: str
poll: PollResponseDataProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | Yes | Poll |
PollResponseData
class PollResponseData(TypedDict, total=False):
allow_answers: bool
allow_user_suggested_options: bool
answers_count: int
created_at: float
created_by: UserResponse
created_by_id: str
custom: Dict[str, Any]
description: str
enforce_unique_vote: bool
id: str
is_closed: bool
latest_answers: List[PollVoteResponseData]
latest_votes_by_option: Dict[str, Any]
max_votes_allowed: int
name: str
options: List[PollOptionResponseData]
own_votes: List[PollVoteResponseData]
updated_at: float
vote_count: int
vote_counts_by_option: Dict[str, Any]
voting_visibility: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | bool | Yes | |
| allow_user_suggested_options | bool | Yes | |
| answers_count | int | Yes | |
| created_at | float | Yes | |
| created_by_id | str | Yes | |
| custom | Dict[str, Any] | Yes | |
| description | str | Yes | |
| enforce_unique_vote | bool | Yes | |
| id | str | Yes | |
| latest_answers | List[PollVoteResponseData] | Yes | |
| latest_votes_by_option | Dict[str, Any] | Yes | |
| name | str | Yes | |
| options | List[PollOptionResponseData] | Yes | |
| own_votes | List[PollVoteResponseData] | Yes | |
| updated_at | float | Yes | |
| vote_count | int | Yes | |
| vote_counts_by_option | Dict[str, Any] | Yes | |
| voting_visibility | str | Yes | |
| created_by | UserResponse | No | |
| is_closed | bool | No | |
| max_votes_allowed | int | No |
PollVoteResponseData
class PollVoteResponseData(TypedDict, total=False):
answer_text: str
created_at: float
id: str
is_answer: bool
option_id: str
poll_id: str
updated_at: float
user: UserResponse
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| id | str | Yes | |
| option_id | str | Yes | |
| poll_id | str | Yes | |
| updated_at | float | Yes | |
| answer_text | str | No | |
| is_answer | bool | No | |
| user | UserResponse | No | |
| user_id | str | No |
PollVotesResponse
class PollVotesResponse(TypedDict, total=False):
duration: str
next: str
prev: str
votes: List[PollVoteResponseData]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| votes | List[PollVoteResponseData] | Yes | Poll votes |
| next | str | No | |
| prev | str | No |
PrivacySettingsResponse
class PrivacySettingsResponse(TypedDict, total=False):
delivery_receipts: DeliveryReceiptsResponse
read_receipts: ReadReceiptsResponse
typing_indicators: TypingIndicatorsResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushConfig
class PushConfig(TypedDict, total=False):
offline_only: bool
version: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| version | str | Yes | |
| offline_only | bool | No |
PushPreferenceInput
class PushPreferenceInput(TypedDict, total=False):
call_level: str
channel_cid: str
chat_level: str
chat_preferences: ChatPreferencesInput
disabled_until: float
feeds_level: str
feeds_preferences: FeedsPreferences
remove_disable: bool
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_level | str | No | Set the level of call push notifications for the user. One of: all, none, def... |
| channel_cid | str | No | Set the push preferences for a specific channel. If empty it sets the default... |
| chat_level | str | No | Set the level of chat push notifications for the user. Note: "mentions" is de... |
| chat_preferences | ChatPreferencesInput | No | |
| disabled_until | float | No | Disable push notifications till a certain time |
| feeds_level | str | No | Set the level of feeds push notifications for the user. One of: all, none, de... |
| feeds_preferences | FeedsPreferences | No | Set granular feeds preferences for reactions, comments, new followers, mentio... |
| remove_disable | bool | No | Remove the disabled until time. (IE stop snoozing notifications) |
| user_id | str | No | The user id for which to set the push preferences. Required when using server... |
PushProvider
class PushProvider(TypedDict, total=False):
apn_auth_key: str
apn_auth_type: str
apn_development: bool
apn_host: str
apn_key_id: str
apn_notification_template: str
apn_p12_cert: str
apn_team_id: str
apn_topic: str
created_at: float
description: str
disabled_at: float
disabled_reason: str
firebase_apn_template: str
firebase_credentials: str
firebase_data_template: str
firebase_host: str
firebase_notification_template: str
firebase_server_key: str
huawei_app_id: str
huawei_app_secret: str
huawei_host: str
name: str
push_templates: List[PushTemplate]
type: str
updated_at: float
xiaomi_app_secret: str
xiaomi_package_name: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| name | str | Yes | |
| type | str | Yes | |
| updated_at | float | Yes | |
| apn_auth_key | str | No | |
| apn_auth_type | str | No | |
| apn_development | bool | No | |
| apn_host | str | No | |
| apn_key_id | str | No | |
| apn_notification_template | str | No | |
| apn_p12_cert | str | No | |
| apn_team_id | str | No | |
| apn_topic | str | No | |
| description | str | No | |
| disabled_at | float | No | |
| disabled_reason | str | No | |
| firebase_apn_template | str | No | |
| firebase_credentials | str | No | |
| firebase_data_template | str | No | |
| firebase_host | str | No | |
| firebase_notification_template | str | No | |
| firebase_server_key | str | No | |
| huawei_app_id | str | No | |
| huawei_app_secret | str | No | |
| huawei_host | str | No | |
| push_templates | List[PushTemplate] | No | |
| xiaomi_app_secret | str | No | |
| xiaomi_package_name | str | No |
PushProviderRequest
class PushProviderRequest(TypedDict, total=False):
apn_auth_key: str
apn_auth_type: str
apn_development: bool
apn_host: str
apn_key_id: str
apn_notification_template: str
apn_p12_cert: str
apn_team_id: str
apn_topic: str
description: str
disabled_at: float
disabled_reason: str
firebase_apn_template: str
firebase_credentials: str
firebase_data_template: str
firebase_host: str
firebase_notification_template: str
firebase_server_key: str
huawei_app_id: str
huawei_app_secret: str
name: str
type: str
xiaomi_app_secret: str
xiaomi_package_name: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | |
| apn_auth_key | str | No | |
| apn_auth_type | str | No | |
| apn_development | bool | No | |
| apn_host | str | No | |
| apn_key_id | str | No | |
| apn_notification_template | str | No | |
| apn_p12_cert | str | No | |
| apn_team_id | str | No | |
| apn_topic | str | No | |
| description | str | No | |
| disabled_at | float | No | |
| disabled_reason | str | No | |
| firebase_apn_template | str | No | |
| firebase_credentials | str | No | |
| firebase_data_template | str | No | |
| firebase_host | str | No | |
| firebase_notification_template | str | No | |
| firebase_server_key | str | No | |
| huawei_app_id | str | No | |
| huawei_app_secret | str | No | |
| type | str | No | |
| xiaomi_app_secret | str | No | |
| xiaomi_package_name | str | No |
PushProviderResponse
class PushProviderResponse(TypedDict, total=False):
apn_auth_key: str
apn_auth_type: str
apn_development: bool
apn_host: str
apn_key_id: str
apn_p12_cert: str
apn_sandbox_certificate: bool
apn_supports_remote_notifications: bool
apn_supports_voip_notifications: bool
apn_team_id: str
apn_topic: str
created_at: float
description: str
disabled_at: float
disabled_reason: str
firebase_apn_template: str
firebase_credentials: str
firebase_data_template: str
firebase_host: str
firebase_notification_template: str
firebase_server_key: str
huawei_app_id: str
huawei_app_secret: str
name: str
type: str
updated_at: float
xiaomi_app_secret: str
xiaomi_package_name: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| name | str | Yes | |
| type | str | Yes | |
| updated_at | float | Yes | |
| apn_auth_key | str | No | |
| apn_auth_type | str | No | |
| apn_development | bool | No | |
| apn_host | str | No | |
| apn_key_id | str | No | |
| apn_p12_cert | str | No | |
| apn_sandbox_certificate | bool | No | |
| apn_supports_remote_notifications | bool | No | |
| apn_supports_voip_notifications | bool | No | |
| apn_team_id | str | No | |
| apn_topic | str | No | |
| description | str | No | |
| disabled_at | float | No | |
| disabled_reason | str | No | |
| firebase_apn_template | str | No | |
| firebase_credentials | str | No | |
| firebase_data_template | str | No | |
| firebase_host | str | No | |
| firebase_notification_template | str | No | |
| firebase_server_key | str | No | |
| huawei_app_id | str | No | |
| huawei_app_secret | str | No | |
| xiaomi_app_secret | str | No | |
| xiaomi_package_name | str | No |
PushTemplate
class PushTemplate(TypedDict, total=False):
created_at: float
enable_push: bool
event_type: str
template: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| enable_push | bool | Yes | |
| event_type | str | Yes | |
| updated_at | float | Yes | |
| template | str | No |
PushTemplateResponse
class PushTemplateResponse(TypedDict, total=False):
created_at: float
enable_push: bool
event_type: str
push_provider_internal_id: str
template: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Time when the template was created |
| enable_push | bool | Yes | Whether push notification is enabled for this event |
| event_type | str | Yes | Type of event this template applies to |
| push_provider_internal_id | str | Yes | Internal ID of the push provider |
| updated_at | float | Yes | Time when the template was last updated |
| template | str | No | The push notification template |
QueryPollsResponse
class QueryPollsResponse(TypedDict, total=False):
duration: str
next: str
polls: List[PollResponseData]
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| polls | List[PollResponseData] | Yes | Polls data returned by the query |
| next | str | No | |
| prev | str | No |
QueryUsersResponse
class QueryUsersResponse(TypedDict, total=False):
duration: str
users: List[FullUserResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| users | List[FullUserResponse] | Yes | Array of users as result of filters applied. |
ReactionResponse
class ReactionResponse(TypedDict, total=False):
created_at: float
custom: Dict[str, Any]
message_id: str
score: int
type: str
updated_at: float
user: UserResponse
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| custom | Dict[str, Any] | Yes | Custom data for this object |
| message_id | str | Yes | Message ID |
| score | int | Yes | Score of the reaction |
| type | str | Yes | Type of reaction |
| updated_at | float | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | str | Yes | User ID |
ReactivateUserResponse
class ReactivateUserResponse(TypedDict, total=False):
duration: str
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
ReactivateUsersResponse
Basic response information
class ReactivateUsersResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| task_id | str | Yes |
RemoveUserGroupMembersResponse
Response for removing members from a user group
class RemoveUserGroupMembersResponse(TypedDict, total=False):
duration: str
user_group: UserGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
Response
Basic response information
class Response(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
Role
class Role(TypedDict, total=False):
created_at: float
custom: bool
name: str
scopes: List[str]
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | Date/time of creation |
| custom | bool | Yes | Whether this is a custom role or built-in |
| name | str | Yes | Unique role name |
| scopes | List[str] | Yes | List of scopes where this role is currently present. .app means that role i... |
| updated_at | float | Yes | Date/time of the last update |
S3Request
Config for creating Amazon S3 storage.
class S3Request(TypedDict, total=False):
s3_api_key: str
s3_custom_endpoint_url: str
s3_region: str
s3_secret: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| s3_region | str | Yes | The AWS region where the bucket is hosted |
| s3_api_key | str | No | The AWS API key. To use Amazon S3 as your storage provider, you have two auth... |
| s3_custom_endpoint_url | str | No | The custom endpoint for S3. If you want to use a custom endpoint, you must al... |
| s3_secret | str | No | The AWS API Secret |
SearchUserGroupsResponse
Response for searching user groups
class SearchUserGroupsResponse(TypedDict, total=False):
duration: str
user_groups: List[UserGroupResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_groups | List[UserGroupResponse] | Yes | List of matching user groups |
SharedLocationResponse
class SharedLocationResponse(TypedDict, total=False):
channel: ChannelResponse
channel_cid: str
created_at: float
created_by_device_id: str
duration: str
end_at: float
latitude: float
longitude: float
message: MessageResponse
message_id: str
updated_at: float
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | str | Yes | Channel CID |
| created_at | float | Yes | Date/time of creation |
| created_by_device_id | str | Yes | Device ID that created the live location |
| duration | str | Yes | |
| latitude | float | Yes | Latitude coordinate |
| longitude | float | Yes | Longitude coordinate |
| message_id | str | Yes | Message ID |
| updated_at | float | Yes | Date/time of the last update |
| user_id | str | Yes | User ID |
| channel | ChannelResponse | No | |
| end_at | float | No | Time when the live location expires |
| message | MessageResponse | No |
SharedLocationResponseData
class SharedLocationResponseData(TypedDict, total=False):
channel: ChannelResponse
channel_cid: str
created_at: float
created_by_device_id: str
end_at: float
latitude: float
longitude: float
message: MessageResponse
message_id: str
updated_at: float
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | str | Yes | |
| created_at | float | Yes | |
| created_by_device_id | str | Yes | |
| latitude | float | Yes | |
| longitude | float | Yes | |
| message_id | str | Yes | |
| updated_at | float | Yes | |
| user_id | str | Yes | |
| channel | ChannelResponse | No | |
| end_at | float | No | |
| message | MessageResponse | No |
SharedLocationsResponse
class SharedLocationsResponse(TypedDict, total=False):
active_live_locations: List[SharedLocationResponseData]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_live_locations | List[SharedLocationResponseData] | Yes | |
| duration | str | Yes |
SortParamRequest
class SortParamRequest(TypedDict, total=False):
direction: int
field: str
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | int | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | str | No | Name of field to sort by |
| type | str | No | Type of field to sort by. Empty string or omitted means string type (default)... |
Time
class Time(TypedDict, total=False):
passUnblockUsersResponse
class UnblockUsersResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
UpdateBlockListResponse
Basic response information
class UpdateBlockListResponse(TypedDict, total=False):
blocklist: BlockListResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
UpdateExternalStorageResponse
Basic response information
class UpdateExternalStorageResponse(TypedDict, total=False):
bucket: str
duration: str
name: str
path: str
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | str | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
| name | str | Yes | |
| path | str | Yes | |
| type | str | Yes |
UpdateUserGroupResponse
Response for updating a user group
class UpdateUserGroupResponse(TypedDict, total=False):
duration: str
user_group: UserGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
UpdateUserPartialRequest
class UpdateUserPartialRequest(TypedDict, total=False):
id: str
set: Dict[str, Any]
unset: List[str]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | User ID to update |
| set | Dict[str, Any] | No | |
| unset | List[str] | No |
UpdateUsersResponse
class UpdateUsersResponse(TypedDict, total=False):
duration: str
membership_deletion_task_id: str
users: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| membership_deletion_task_id | str | Yes | |
| users | Dict[str, Any] | Yes | Object containing users |
UpsertExternalStorageAWSS3Request
class UpsertExternalStorageAWSS3Request(TypedDict, total=False):
bucket: str
path_prefix: str
region: str
role_arn: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | str | Yes | |
| region | str | Yes | |
| role_arn | str | Yes | |
| path_prefix | str | No |
UpsertExternalStorageResponse
Basic response information
class UpsertExternalStorageResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
UpsertPushPreferencesResponse
class UpsertPushPreferencesResponse(TypedDict, total=False):
duration: str
user_channel_preferences: Dict[str, Any]
user_preferences: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| user_channel_preferences | Dict[str, Any] | Yes | The channel specific push notification preferences, only returned for channel... |
| user_preferences | Dict[str, Any] | Yes | The user preferences, always returned regardless if you edited it |
UpsertPushProviderResponse
Basic response information
class UpsertPushProviderResponse(TypedDict, total=False):
duration: str
push_provider: PushProviderResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| push_provider | PushProviderResponse | Yes |
UpsertPushTemplateResponse
Basic response information
class UpsertPushTemplateResponse(TypedDict, total=False):
duration: str
template: PushTemplateResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| template | PushTemplateResponse | No |
User
class User(TypedDict, total=False):
data: Dict[str, Any]
id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | |
| data | Dict[str, Any] | No |
UserGroupResponse
class UserGroupResponse(TypedDict, total=False):
created_at: float
created_by: str
description: str
id: str
members: List[UserGroupMember]
name: str
team_id: str
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| id | str | Yes | |
| name | str | Yes | |
| updated_at | float | Yes | |
| created_by | str | No | |
| description | str | No | |
| members | List[UserGroupMember] | No | |
| team_id | str | No |
UserRequest
User request object
class UserRequest(TypedDict, total=False):
custom: Dict[str, Any]
id: str
image: str
invisible: bool
language: str
name: str
privacy_settings: PrivacySettingsResponse
role: str
teams: List[str]
teams_role: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | User ID |
| custom | Dict[str, Any] | No | Custom user data |
| image | str | No | User's profile image URL |
| invisible | bool | No | |
| language | str | No | |
| name | str | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | str | No | User's global role |
| teams | List[str] | No | List of teams the user belongs to |
| teams_role | Dict[str, Any] | No | Map of team-specific roles for the user |
UserResponse
User response object
class UserResponse(TypedDict, total=False):
avg_response_time: int
ban_expires: float
banned: bool
blocked_user_ids: List[str]
bypass_moderation: bool
created_at: float
custom: Dict[str, Any]
deactivated_at: float
deleted_at: float
devices: List[DeviceResponse]
id: str
image: str
invisible: bool
language: str
last_active: float
name: str
online: bool
privacy_settings: PrivacySettingsResponse
push_notifications: PushNotificationSettingsResponse
revoke_tokens_issued_before: float
role: str
shadow_banned: bool
teams: List[str]
teams_role: Dict[str, Any]
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | List[str] | Yes | |
| created_at | float | Yes | Date/time of creation |
| custom | Dict[str, Any] | Yes | Custom data for this object |
| id | str | Yes | Unique user identifier |
| invisible | bool | Yes | |
| language | str | Yes | Preferred language of a user |
| online | bool | Yes | Whether a user online or not |
| role | str | Yes | Determines the set of user permissions |
| shadow_banned | bool | Yes | Whether a user is shadow banned |
| teams | List[str] | Yes | List of teams user is a part of |
| updated_at | float | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float | No | Date of deactivation |
| deleted_at | float | No | Date/time of deletion |
| devices | List[DeviceResponse] | No | List of devices user is using |
| image | str | No | |
| last_active | float | No | Date of last activity |
| name | str | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | float | No | Revocation date for tokens |
| teams_role | Dict[str, Any] | No |
ValidateExternalStorageResponse
Basic response information
class ValidateExternalStorageResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
VelocityFilterConfig
class VelocityFilterConfig(TypedDict, total=False):
advanced_filters: bool
async: bool
cascading_actions: bool
cids_per_user: int
enabled: bool
first_message_only: bool
rules: List[VelocityFilterConfigRule]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | bool | No | |
| async | bool | No | |
| cascading_actions | bool | No | |
| cids_per_user | int | No | |
| enabled | bool | No | |
| first_message_only | bool | No | |
| rules | List[VelocityFilterConfigRule] | No |
VideoCallRuleConfig
class VideoCallRuleConfig(TypedDict, total=False):
flag_all_labels: bool
flagged_labels: List[str]
rules: List[HarmConfig]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | bool | No | |
| flagged_labels | List[str] | No | |
| rules | List[HarmConfig] | No |
XiaomiConfig
class XiaomiConfig(TypedDict, total=False):
Disabled: bool
package_name: str
secret: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| package_name | str | No | |
| secret | str | No |