Appearance
Common
About 15910 wordsAbout 53 min
Python SDK - Feeds 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 and verify the configuration of your app. Use this method when you need to access or review the app's settings for troubleshooting or validation purposes.
Example
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 adjust the configuration according to your requirements. This method is useful when you need to update settings to improve functionality or comply with new policies.
Example
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
Obtain a list of all block lists to manage or review the existing lists effectively. Use this method when you need a comprehensive overview of all block lists in your system.
Example
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
Establish a new block list to prevent certain elements from interacting with your application. This method is essential when introducing new restrictions or security measures.
Example
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 the details of a specific block list to understand its contents and purpose. Use this method when you need to inspect or verify the entries of a particular block list.
Example
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, remove, or change its entries. This is useful when updating the list to reflect new restrictions or allow previously blocked interactions.
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 block list to eliminate its restrictions from your application. Use this method when a block list is no longer needed, or when consolidating lists for efficiency.
Example
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 configuration and status of push notification services to ensure they are functioning correctly. This method is beneficial when diagnosing issues or confirming the setup of push notifications.
Example
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
Check the configuration and status of SNS (Simple Notification Service) to ensure proper operation. Use this method when you need to troubleshoot or validate SNS integration.
Example
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
Assess the configuration and status of SQS (Simple Queue Service) to ensure messages are being processed correctly. This is helpful for troubleshooting issues or confirming the setup of SQS.
Example
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 comprehensive list of all registered devices, useful for monitoring and managing device inventory.
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 system, ideal for onboarding new hardware into your network.
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 specific device from your records, perfect for decommissioning or replacing outdated equipment.
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 complete list of users, helpful for data analysis or migration to other systems.
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
Get an overview of all configured external storage options, useful for managing and optimizing data storage solutions.
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 configuration, enabling you to expand your data storage capabilities.
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 an existing external storage setup, allowing for adjustments in storage parameters or credentials.
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 retiring or replacing storage solutions.
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 an external storage system, ensuring reliable data access and storage integrity.
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, ideal for providing limited access to your system without creating a permanent account.
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 system, useful for initiating data imports via a web link.
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 active and completed data imports, helping users track the status and history of 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, allowing users to bring external data into the system for further analysis or usage.
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
Provides a list of all tasks associated with the version 2 import process, enabling users to monitor and manage complex data 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 task within the version 2 import framework, offering more granular control over individual data import operations.
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 about an external storage configuration. Use this method to check the settings of a previously configured external storage system.
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
Create or update an external storage configuration. Use this method to ensure your external storage settings are current and correct.
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 method when you want to disconnect or clean up unused storage settings.
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
Verify the connectivity and configuration of an external storage system. Use this method to test and confirm that your external storage setup is functioning properly.
Example
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 detailed information about a specific version 2 import task, allowing users to check the progress and details of their import activities.
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 task from the version 2 import process, useful for canceling unwanted or erroneous data import operations.
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
Obtains details about a specific data import, providing users with insights into the import’s configuration and status.
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 can be used to enhance the display of web content when shared on social media platforms.
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 to a user or within a system, helping users understand their access rights and control over data and functionalities.
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 permission settings for a specific user or entity, useful for checking access rights before performing operations.
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
Initiate a new poll with specified parameters, ideal for gathering feedback or opinions from a group of users.
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's details, such as its title or description, to keep it relevant and up-to-date.
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
Search and filter through existing polls based on specific criteria, helping you quickly find the polls of interest.
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 the details of a specific poll, essential for reviewing its content and status before engagement.
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 targeted updates to specific fields of a poll without altering its entire structure, useful for quick adjustments.
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 system, useful for maintaining a clean and relevant set of active 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, expanding the choices available to participants for more comprehensive feedback.
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 an existing poll option to correct or improve the available responses, ensuring clarity and accuracy.
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 details about a specific poll option, aiding in the analysis or review of available choices 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 a poll, useful for managing and updating active polls by eliminating outdated or incorrect choices.
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 poll, enabling you to assess poll engagement and results 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 user preferences for receiving push notifications, ensuring users only receive relevant and desired notifications.
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
Obtain a list of all available push notification providers, helpful for understanding your options and managing your notification delivery services.
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
Create or update the configuration of a push notification provider, allowing you to maintain an effective notification system by adding new providers or adjusting existing ones.
Example
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 system, ideal for cleaning up outdated configurations or switching to a different service provider.
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
Access a collection of predefined push notification templates, streamlining the process of sending consistent and branded notifications to your 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, enabling you to maintain up-to-date and relevant messaging for your user communications.
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
Retrieve the current rate limits applied to your API usage, helping you understand and manage your application's request throughput.
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
Get a comprehensive list of all defined user roles within your application, useful for managing permissions and access control effectively.
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 system to define specific permissions and access levels for users. Use this method to manage and assign roles that align with your organizational needs.
Example
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 system to maintain an updated and efficient role management structure. Use this method when a role is no longer needed or applicable.
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 and progress of a specific task to monitor its completion and identify potential issues. Use this method to track task performance and ensure timely updates.
Example
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
Add a file to the server to facilitate storage and access within your application. Use this method to manage file resources and enhance document availability for users.
Example
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 file from the server to manage storage and ensure only relevant files are retained. Use this method to free up space and maintain an organized file system.
Example
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 server for integration into your application’s content. Use this method to manage visual assets and improve the aesthetic and functional aspects of your application.
Example
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
Delete an image from the server to manage space and ensure only necessary images are stored. Use this method when an image is outdated or no longer required.
Example
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 method to view all existing user groups in your system for management or auditing purposes.
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
Establish a new user group. Use this method to organize users into a new group for easier management and permissions assignment.
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 method to quickly locate user groups that meet certain conditions or attributes.
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
Obtain detailed information about a specific user group. Use this method to review the properties and configuration of a particular user group.
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 the attributes or membership of a user group as needed.
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 method when a user group is no longer needed, to maintain cleanliness and organization.
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 multiple users to a specified user group, streamlining group management and access control. Ideal for onboarding new team members or updating group memberships efficiently.
Example
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 allows you to remove multiple users from a specified user group, helping to maintain organized and current access permissions. It is useful for managing group changes when users no longer need access or have left a team.
Example
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
Retrieve information about users based on specific criteria to analyze user data or make informed decisions. Use this method to efficiently filter and access user details in your application.
Example
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 or modify user information to ensure current and accurate user data within the system. Use this method to manage user profiles effectively and support proper user engagement.
Example
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
Apply partial updates to a user's information, allowing for specific changes without overwriting the entire user profile. Use this method for targeted updates to user data, enhancing flexibility and precision.
Example
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 that have been blocked. Use this method to monitor and manage users who are restricted from accessing certain features or areas of your application.
Example
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
Prevent specified users from accessing certain features or areas of your application. This method is useful for managing user behavior and maintaining community standards.
Example
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
Temporarily disable the accounts of specified users, making them inactive. Use this when you need to pause a user's access without permanently deleting their data.
Example
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 users and all their associated data from your application. Use this method for irreversible actions when you need to completely eliminate a user's presence.
Example
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
Fetch the current live location data of users. This is useful in applications where real-time location tracking is necessary, such as delivery or ride-sharing services.
Example
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
Update the live location data for a user. Use this method to ensure that your application has the most current and accurate location information for users.
Example
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
Reactivate previously deactivated user accounts, restoring their access to the application. Use this method to reinstate users who were temporarily paused.
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
Restore users and their data after they have been deleted, if you have a recovery mechanism in place. This is useful for recovering mistakenly deleted user accounts.
Example
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 the block on specified users, allowing them to regain access to previously restricted features or areas. Use this to reverse previous blocking actions when a user is deemed compliant.
Example
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
Temporarily deactivate a single user account, suspending their access. Use this when you need to pause an individual user's account without deleting their data.
Example
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
ExportUser allows you to retrieve all data associated with a specific user in a structured format, which is useful for data analysis, migration, or compliance purposes.
Example
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
ReactivateUser enables you to restore a previously deactivated user account, making it active again, which is beneficial for reinstating user access after temporary deactivation.
Example
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 |
PagerRequest
class PagerRequest(TypedDict, total=False):
limit: int
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | int | No | |
| next | str | No | |
| prev | 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 |