Appearance
Moderation
About 11257 wordsAbout 38 min
Typescript SDK - Feeds API
Table of Contents
- insertActionLog
- appeal
- getAppeal
- queryAppeals
- ban
- bulkImageModeration
- bypass
- check
- checkS3Access
- upsertConfig
- getConfig
- deleteConfig
- queryModerationConfigs
- customCheck
- v2QueryTemplates
- v2UpsertTemplate
- v2DeleteTemplate
- flag
- getFlagCount
- queryModerationFlags
- queryModerationLogs
- upsertModerationRule
- getModerationRule
- deleteModerationRule
- queryModerationRules
- mute
- queryReviewQueue
- getReviewQueueItem
- submitAction
- unban
- unmute
- Types Reference
insertActionLog
Records a moderation action into the log, useful for tracking and auditing moderation activities performed on the platform.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Insert moderation action log
const response = await client.feeds.insertActionLog({
action_type: 'value',
entity_creator_id: 'value',
entity_id: 'value',
entity_type: 'value',
custom: {},
reason: 'value',
});
console.log(response);Response: InsertActionLogResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| action_type | string | Yes | Type of moderation action taken |
| entity_creator_id | string | Yes | ID of the user who created the entity |
| entity_id | string | Yes | ID of the entity the action was taken on |
| entity_type | string | Yes | Type of entity the action was taken on |
| custom | Record<string, any> | No | Custom metadata for the action log |
| reason | string | No | Reason for the action |
appeal
Submit a request to review and potentially overturn a moderation decision; use this when you believe a moderation action was taken in error.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Appeal against the moderation decision
const response = await client.feeds.appeal({
appeal_reason: 'value',
entity_id: 'value',
entity_type: 'value',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with attachments
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Appeal against the moderation decision
const response = await client.feeds.appeal({
appeal_reason: 'value',
entity_id: 'value',
entity_type: 'value',
attachments: [],
});
console.log(response);Response: AppealResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| appeal_reason | string | Yes | Explanation for why the content is being appealed |
| entity_id | string | Yes | Unique identifier of the entity being appealed |
| entity_type | string | Yes | Type of entity being appealed (e.g., message, user) |
| attachments | []string | No | Array of Attachment URLs(e.g., images) |
| user | UserRequest | No | - |
| user_id | string | No | - |
getAppeal
Retrieve details about a specific appeal, allowing you to track the status and outcome of your request for review.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get appeal item
const response = await client.feeds.getAppeal({
id: 'activity-123',
});
console.log(response);Response: GetAppealResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
queryAppeals
Search and filter through multiple appeals to manage and assess ongoing or past moderation challenges effectively.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query Appeals
const response = await client.feeds.queryAppeals({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query Appeals
const response = await client.feeds.queryAppeals({
sort: [],
next: null,
});
console.log(response);Example: with user and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query Appeals
const response = await client.feeds.queryAppeals({
user: { id: 'activity-123', custom: {} },
prev: null,
});
console.log(response);Response: QueryAppealsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filter conditions for appeals |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for appeals |
| user | UserRequest | No | - |
| user_id | string | No | - |
ban
Restrict a user from accessing services or content, useful when enforcing community guidelines and maintaining a safe environment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Ban
const response = await client.feeds.ban({
target_user_id: 'value',
banned_by: { id: 'activity-123', custom: {} },
banned_by_id: 'value',
});
console.log(response);Example: with channel_cid and delete_messages
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Ban
const response = await client.feeds.ban({
target_user_id: 'value',
channel_cid: 'value',
delete_messages: 'value',
});
console.log(response);Example: with ip_ban and reason
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Ban
const response = await client.feeds.ban({
target_user_id: 'value',
ip_ban: false,
reason: 'value',
});
console.log(response);Example: with shadow and timeout
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Ban
const response = await client.feeds.ban({
target_user_id: 'value',
shadow: false,
timeout: 10,
});
console.log(response);Response: BanResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| target_user_id | string | Yes | ID of the user to ban |
| banned_by | UserRequest | No | Details about the user performing the ban |
| banned_by_id | string | No | ID of the user performing the ban |
| channel_cid | string | No | Channel where the ban applies |
| delete_messages | string | No | - |
| ip_ban | boolean | No | Whether to ban the user's IP address |
| reason | string | No | Optional explanation for the ban |
| shadow | boolean | No | Whether this is a shadow ban |
| timeout | number | No | Duration of the ban in minutes |
bulkImageModeration
Process multiple images simultaneously for content compliance, ideal for efficiently managing large batches of visual content.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Bulk image moderation
const response = await client.feeds.bulkImageModeration({
csv_file: 'value',
});
console.log(response);Response: BulkImageModerationResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| csv_file | string | Yes | URL to CSV file containing image URLs to moderate |
bypass
Allows a specific content or user to bypass moderation checks, typically used in scenarios where trusted entities need uninterrupted access.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Bypass Moderation
const response = await client.feeds.bypass({
enabled: false,
target_user_id: 'value',
});
console.log(response);Response: BypassResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Yes | Whether to enable moderation bypass for this user |
| target_user_id | string | Yes | ID of the user to update |
check
Evaluate content against moderation policies to ensure compliance, used to verify that user-generated content adheres to community standards.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check
const response = await client.feeds.check({
entity_creator_id: 'value',
entity_id: 'value',
entity_type: 'value',
user_id: 'john',
config_key: 'value',
});
console.log(response);Example: with config_team and content_published_at
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check
const response = await client.feeds.check({
entity_creator_id: 'value',
entity_id: 'value',
entity_type: 'value',
config_team: 'value',
content_published_at: 10,
});
console.log(response);Example: with moderation_payload and options
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check
const response = await client.feeds.check({
entity_creator_id: 'value',
entity_id: 'value',
entity_type: 'value',
moderation_payload: { custom: {} },
options: {},
});
console.log(response);Example: with test_mode and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check
const response = await client.feeds.check({
entity_creator_id: 'value',
entity_id: 'value',
entity_type: 'value',
test_mode: false,
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: CheckResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| entity_creator_id | string | Yes | ID of the user who created the entity |
| entity_id | string | Yes | Unique identifier of the entity to moderate |
| entity_type | string | Yes | Type of entity to moderate |
| config | ModerationConfig | No | Custom moderation configuration (test mode only) |
| config_key | string | No | Key of the moderation configuration to use |
| config_team | string | No | Team associated with the configuration |
| content_published_at | float | No | Original timestamp when the content was produced (for correlating flagged content with source vid... |
| moderation_payload | ModerationPayload | No | Content to be moderated |
| options | Record<string, any> | No | Additional moderation configuration options |
| test_mode | boolean | No | Whether to run moderation in test mode |
| user | UserRequest | No | - |
| user_id | string | No | - |
checkS3Access
Verifies if an image stored in Amazon S3 is accessible, ensuring that media files are correctly permissioned and available for use.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Check S3 image access
const response = await client.feeds.checkS3Access({
s3_url: 'value',
});
console.log(response);Response: CheckS3AccessResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| s3_url | string | No | Optional stream+s3:// reference to test access against |
upsertConfig
Create or update rules for content moderation, enabling customization and refinement of moderation strategies to suit specific needs.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create or update moderation configuration
const response = await client.feeds.upsertConfig({
key: 'value',
user_id: 'john',
ai_text_config: { async: false },
});
console.log(response);Example: with ai_video_config and async
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create or update moderation configuration
const response = await client.feeds.upsertConfig({
key: 'value',
ai_video_config: { async: false },
async: false,
});
console.log(response);Example: with automod_platform_circumvention_config and automod_semantic_filters_config
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create or update moderation configuration
const response = await client.feeds.upsertConfig({
key: 'value',
automod_platform_circumvention_config: { async: false },
automod_semantic_filters_config: { async: false },
});
console.log(response);Example: with automod_toxicity_config and aws_rekognition_config
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create or update moderation configuration
const response = await client.feeds.upsertConfig({
key: 'value',
automod_toxicity_config: { async: false },
aws_rekognition_config: { async: false },
});
console.log(response);Response: UpsertConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Unique identifier for the moderation configuration |
| ai_image_config | AIImageConfig | No | Configuration for AI image analysis |
| ai_text_config | AITextConfig | No | Configuration for AI text analysis |
| ai_video_config | AIVideoConfig | No | Configuration for AI video analysis |
| async | boolean | No | Whether moderation should be performed asynchronously |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | Configuration for platform circumvention detection |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | Configuration for semantic filtering |
| automod_toxicity_config | AutomodToxicityConfig | No | Configuration for toxicity detection |
| aws_rekognition_config | AIImageConfig | No | - |
| block_list_config | BlockListConfig | No | Configuration for block list filtering |
| bodyguard_config | AITextConfig | No | - |
| google_vision_config | GoogleVisionConfig | No | Configuration for Google Vision integration |
| llm_config | LLMConfig | No | Configuration for customer-configured LLM moderation |
| rule_builder_config | RuleBuilderConfig | No | Configuration for custom rule builder (max 3 rules, max 5 conditions per rule) |
| team | string | No | Team associated with the configuration |
| user | UserRequest | No | - |
| user_id | string | No | Optional user ID to associate with the audit log entry |
| velocity_filter_config | VelocityFilterConfig | No | Configuration for velocity-based filtering |
| video_call_rule_config | VideoCallRuleConfig | No | - |
getConfig
Access the current configuration settings for moderation, allowing you to review and understand the active rules and policies.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get moderation configuration
const response = await client.feeds.getConfig({
key: 'value',
team: 'value',
});
console.log(response);Response: GetConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | - |
| team | string | No | - |
deleteConfig
Remove an existing moderation policy, useful for retiring outdated rules or simplifying moderation strategies.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a moderation policy
const response = await client.feeds.deleteConfig({
key: 'value',
user_id: 'john',
team: 'value',
});
console.log(response);Response: DeleteModerationConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | - |
| team | string | No | - |
| user_id | string | No | - |
queryModerationConfigs
Search through various moderation configurations to compare, audit, or manage different policy setups efficiently.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation configurations
const response = await client.feeds.queryModerationConfigs({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation configurations
const response = await client.feeds.queryModerationConfigs({
sort: [],
next: null,
});
console.log(response);Example: with user and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation configurations
const response = await client.feeds.queryModerationConfigs({
user: { id: 'activity-123', custom: {} },
prev: null,
});
console.log(response);Response: QueryModerationConfigsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filter conditions for moderation configs |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the results |
| user | UserRequest | No | - |
| user_id | string | No | - |
customCheck
Performs a custom check on content to determine if it adheres to specific moderation criteria, useful for applying tailored moderation rules to unique content types.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Custom check endpoint
const response = await client.feeds.customCheck({
entity_id: 'value',
entity_type: 'value',
flags: [],
user_id: 'john',
moderation_payload: { custom: {} },
});
console.log(response);Example: with user and entity_creator_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Custom check endpoint
const response = await client.feeds.customCheck({
entity_id: 'value',
entity_type: 'value',
flags: [],
user: { id: 'activity-123', custom: {} },
entity_creator_id: 'value',
});
console.log(response);Response: CustomCheckResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| entity_id | string | Yes | Unique identifier of the entity |
| entity_type | string | Yes | Type of entity to perform custom check on |
| flags | []CustomCheckFlag | Yes | List of custom check flags (1-10 flags required) |
| entity_creator_id | string | No | ID of the user who created the entity (required for non-message entities) |
| moderation_payload | ModerationPayloadRequest | No | Content to be checked (required for non-message entities) |
| user | UserRequest | No | - |
| user_id | string | No | - |
v2QueryTemplates
Retrieves a list of available moderation templates, helping users to understand and select predefined moderation criteria that can be applied to their content.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feed moderation templates
const response = await client.feeds.v2QueryTemplates();
console.log(response);Response: QueryFeedModerationTemplatesResponse
v2UpsertTemplate
Creates or updates a moderation template, allowing users to define or modify the criteria used for evaluating content across feeds.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert feeds template
const response = await client.feeds.v2UpsertTemplate({
config: { data_types: {}, config_key: 'value' },
name: 'My Feed',
});
console.log(response);Response: UpsertModerationTemplateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| config | FeedsModerationTemplateConfigPayload | Yes | Configuration for the moderation template |
| name | string | Yes | Name of the moderation template |
v2DeleteTemplate
Removes a specified moderation template, enabling users to manage and streamline the moderation criteria available for content evaluation.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a moderation template
const response = await client.feeds.v2DeleteTemplate();
console.log(response);Response: DeleteModerationTemplateResponse
flag
Marks content for moderation review, allowing users to identify and address potentially inappropriate or harmful content within their feeds.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Flag content for moderation
const response = await client.feeds.flag({
entity_id: 'value',
entity_type: 'value',
user_id: 'john',
entity_creator_id: 'value',
});
console.log(response);Example: with moderation_payload and reason
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Flag content for moderation
const response = await client.feeds.flag({
entity_id: 'value',
entity_type: 'value',
moderation_payload: { custom: {} },
reason: 'value',
});
console.log(response);Example: with user and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Flag content for moderation
const response = await client.feeds.flag({
entity_id: 'value',
entity_type: 'value',
user: { id: 'activity-123', custom: {} },
custom: {},
});
console.log(response);Response: FlagResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| entity_id | string | Yes | Unique identifier of the entity being flagged |
| entity_type | string | Yes | Type of entity being flagged (e.g., message, user) |
| custom | Record<string, any> | No | Additional metadata about the flag |
| entity_creator_id | string | No | ID of the user who created the flagged entity |
| moderation_payload | ModerationPayload | No | Content being flagged |
| reason | string | No | Optional explanation for why the content is being flagged |
| user | UserRequest | No | - |
| user_id | string | No | - |
getFlagCount
Retrieves the total number of flags raised against a user, enabling moderation teams to assess user behavior and identify potential issues.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get flag count for a user
const response = await client.feeds.getFlagCount({
entity_creator_id: 'value',
entity_type: 'value',
});
console.log(response);Response: GetFlagCountResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| entity_creator_id | string | Yes | ID of the user whose content was flagged |
| entity_type | string | No | Optional entity type filter (e.g., stream:chat:v1:message, stream:user) |
queryModerationFlags
Fetches a list of content that has been flagged for moderation, assisting users in monitoring and reviewing items that may breach community standards.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation flags
const response = await client.feeds.queryModerationFlags({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation flags
const response = await client.feeds.queryModerationFlags({
prev: null,
next: null,
});
console.log(response);Response: QueryModerationFlagsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | - |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | - |
queryModerationLogs
Provides access to logs of moderation actions taken, offering users transparency and the ability to audit past moderation decisions and activities.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation action logs
const response = await client.feeds.queryModerationLogs({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation action logs
const response = await client.feeds.queryModerationLogs({
sort: [],
next: null,
});
console.log(response);Example: with user and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation action logs
const response = await client.feeds.queryModerationLogs({
user: { id: 'activity-123', custom: {} },
prev: null,
});
console.log(response);Response: QueryModerationLogsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filter conditions for moderation logs |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the results |
| user | UserRequest | No | - |
| user_id | string | No | - |
upsertModerationRule
Creates or updates a specific moderation rule, enabling users to customize the criteria used to assess and manage content within their platform.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert moderation rule
const response = await client.feeds.upsertModerationRule({
name: 'My Feed',
rule_type: 'value',
user_id: 'john',
action_sequences: [],
});
console.log(response);Example: with conditions and config_keys
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert moderation rule
const response = await client.feeds.upsertModerationRule({
name: 'My Feed',
rule_type: 'value',
conditions: [],
config_keys: [],
});
console.log(response);Example: with cooldown_period and description
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert moderation rule
const response = await client.feeds.upsertModerationRule({
name: 'My Feed',
rule_type: 'value',
cooldown_period: 'value',
description: 'A description',
});
console.log(response);Example: with enabled and groups
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert moderation rule
const response = await client.feeds.upsertModerationRule({
name: 'My Feed',
rule_type: 'value',
enabled: false,
groups: [],
});
console.log(response);Response: UpsertModerationRuleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Unique rule name |
| rule_type | string | Yes | Type of rule: user, content, or call |
| action | RuleBuilderAction | No | Action for user/content rules |
| action_sequences | []CallRuleActionSequence | No | Escalation sequences for call rules |
| conditions | []RuleBuilderCondition | No | Flat list of conditions (legacy) |
| config_keys | []string | No | List of config keys this rule applies to |
| cooldown_period | string | No | Duration before rule can trigger again (e.g. 24h, 7d) |
| description | string | No | Optional description of the rule |
| enabled | boolean | No | Whether the rule is active |
| groups | []RuleBuilderConditionGroup | No | Nested condition groups |
| logic | string | No | Logical operator between conditions/groups: AND or OR |
| team | string | No | Team scope for the rule |
| user | UserRequest | No | - |
| user_id | string | No | Optional user ID to associate with the audit log entry |
getModerationRule
Retrieves details of a specified moderation rule, helping users to review and understand the criteria applied to content moderation processes.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get moderation rule
const response = await client.feeds.getModerationRule();
console.log(response);Response: GetModerationRuleResponse
deleteModerationRule
Removes a specified moderation rule, allowing users to adjust and refine the moderation criteria in use by eliminating obsolete or unnecessary rules.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete moderation rule
const response = await client.feeds.deleteModerationRule({
user_id: 'john',
});
console.log(response);Response: DeleteModerationRuleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
queryModerationRules
Retrieve the current set of moderation rules to understand the guidelines and criteria used for moderating content. Use this method to ensure compliance with moderation standards or to inform users of the rules.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation rules
const response = await client.feeds.queryModerationRules({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation rules
const response = await client.feeds.queryModerationRules({
sort: [],
next: null,
});
console.log(response);Example: with user and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query moderation rules
const response = await client.feeds.queryModerationRules({
user: { id: 'activity-123', custom: {} },
prev: null,
});
console.log(response);Response: QueryModerationRulesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filter conditions for moderation rules |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the results |
| user | UserRequest | No | - |
| user_id | string | No | - |
mute
Temporarily silence a user to prevent them from posting or interacting on the platform for a specific duration. Utilize this method to manage disruptive behavior without permanently banning the user.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Mute
const response = await client.feeds.mute({
target_ids: [],
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with timeout
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Mute
const response = await client.feeds.mute({
target_ids: [],
timeout: 10,
});
console.log(response);Response: MuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| target_ids | []string | Yes | User IDs to mute (if multiple users) |
| timeout | number | No | Duration of mute in minutes |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryReviewQueue
Access a list of content items pending review to manage and prioritize moderation tasks efficiently. Use this method to streamline the review process and address potential issues in a timely manner.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query review queue items
const response = await client.feeds.queryReviewQueue({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and lock_items
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query review queue items
const response = await client.feeds.queryReviewQueue({
sort: [],
lock_items: false,
});
console.log(response);Example: with next and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query review queue items
const response = await client.feeds.queryReviewQueue({
next: null,
prev: null,
});
console.log(response);Example: with lock_count and stats_only
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query review queue items
const response = await client.feeds.queryReviewQueue({
lock_count: 10,
stats_only: false,
});
console.log(response);Response: QueryReviewQueueResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filter conditions for review queue items |
| limit | number | No | - |
| lock_count | number | No | Number of items to lock (1-25) |
| lock_duration | number | No | Duration for which items should be locked |
| lock_items | boolean | No | Whether to lock items for review (true), unlock items (false), or just fetch (nil) |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the results |
| stats_only | boolean | No | Whether to return only statistics |
| user | UserRequest | No | - |
| user_id | string | No | - |
getReviewQueueItem
Retrieve detailed information about a specific item in the review queue to make informed moderation decisions. Employ this method when you need to assess an individual piece of content thoroughly.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get review queue item
const response = await client.feeds.getReviewQueueItem({
id: 'activity-123',
});
console.log(response);Response: GetReviewQueueItemResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
submitAction
Execute a moderation action, such as approving or rejecting content, based on the review outcome. Use this method to enforce moderation decisions and maintain community standards.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Submit moderation action
const response = await client.feeds.submitAction({
action_type: 'value',
user_id: 'john',
ban: { ban_from_future_channels: false },
});
console.log(response);Example: with block and bypass
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Submit moderation action
const response = await client.feeds.submitAction({
action_type: 'value',
block: { reason: 'value' },
bypass: { enabled: false },
});
console.log(response);Example: with custom and delete_activity
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Submit moderation action
const response = await client.feeds.submitAction({
action_type: 'value',
custom: { id: 'activity-123' },
delete_activity: { entity_id: 'value' },
});
console.log(response);Example: with delete_comment and delete_message
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Submit moderation action
const response = await client.feeds.submitAction({
action_type: 'value',
delete_comment: { entity_id: 'value' },
delete_message: { entity_id: 'value' },
});
console.log(response);Response: SubmitActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| action_type | string | Yes | Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, del... |
| appeal_id | string | No | UUID of the appeal to act on (required for reject_appeal, optional for other actions) |
| ban | BanActionRequestPayload | No | Configuration for ban action |
| block | BlockActionRequestPayload | No | Configuration for block action |
| bypass | BypassActionRequest | No | Configuration for bypass moderation action |
| custom | CustomActionRequestPayload | No | Configuration for custom action |
| delete_activity | DeleteActivityRequestPayload | No | Configuration for activity deletion action |
| delete_comment | DeleteCommentRequestPayload | No | Configuration for comment deletion action |
| delete_message | DeleteMessageRequestPayload | No | Configuration for message deletion action |
| delete_reaction | DeleteReactionRequestPayload | No | Configuration for reaction deletion action |
| delete_user | DeleteUserRequestPayload | No | Configuration for user deletion action |
| escalate | EscalatePayload | No | Configuration for escalation action |
| flag | FlagRequest | No | Configuration for flag action |
| item_id | string | No | UUID of the review queue item to act on |
| mark_reviewed | MarkReviewedRequestPayload | No | Configuration for marking item as reviewed |
| reject_appeal | RejectAppealRequestPayload | No | Configuration for rejecting an appeal |
| restore | RestoreActionRequestPayload | No | Configuration for restore action |
| shadow_block | ShadowBlockActionRequestPayload | No | Configuration for shadow block action |
| unban | UnbanActionRequestPayload | No | Configuration for unban action |
| unblock | UnblockActionRequestPayload | No | Configuration for unblock action |
| user | UserRequest | No | - |
| user_id | string | No | - |
unban
Lift a ban on a user, restoring their ability to interact with the platform. Use this method to reinstate a previously banned user after determining that the ban is no longer necessary.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unban
const response = await client.feeds.unban({
target_user_id: 'value',
channel_cid: 'value',
created_by: 'value',
});
console.log(response);Example: with unbanned_by and unbanned_by_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unban
const response = await client.feeds.unban({
target_user_id: 'value',
unbanned_by: { id: 'activity-123', custom: {} },
unbanned_by_id: 'value',
});
console.log(response);Response: UnbanResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| target_user_id | string | Yes | - |
| channel_cid | string | No | - |
| created_by | string | No | - |
| unbanned_by | UserRequest | No | Details about the user performing the unban |
| unbanned_by_id | string | No | ID of the user performing the unban |
unmute
Remove a mute restriction from a user, allowing them to resume posting and interacting on the platform. Use this method to restore communication privileges to a user after a mute period has ended or is deemed unnecessary.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unmute a user
const response = await client.feeds.unmute({
target_ids: [],
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: UnmuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| target_ids | []string | Yes | User IDs to unmute |
| user | UserRequest | No | - |
| user_id | string | No | - |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AIImageConfig
interface AIImageConfig {
async?: boolean;
enabled?: boolean;
ocr_rules?: OCRRule[];
rules?: AWSRekognitionRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| ocr_rules | OCRRule[] | No | |
| rules | AWSRekognitionRule[] | No |
AIImageLabelDefinition
interface AIImageLabelDefinition {
description: string;
group: string;
key: string;
label: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | |
| group | string | Yes | |
| key | string | Yes | |
| label | string | Yes |
AITextConfig
interface AITextConfig {
async?: boolean;
enabled?: boolean;
profile?: string;
rules?: BodyguardRule[];
severity_rules?: BodyguardSeverityRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| profile | string | No | |
| rules | BodyguardRule[] | No | |
| severity_rules | BodyguardSeverityRule[] | No |
AIVideoConfig
interface AIVideoConfig {
async?: boolean;
enabled?: boolean;
rules?: AWSRekognitionRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AWSRekognitionRule[] | No |
AWSRekognitionRule
interface AWSRekognitionRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
label: string;
min_confidence: number;
subclassifications?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| label | string | Yes | |
| min_confidence | number | Yes | |
| subclassifications | Record<string, any> | No |
Action
interface Action {
name: string;
style?: string;
text: string;
type: string;
value?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| style | string | No | |
| value | string | No |
ActionLogResponse
interface ActionLogResponse {
ai_providers: string[];
created_at: number;
custom: Record<string, any>;
id: string;
reason: string;
review_queue_item?: ReviewQueueItemResponse;
target_user?: UserResponse;
target_user_id: string;
type: string;
user?: UserResponse;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_providers | string[] | Yes | |
| created_at | number | Yes | Timestamp when the action was taken |
| custom | Record<string, any> | Yes | Additional metadata about the action |
| id | string | Yes | Unique identifier of the action log |
| reason | string | Yes | Reason for the moderation action |
| target_user_id | string | Yes | ID of the user who was the target of the action |
| type | string | Yes | Type of moderation action |
| user_id | string | Yes | ID of the user who performed the action |
| review_queue_item | ReviewQueueItemResponse | No | Associated review queue item |
| target_user | UserResponse | No | User who was the target of the action |
| user | UserResponse | No | User who performed the action |
ActionSequence
interface ActionSequence {
action?: string;
blur?: boolean;
cooldown_period?: number;
threshold?: number;
time_window?: number;
warning?: boolean;
warning_text?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | No | |
| blur | boolean | No | |
| cooldown_period | number | No | |
| threshold | number | No | |
| time_window | number | No | |
| warning | boolean | No | |
| warning_text | string | No |
ActivityRequest
interface ActivityRequest {
attachments?: Attachment[];
collection_refs?: string[];
copy_custom_to_notification?: boolean;
create_notification_activity?: boolean;
custom?: Record<string, any>;
expires_at?: string;
feeds: string[];
filter_tags?: string[];
id?: string;
interest_tags?: string[];
location?: Location;
mentioned_user_ids?: string[];
parent_id?: string;
poll_id?: string;
restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';
search_data?: Record<string, any>;
skip_enrich_url?: boolean;
skip_push?: boolean;
text?: string;
type: string;
user_id?: string;
visibility?: 'public' | 'private' | 'tag';
visibility_tag?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| feeds | string[] | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | string | Yes | Type of activity |
| attachments | Attachment[] | No | List of attachments for the activity |
| collection_refs | string[] | No | Collections that this activity references |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | boolean | No | Whether to create notification activities for mentioned users |
| custom | Record<string, any> | No | Custom data for the activity |
| expires_at | string | No | Expiration time for the activity |
| filter_tags | string[] | No | Tags for filtering activities |
| id | string | No | Optional ID for the activity |
| interest_tags | string[] | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | string[] | No | List of users mentioned in the activity |
| parent_id | string | No | ID of parent activity for replies/comments |
| poll_id | string | No | ID of a poll to attach to activity |
| restrict_replies | 'everyone' | 'people_i_follow' | 'nobody' |
| search_data | Record<string, any> | No | Additional data for search indexing |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for the activity |
| skip_push | boolean | No | Whether to skip push notifications |
| text | string | No | Text content of the activity |
| user_id | string | No | ID of the user creating the activity |
| visibility | 'public' | 'private' | 'tag' |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
AppealItemResponse
interface AppealItemResponse {
appeal_reason: string;
attachments?: string[];
created_at: number;
decision_reason?: string;
entity_content?: ModerationPayload;
entity_id: string;
entity_type: string;
id: string;
status: string;
updated_at: number;
user?: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | string | Yes | Reason Text of the Appeal Item |
| created_at | number | Yes | When the flag was created |
| entity_id | string | Yes | ID of the entity |
| entity_type | string | Yes | Type of entity |
| id | string | Yes | |
| status | string | Yes | Status of the Appeal Item |
| updated_at | number | Yes | When the flag was last updated |
| attachments | string[] | No | Attachments(e.g. Images) of the Appeal Item |
| decision_reason | string | No | Decision Reason of the Appeal Item |
| entity_content | ModerationPayload | No | |
| user | UserResponse | No | Details of the user who created the appeal |
AppealRequest
interface AppealRequest {
appeal_reason: string;
attachments?: string[];
entity_id: string;
entity_type: string;
user?: UserRequest;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | string | Yes | Explanation for why the content is being appealed |
| entity_id | string | Yes | Unique identifier of the entity being appealed |
| entity_type | string | Yes | Type of entity being appealed (e.g., message, user) |
| attachments | string[] | No | Array of Attachment URLs(e.g., images) |
| user | UserRequest | No | |
| user_id | string | No |
AppealResponse
interface AppealResponse {
appeal_id: string;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_id | string | Yes | Unique identifier of the created Appeal item |
| duration | string | Yes |
Attachment
An attachment is a message object that represents a file uploaded by a user.
interface Attachment {
actions?: Action[];
asset_url?: string;
author_icon?: string;
author_link?: string;
author_name?: string;
color?: string;
custom: Record<string, any>;
fallback?: string;
fields?: Field[];
footer?: string;
footer_icon?: string;
giphy?: Images;
image_url?: string;
og_scrape_url?: string;
original_height?: number;
original_width?: number;
pretext?: string;
text?: string;
thumb_url?: string;
title?: string;
title_link?: string;
type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| actions | Action[] | No | |
| asset_url | string | No | |
| author_icon | string | No | |
| author_link | string | No | |
| author_name | string | No | |
| color | string | No | |
| fallback | string | No | |
| fields | Field[] | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | |
| og_scrape_url | string | No | |
| original_height | number | No | |
| original_width | number | No | |
| pretext | string | No | |
| text | string | No | |
| thumb_url | string | No | |
| title | string | No | |
| title_link | string | No | |
| type | string | No | Attachment type (e.g. image, video, url) |
AutomodPlatformCircumventionConfig
interface AutomodPlatformCircumventionConfig {
async?: boolean;
enabled?: boolean;
rules?: AutomodRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AutomodRule[] | No |
AutomodRule
interface AutomodRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
label: string;
threshold: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| label | string | Yes | |
| threshold | number | Yes |
AutomodSemanticFiltersConfig
interface AutomodSemanticFiltersConfig {
async?: boolean;
enabled?: boolean;
rules?: AutomodSemanticFiltersRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AutomodSemanticFiltersRule[] | No |
AutomodSemanticFiltersRule
interface AutomodSemanticFiltersRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
name: string;
threshold: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| name | string | Yes | |
| threshold | number | Yes |
AutomodToxicityConfig
interface AutomodToxicityConfig {
async?: boolean;
enabled?: boolean;
rules?: AutomodRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| rules | AutomodRule[] | No |
BanActionRequestPayload
Configuration for ban moderation action
interface BanActionRequestPayload {
ban_from_future_channels?: boolean;
channel_ban_only?: boolean;
channel_cid?: string;
delete_messages?: 'soft' | 'pruning' | 'hard';
ip_ban?: boolean;
reason?: string;
shadow?: boolean;
target_user_id?: string;
timeout?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ban_from_future_channels | boolean | No | Also ban user from all channels this moderator creates in the future |
| channel_ban_only | boolean | No | Ban only from specific channel |
| channel_cid | string | No | |
| delete_messages | 'soft' | 'pruning' | 'hard' |
| ip_ban | boolean | No | Whether to ban by IP address |
| reason | string | No | Reason for the ban |
| shadow | boolean | No | Whether this is a shadow ban |
| target_user_id | string | No | Optional: ban user directly without review item |
| timeout | number | No | Duration of ban in minutes |
BanOptions
interface BanOptions {
delete_messages?: 'soft' | 'pruning' | 'hard';
duration?: number;
ip_ban?: boolean;
reason?: string;
shadow_ban?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delete_messages | 'soft' | 'pruning' | 'hard' |
| duration | number | No | |
| ip_ban | boolean | No | |
| reason | string | No | |
| shadow_ban | boolean | No |
BanResponse
interface BanResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
BlockActionRequestPayload
Configuration for block action
interface BlockActionRequestPayload {
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No | Reason for blocking |
BlockListConfig
interface BlockListConfig {
async?: boolean;
enabled?: boolean;
match_substring?: boolean;
rules?: BlockListRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| enabled | boolean | No | |
| match_substring | boolean | No | |
| rules | BlockListRule[] | No |
BlockListRule
interface BlockListRule {
action: 'flag' | 'mask_flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
name?: string;
team?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'mask_flag' | 'shadow' |
| name | string | No | |
| team | string | No |
BodyguardImageAnalysisConfig
interface BodyguardImageAnalysisConfig {
rules?: BodyguardRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | BodyguardRule[] | No |
BodyguardRule
interface BodyguardRule {
action?: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
label: string;
severity_rules?: BodyguardSeverityRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| label | string | Yes | |
| action | 'flag' | 'shadow' | 'remove' |
| severity_rules | BodyguardSeverityRule[] | No |
BodyguardSeverityRule
interface BodyguardSeverityRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
severity: 'low' | 'medium' | 'high' | 'critical';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| severity | 'low' | 'medium' | 'high' |
BulkImageModerationResponse
interface BulkImageModerationResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | ID of the task for processing the bulk image moderation |
BypassActionRequest
interface BypassActionRequest {
enabled?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | No |
BypassResponse
interface BypassResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
CallActionOptions
interface CallActionOptions {
duration?: number;
flag_reason?: string;
kick_reason?: string;
mute_audio?: boolean;
mute_video?: boolean;
reason?: string;
warning_text?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | number | No | |
| flag_reason | string | No | |
| kick_reason | string | No | |
| mute_audio | boolean | No | |
| mute_video | boolean | No | |
| reason | string | No | |
| warning_text | string | No |
CallCustomPropertyParameters
interface CallCustomPropertyParameters {
operator?: string;
property_key?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| property_key | string | No |
CallRuleActionSequence
interface CallRuleActionSequence {
actions?: string[];
call_options?: CallActionOptions;
violation_number?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | string[] | No | |
| call_options | CallActionOptions | No | |
| violation_number | number | No |
CallTypeRuleParameters
interface CallTypeRuleParameters {
call_type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_type | string | No |
CallViolationCountParameters
interface CallViolationCountParameters {
threshold?: number;
time_window?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | number | No | |
| time_window | string | No |
CheckResponse
interface CheckResponse {
duration: string;
item?: ReviewQueueItemResponse;
recommended_action: string;
status: string;
task_id?: string;
triggered_rule?: TriggeredRuleResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| recommended_action | string | Yes | Suggested action based on moderation results |
| status | string | Yes | Status of the moderation check (completed or pending) |
| item | ReviewQueueItemResponse | No | Review queue item (present if action != keep) |
| task_id | string | No | ID of the running moderation task |
| triggered_rule | TriggeredRuleResponse | No | Rule triggered by evaluation, with resolved actions and escalation details |
CheckS3AccessResponse
interface CheckS3AccessResponse {
duration: string;
message?: string;
success: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| success | boolean | Yes | Whether the S3 access check succeeded |
| message | string | No | Descriptive message about the check result |
ClosedCaptionRuleParameters
interface ClosedCaptionRuleParameters {
harm_labels?: string[];
llm_harm_labels?: Record<string, any>;
threshold?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | string[] | No | |
| llm_harm_labels | Record<string, any> | No | |
| threshold | number | No |
ConfigResponse
interface ConfigResponse {
ai_image_config?: AIImageConfig;
ai_image_label_definitions?: AIImageLabelDefinition[];
ai_image_subclassifications?: Record<string, any>;
ai_text_config?: AITextConfig;
ai_video_config?: AIVideoConfig;
async: boolean;
automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
automod_toxicity_config?: AutomodToxicityConfig;
block_list_config?: BlockListConfig;
created_at: number;
key: string;
llm_config?: LLMConfig;
supported_video_call_harm_types: string[];
team: string;
updated_at: number;
velocity_filter_config?: VelocityFilterConfig;
video_call_rule_config?: VideoCallRuleConfig;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | Yes | Whether moderation should be performed asynchronously |
| created_at | number | Yes | When the configuration was created |
| key | string | Yes | Unique identifier for the moderation configuration |
| supported_video_call_harm_types | string[] | Yes | |
| team | string | Yes | Team associated with the configuration |
| updated_at | number | Yes | When the configuration was last updated |
| ai_image_config | AIImageConfig | No | Configuration for AI image analysis |
| ai_image_label_definitions | AIImageLabelDefinition[] | No | Configurable image moderation label definitions for dashboard rendering |
| ai_image_subclassifications | Record<string, any> | No | Available L2 subclassifications per L1 image moderation label, based on the a... |
| ai_text_config | AITextConfig | No | Configuration for AI text analysis |
| ai_video_config | AIVideoConfig | No | Configuration for AI video analysis |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | Configuration for platform circumvention detection |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | Configuration for semantic filtering |
| automod_toxicity_config | AutomodToxicityConfig | No | Configuration for toxicity detection |
| block_list_config | BlockListConfig | No | Configuration for block list filtering |
| llm_config | LLMConfig | No | Configuration for customer-configured LLM moderation |
| velocity_filter_config | VelocityFilterConfig | No | Configuration for velocity-based filtering |
| video_call_rule_config | VideoCallRuleConfig | No |
ContentCountRuleParameters
interface ContentCountRuleParameters {
threshold?: number;
time_window?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | number | No | |
| time_window | string | No |
CustomActionRequestPayload
Configuration for custom moderation action
interface CustomActionRequestPayload {
id?: string;
options?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | No | Custom action identifier |
| options | Record<string, any> | No | Custom action options |
CustomCheckFlag
interface CustomCheckFlag {
custom?: Record<string, any>;
labels?: string[];
reason?: string;
type: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of check (custom_check_text, custom_check_image, custom_check_video) |
| custom | Record<string, any> | No | Additional metadata for the flag |
| labels | string[] | No | Labels from various moderation sources |
| reason | string | No | Optional explanation for the flag |
CustomCheckResponse
interface CustomCheckResponse {
duration: string;
id: string;
item?: ReviewQueueItemResponse;
status: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| id | string | Yes | Unique identifier of the custom check |
| status | string | Yes | Status of the custom check |
| item | ReviewQueueItemResponse | No | Review queue item details |
DeleteActivityRequestPayload
Configuration for activity deletion action
interface DeleteActivityRequestPayload {
entity_id?: string;
entity_type?: string;
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | string | No | ID of the activity to delete (alternative to item_id) |
| entity_type | string | No | Type of the entity (required for delete_activity to distinguish v2 vs v3) |
| hard_delete | boolean | No | Whether to permanently delete the activity |
| reason | string | No | Reason for deletion |
DeleteCommentRequestPayload
Configuration for comment deletion action
interface DeleteCommentRequestPayload {
entity_id?: string;
entity_type?: string;
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | string | No | ID of the comment to delete (alternative to item_id) |
| entity_type | string | No | Type of the entity |
| hard_delete | boolean | No | Whether to permanently delete the comment |
| reason | string | No | Reason for deletion |
DeleteMessageRequestPayload
Configuration for message deletion action
interface DeleteMessageRequestPayload {
entity_id?: string;
entity_type?: string;
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | string | No | ID of the message to delete (alternative to item_id) |
| entity_type | string | No | Type of the entity |
| hard_delete | boolean | No | Whether to permanently delete the message |
| reason | string | No | Reason for deletion |
DeleteModerationConfigResponse
interface DeleteModerationConfigResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteModerationRuleResponse
Basic response information
interface DeleteModerationRuleResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteModerationTemplateResponse
interface DeleteModerationTemplateResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteReactionRequestPayload
Configuration for reaction deletion action
interface DeleteReactionRequestPayload {
entity_id?: string;
entity_type?: string;
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | string | No | ID of the reaction to delete (alternative to item_id) |
| entity_type | string | No | Type of the entity |
| hard_delete | boolean | No | Whether to permanently delete the reaction |
| reason | string | No | Reason for deletion |
DeleteUserRequestPayload
Configuration for user deletion action
interface DeleteUserRequestPayload {
delete_conversation_channels?: boolean;
delete_feeds_content?: boolean;
entity_id?: string;
entity_type?: string;
hard_delete?: boolean;
mark_messages_deleted?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delete_conversation_channels | boolean | No | Also delete all user conversations |
| delete_feeds_content | boolean | No | Delete flagged feeds content |
| entity_id | string | No | ID of the user to delete (alternative to item_id) |
| entity_type | string | No | Type of the entity |
| hard_delete | boolean | No | Whether to permanently delete the user |
| mark_messages_deleted | boolean | No | Also delete all user messages |
| reason | string | No | Reason for deletion |
EscalatePayload
Configuration for escalation action
interface EscalatePayload {
notes?: string;
priority?: string;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| notes | string | No | Additional context for the reviewer |
| priority | string | No | Priority of the escalation (low, medium, high) |
| reason | string | No | Reason for the escalation (from configured escalation_reasons) |
FeedsModerationTemplateConfigPayload
Configuration for a feeds moderation template
interface FeedsModerationTemplateConfigPayload {
config_key?: string;
data_types: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| data_types | Record<string, any> | Yes | Map of data type names to their content types |
| config_key | string | No | Key of the moderation configuration to use |
Field
interface Field {
short: boolean;
title: string;
value: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | boolean | Yes | |
| title | string | Yes | |
| value | string | Yes |
FilterConfigResponse
interface FilterConfigResponse {
ai_text_labels?: string[];
config_keys?: string[];
llm_labels: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| llm_labels | string[] | Yes | |
| ai_text_labels | string[] | No | |
| config_keys | string[] | No |
FlagCountRuleParameters
interface FlagCountRuleParameters {
threshold?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | number | No |
FlagRequest
interface FlagRequest {
custom?: Record<string, any>;
entity_creator_id?: string;
entity_id: string;
entity_type: string;
moderation_payload?: ModerationPayload;
reason?: string;
user?: UserRequest;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | string | Yes | Unique identifier of the entity being flagged |
| entity_type | string | Yes | Type of entity being flagged (e.g., message, user) |
| custom | Record<string, any> | No | Additional metadata about the flag |
| entity_creator_id | string | No | ID of the user who created the flagged entity |
| moderation_payload | ModerationPayload | No | Content being flagged |
| reason | string | No | Optional explanation for why the content is being flagged |
| user | UserRequest | No | |
| user_id | string | No |
FlagResponse
interface FlagResponse {
duration: string;
item_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item_id | string | Yes | Unique identifier of the created moderation item |
FlagUserOptions
interface FlagUserOptions {
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No |
GetAppealResponse
interface GetAppealResponse {
duration: string;
item?: AppealItemResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item | AppealItemResponse | No | Current state of the appeal |
GetConfigResponse
interface GetConfigResponse {
config?: ConfigResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The retrieved moderation configuration |
GetFlagCountResponse
interface GetFlagCountResponse {
count: number;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| count | number | Yes | Total number of flags against the specified user's content |
| duration | string | Yes |
GetModerationRuleResponse
Basic response information
interface GetModerationRuleResponse {
duration: string;
rule?: ModerationRuleV2Response;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| rule | ModerationRuleV2Response | No |
GetReviewQueueItemResponse
interface GetReviewQueueItemResponse {
duration: string;
item?: ReviewQueueItemResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item | ReviewQueueItemResponse | No | Current state of the review queue item |
GoogleVisionConfig
interface GoogleVisionConfig {
enabled?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | No |
HarmConfig
interface HarmConfig {
action_sequences?: ActionSequence[];
cooldown_period?: number;
harm_types?: string[];
severity?: number;
threshold?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_sequences | ActionSequence[] | No | |
| cooldown_period | number | No | |
| harm_types | string[] | No | |
| severity | number | No | |
| threshold | number | No |
ImageContentParameters
interface ImageContentParameters {
harm_labels?: string[];
label_operator?: string;
min_confidence?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | string[] | No | |
| label_operator | string | No | |
| min_confidence | number | No |
ImageRuleParameters
interface ImageRuleParameters {
harm_labels?: string[];
min_confidence?: number;
threshold?: number;
time_window?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | string[] | No | |
| min_confidence | number | No | |
| threshold | number | No | |
| time_window | string | No |
Images
interface Images {
fixed_height: ImageData;
fixed_height_downsampled: ImageData;
fixed_height_still: ImageData;
fixed_width: ImageData;
fixed_width_downsampled: ImageData;
fixed_width_still: ImageData;
original: ImageData;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
InsertActionLogResponse
Response after inserting a moderation action log
interface InsertActionLogResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
KeyframeRuleParameters
interface KeyframeRuleParameters {
harm_labels?: string[];
min_confidence?: number;
threshold?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | string[] | No | |
| min_confidence | number | No | |
| threshold | number | No |
LLMConfig
interface LLMConfig {
app_context?: string;
async?: boolean;
enabled?: boolean;
rules?: LLMRule[];
severity_descriptions?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | string | No | |
| async | boolean | No | |
| enabled | boolean | No | |
| rules | LLMRule[] | No | |
| severity_descriptions | Record<string, any> | No |
LLMRule
interface LLMRule {
action?: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove' | 'keep';
description: string;
label: string;
severity_rules?: BodyguardSeverityRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | |
| label | string | Yes | |
| action | 'flag' | 'shadow' | 'remove' |
| severity_rules | BodyguardSeverityRule[] | No |
Location
interface Location {
lat: number;
lng: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | number | Yes | Latitude coordinate |
| lng | number | Yes | Longitude coordinate |
MarkReviewedRequestPayload
Configuration for mark reviewed action
interface MarkReviewedRequestPayload {
content_to_mark_as_reviewed_limit?: number;
decision_reason?: string;
disable_marking_content_as_reviewed?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| content_to_mark_as_reviewed_limit | number | No | Maximum content items to mark as reviewed |
| decision_reason | string | No | Reason for the appeal decision |
| disable_marking_content_as_reviewed | boolean | No | Skip marking content as reviewed |
ModerationConfig
interface ModerationConfig {
ai_image_config?: AIImageConfig;
ai_image_lite_config?: BodyguardImageAnalysisConfig;
ai_text_config?: AITextConfig;
ai_video_config?: AIVideoConfig;
async?: boolean;
automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
automod_toxicity_config?: AutomodToxicityConfig;
block_list_config?: BlockListConfig;
created_at?: number;
google_vision_config?: GoogleVisionConfig;
key?: string;
llm_config?: LLMConfig;
supported_video_call_harm_types?: string[];
team?: string;
updated_at?: number;
velocity_filter_config?: VelocityFilterConfig;
video_call_rule_config?: VideoCallRuleConfig;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_config | AIImageConfig | No | |
| ai_image_lite_config | BodyguardImageAnalysisConfig | No | |
| ai_text_config | AITextConfig | No | |
| ai_video_config | AIVideoConfig | No | |
| async | boolean | No | |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | |
| automod_toxicity_config | AutomodToxicityConfig | No | |
| block_list_config | BlockListConfig | No | |
| created_at | number | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | string | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | string[] | No | |
| team | string | No | |
| updated_at | number | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationFlagResponse
interface ModerationFlagResponse {
created_at: number;
custom?: Record<string, any>;
entity_creator_id?: string;
entity_id: string;
entity_type: string;
labels?: string[];
moderation_payload?: ModerationPayloadResponse;
reason?: string;
result: Record<string, any>[];
review_queue_item?: ReviewQueueItemResponse;
review_queue_item_id?: string;
type: string;
updated_at: number;
user?: UserResponse;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| entity_id | string | Yes | |
| entity_type | string | Yes | |
| result | Record<string, any>[] | Yes | |
| type | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| custom | Record<string, any> | No | |
| entity_creator_id | string | No | |
| labels | string[] | No | |
| moderation_payload | ModerationPayloadResponse | No | |
| reason | string | No | |
| review_queue_item | ReviewQueueItemResponse | No | |
| review_queue_item_id | string | No | |
| user | UserResponse | No |
ModerationPayload
interface ModerationPayload {
custom?: Record<string, any>;
images?: string[];
texts?: string[];
videos?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | No | |
| images | string[] | No | |
| texts | string[] | No | |
| videos | string[] | No |
ModerationPayloadRequest
Content payload for moderation
interface ModerationPayloadRequest {
custom?: Record<string, any>;
images?: string[];
texts?: string[];
videos?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | No | Custom data for moderation |
| images | string[] | No | Image URLs to moderate (max 30) |
| texts | string[] | No | Text content to moderate |
| videos | string[] | No | Video URLs to moderate |
ModerationRuleV2Response
interface ModerationRuleV2Response {
action?: RuleBuilderAction;
action_sequences?: CallRuleActionSequence[];
conditions?: RuleBuilderCondition[];
config_keys: string[];
cooldown_period?: string;
created_at: number;
description: string;
enabled: boolean;
groups?: RuleBuilderConditionGroup[];
id: string;
logic?: string;
name: string;
rule_type: string;
team: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| config_keys | string[] | Yes | |
| created_at | number | Yes | |
| description | string | Yes | |
| enabled | boolean | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| rule_type | string | Yes | |
| team | string | Yes | |
| updated_at | number | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | CallRuleActionSequence[] | No | |
| conditions | RuleBuilderCondition[] | No | |
| cooldown_period | string | No | |
| groups | RuleBuilderConditionGroup[] | No | |
| logic | string | No |
MuteResponse
interface MuteResponse {
duration: string;
mutes?: UserMuteResponse[];
non_existing_users?: string[];
own_user?: OwnUserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| mutes | UserMuteResponse[] | No | Object with mutes (if multiple users were muted) |
| non_existing_users | string[] | No | A list of users that can't be found. Common cause for this is deleted users |
| own_user | OwnUserResponse | No | Authorized user object with fresh mutes information |
OCRRule
interface OCRRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
label: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| label | string | Yes |
OwnUserResponse
interface OwnUserResponse {
avg_response_time?: number;
banned: boolean;
blocked_user_ids?: string[];
channel_mutes: ChannelMute[];
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
devices: DeviceResponse[];
id: string;
image?: string;
invisible: boolean;
language: string;
last_active?: number;
latest_hidden_channels?: string[];
mutes: UserMuteResponse[];
name?: string;
online: boolean;
privacy_settings?: PrivacySettingsResponse;
push_preferences?: PushPreferencesResponse;
revoke_tokens_issued_before?: number;
role: string;
teams: string[];
teams_role?: Record<string, any>;
total_unread_count: number;
total_unread_count_by_team?: Record<string, any>;
unread_channels: number;
unread_count: number;
unread_threads: number;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | |
| channel_mutes | ChannelMute[] | Yes | |
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| devices | DeviceResponse[] | Yes | |
| id | string | Yes | |
| invisible | boolean | Yes | |
| language | string | Yes | |
| mutes | UserMuteResponse[] | Yes | |
| online | boolean | Yes | |
| role | string | Yes | |
| teams | string[] | Yes | |
| total_unread_count | number | Yes | |
| unread_channels | number | Yes | |
| unread_count | number | Yes | |
| unread_threads | number | Yes | |
| updated_at | number | Yes | |
| avg_response_time | number | No | |
| blocked_user_ids | string[] | No | |
| deactivated_at | number | No | |
| deleted_at | number | No | |
| image | string | No | |
| last_active | number | No | |
| latest_hidden_channels | string[] | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | number | No | |
| teams_role | Record<string, any> | No | |
| total_unread_count_by_team | Record<string, any> | No |
PagerRequest
interface PagerRequest {
limit?: number;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | number | No | |
| next | string | No | |
| prev | string | No |
PrivacySettingsResponse
interface PrivacySettingsResponse {
delivery_receipts?: DeliveryReceiptsResponse;
read_receipts?: ReadReceiptsResponse;
typing_indicators?: TypingIndicatorsResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
QueryAppealsResponse
interface QueryAppealsResponse {
duration: string;
items: AppealItemResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| items | AppealItemResponse[] | Yes | List of Appeal Items |
| next | string | No | |
| prev | string | No |
QueryFeedModerationTemplate
interface QueryFeedModerationTemplate {
config?: FeedsModerationTemplateConfigPayload;
created_at: number;
name: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the template was created |
| name | string | Yes | Name of the moderation template |
| updated_at | number | Yes | When the template was last updated |
| config | FeedsModerationTemplateConfigPayload | No | Configuration for the moderation template |
QueryFeedModerationTemplatesResponse
interface QueryFeedModerationTemplatesResponse {
duration: string;
templates: QueryFeedModerationTemplate[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| templates | QueryFeedModerationTemplate[] | Yes | List of moderation templates |
QueryModerationConfigsResponse
interface QueryModerationConfigsResponse {
configs: ConfigResponse[];
duration: string;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| configs | ConfigResponse[] | Yes | List of moderation configurations |
| duration | string | Yes | |
| next | string | No | |
| prev | string | No |
QueryModerationFlagsResponse
Basic response information
interface QueryModerationFlagsResponse {
duration: string;
flags: ModerationFlagResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| flags | ModerationFlagResponse[] | Yes | |
| next | string | No | |
| prev | string | No |
QueryModerationLogsResponse
interface QueryModerationLogsResponse {
duration: string;
logs: ActionLogResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| logs | ActionLogResponse[] | Yes | List of moderation action logs |
| next | string | No | |
| prev | string | No |
QueryModerationRulesResponse
interface QueryModerationRulesResponse {
ai_image_label_definitions: AIImageLabelDefinition[];
ai_image_subclassifications: Record<string, any>;
closed_caption_labels: string[];
default_llm_labels: Record<string, any>;
duration: string;
keyframe_label_classifications: Record<string, any>;
keyframe_labels: string[];
next?: string;
prev?: string;
rules: ModerationRuleV2Response[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_label_definitions | AIImageLabelDefinition[] | Yes | AI image label definitions with metadata for dashboard rendering |
| ai_image_subclassifications | Record<string, any> | Yes | Stream L1 to leaf-level label name mapping for AI image rules |
| closed_caption_labels | string[] | Yes | Available harm labels for closed caption rules |
| default_llm_labels | Record<string, any> | Yes | Default LLM label descriptions |
| duration | string | Yes | |
| keyframe_label_classifications | Record<string, any> | Yes | L1 to L2 mapping of keyframe harm label classifications |
| keyframe_labels | string[] | Yes | Deprecated: use keyframe_label_classifications instead. Available L1 harm lab... |
| rules | ModerationRuleV2Response[] | Yes | List of moderation rules |
| next | string | No | |
| prev | string | No |
QueryReviewQueueResponse
interface QueryReviewQueueResponse {
action_config: Record<string, any>;
duration: string;
filter_config?: FilterConfigResponse;
items: ReviewQueueItemResponse[];
next?: string;
prev?: string;
stats: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_config | Record<string, any> | Yes | Configuration for moderation actions |
| duration | string | Yes | |
| items | ReviewQueueItemResponse[] | Yes | List of review queue items |
| stats | Record<string, any> | Yes | Statistics about the review queue |
| filter_config | FilterConfigResponse | No | Configuration for filters in moderation review queue |
| next | string | No | |
| prev | string | No |
Reaction
interface Reaction {
activity_id: string;
children_counts?: Record<string, any>;
created_at: number;
data?: Record<string, any>;
deleted_at?: number;
id?: string;
kind: string;
latest_children?: Record<string, any>;
moderation?: Record<string, any>;
own_children?: Record<string, any>;
parent?: string;
score?: number;
target_feeds?: string[];
target_feeds_extra_data?: Record<string, any>;
updated_at: number;
user?: User;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | number | Yes | |
| kind | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| children_counts | Record<string, any> | No | |
| data | Record<string, any> | No | |
| deleted_at | number | No | |
| id | string | No | |
| latest_children | Record<string, any> | No | |
| moderation | Record<string, any> | No | |
| own_children | Record<string, any> | No | |
| parent | string | No | |
| score | number | No | |
| target_feeds | string[] | No | |
| target_feeds_extra_data | Record<string, any> | No | |
| user | User | No |
RejectAppealRequestPayload
Configuration for rejecting an appeal
interface RejectAppealRequestPayload {
decision_reason: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | Yes | Reason for rejecting the appeal |
RestoreActionRequestPayload
Configuration for restore action
interface RestoreActionRequestPayload {
decision_reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No | Reason for the appeal decision |
ReviewQueueItemResponse
interface ReviewQueueItemResponse {
actions: ActionLogResponse[];
activity?: EnrichedActivity;
ai_text_severity: string;
appeal?: AppealItemResponse;
assigned_to?: UserResponse;
bans: BanInfoResponse[];
call?: CallResponse;
completed_at?: number;
config_key?: string;
created_at: number;
entity_creator?: EntityCreatorResponse;
entity_creator_id?: string;
entity_id: string;
entity_type: string;
escalated: boolean;
escalated_at?: number;
escalated_by?: string;
escalation_metadata?: EscalationMetadata;
feeds_v2_activity?: EnrichedActivity;
feeds_v2_reaction?: Reaction;
feeds_v3_activity?: FeedsV3ActivityResponse;
feeds_v3_comment?: FeedsV3CommentResponse;
flags: ModerationFlagResponse[];
flags_count: number;
id: string;
languages: string[];
latest_moderator_action: string;
message?: MessageResponse;
moderation_payload?: ModerationPayloadResponse;
reaction?: Reaction;
recommended_action: string;
reviewed_at?: number;
reviewed_by: string;
severity: number;
status: string;
teams?: string[];
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | ActionLogResponse[] | Yes | Moderation actions taken |
| ai_text_severity | string | Yes | AI-determined text severity |
| bans | BanInfoResponse[] | Yes | Associated ban records |
| created_at | number | Yes | When the item was created |
| entity_id | string | Yes | ID of the entity being reviewed |
| entity_type | string | Yes | Type of entity being reviewed |
| escalated | boolean | Yes | Whether the item has been escalated |
| flags | ModerationFlagResponse[] | Yes | Associated flag records |
| flags_count | number | Yes | |
| id | string | Yes | Unique identifier of the review queue item |
| languages | string[] | Yes | Detected languages in the content |
| latest_moderator_action | string | Yes | |
| recommended_action | string | Yes | Suggested moderation action |
| reviewed_by | string | Yes | ID of the moderator who reviewed the item |
| severity | number | Yes | Severity level of the content |
| status | string | Yes | Current status of the review |
| updated_at | number | Yes | When the item was last updated |
| activity | EnrichedActivity | No | |
| appeal | AppealItemResponse | No | Appeal submitted for this item if it exists |
| assigned_to | UserResponse | No | Moderator assigned to review this item |
| call | CallResponse | No | |
| completed_at | number | No | When the review was completed |
| config_key | string | No | |
| entity_creator | EntityCreatorResponse | No | Details about who created the entity |
| entity_creator_id | string | No | ID of who created the entity |
| escalated_at | number | No | When the item was escalated |
| escalated_by | string | No | ID of the moderator who escalated the item |
| escalation_metadata | EscalationMetadata | No | Escalation details including reason, notes, and priority |
| feeds_v2_activity | EnrichedActivity | No | Associated feed activity |
| feeds_v2_reaction | Reaction | No | Associated feed reaction |
| feeds_v3_activity | FeedsV3ActivityResponse | No | |
| feeds_v3_comment | FeedsV3CommentResponse | No | |
| message | MessageResponse | No | Associated message details |
| moderation_payload | ModerationPayloadResponse | No | Content being moderated |
| reaction | Reaction | No | |
| reviewed_at | number | No | When the item was reviewed |
| teams | string[] | No | Teams associated with this item |
RuleBuilderAction
interface RuleBuilderAction {
ban_options?: BanOptions;
call_options?: CallActionOptions;
flag_user_options?: FlagUserOptions;
skip_inbox?: boolean;
type?: 'ban_user' | 'flag_user' | 'flag_content' | 'block_content' | 'shadow_content' | 'bounce_flag_content' | 'bounce_content' | 'bounce_remove_content' | 'mute_video' | 'mute_audio' | 'blur' | 'call_blur' | 'end_call' | 'kick_user' | 'warning' | 'call_warning' | 'webhook_only';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ban_options | BanOptions | No | |
| call_options | CallActionOptions | No | |
| flag_user_options | FlagUserOptions | No | |
| skip_inbox | boolean | No | |
| type | 'ban_user' | 'flag_user' | 'flag_content' |
RuleBuilderCondition
interface RuleBuilderCondition {
call_custom_property_params?: CallCustomPropertyParameters;
call_type_rule_params?: CallTypeRuleParameters;
call_violation_count_params?: CallViolationCountParameters;
closed_caption_rule_params?: ClosedCaptionRuleParameters;
confidence?: number;
content_count_rule_params?: ContentCountRuleParameters;
content_flag_count_rule_params?: FlagCountRuleParameters;
image_content_params?: ImageContentParameters;
image_rule_params?: ImageRuleParameters;
keyframe_rule_params?: KeyframeRuleParameters;
text_content_params?: TextContentParameters;
text_rule_params?: TextRuleParameters;
type?: string;
user_created_within_params?: UserCreatedWithinParameters;
user_custom_property_params?: UserCustomPropertyParameters;
user_flag_count_rule_params?: FlagCountRuleParameters;
user_identical_content_count_params?: UserIdenticalContentCountParameters;
user_role_params?: UserRoleParameters;
user_rule_params?: UserRuleParameters;
video_content_params?: VideoContentParameters;
video_rule_params?: VideoRuleParameters;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_custom_property_params | CallCustomPropertyParameters | No | |
| call_type_rule_params | CallTypeRuleParameters | No | |
| call_violation_count_params | CallViolationCountParameters | No | |
| closed_caption_rule_params | ClosedCaptionRuleParameters | No | |
| confidence | number | No | |
| content_count_rule_params | ContentCountRuleParameters | No | |
| content_flag_count_rule_params | FlagCountRuleParameters | No | |
| image_content_params | ImageContentParameters | No | |
| image_rule_params | ImageRuleParameters | No | |
| keyframe_rule_params | KeyframeRuleParameters | No | |
| text_content_params | TextContentParameters | No | |
| text_rule_params | TextRuleParameters | No | |
| type | string | No | |
| user_created_within_params | UserCreatedWithinParameters | No | |
| user_custom_property_params | UserCustomPropertyParameters | No | |
| user_flag_count_rule_params | FlagCountRuleParameters | No | |
| user_identical_content_count_params | UserIdenticalContentCountParameters | No | |
| user_role_params | UserRoleParameters | No | |
| user_rule_params | UserRuleParameters | No | |
| video_content_params | VideoContentParameters | No | |
| video_rule_params | VideoRuleParameters | No |
RuleBuilderConditionGroup
interface RuleBuilderConditionGroup {
conditions?: RuleBuilderCondition[];
logic?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| conditions | RuleBuilderCondition[] | No | |
| logic | string | No |
RuleBuilderConfig
interface RuleBuilderConfig {
async?: boolean;
rules?: RuleBuilderRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| rules | RuleBuilderRule[] | No |
RuleBuilderRule
interface RuleBuilderRule {
action?: RuleBuilderAction;
action_sequences?: CallRuleActionSequence[];
conditions?: RuleBuilderCondition[];
cooldown_period?: string;
groups?: RuleBuilderConditionGroup[];
id?: string;
logic?: string;
rule_type: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rule_type | string | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | CallRuleActionSequence[] | No | |
| conditions | RuleBuilderCondition[] | No | |
| cooldown_period | string | No | |
| groups | RuleBuilderConditionGroup[] | No | |
| id | string | No | |
| logic | string | No |
ShadowBlockActionRequestPayload
Configuration for shadow block action
interface ShadowBlockActionRequestPayload {
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No | Reason for shadow blocking |
SortParamRequest
interface SortParamRequest {
direction?: number;
field?: string;
type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | string | No | Name of field to sort by |
| type | string | No | Type of field to sort by. Empty string or omitted means string type (default)... |
SubmitActionResponse
interface SubmitActionResponse {
appeal_item?: AppealItemResponse;
duration: string;
item?: ReviewQueueItemResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| appeal_item | AppealItemResponse | No | Updated Appeal item after action was performed |
| item | ReviewQueueItemResponse | No | Updated review queue item after action was performed |
TextContentParameters
interface TextContentParameters {
blocklist_match?: string[];
contains_url?: boolean;
harm_labels?: string[];
label_operator?: string;
llm_harm_labels?: Record<string, any>;
severity?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist_match | string[] | No | |
| contains_url | boolean | No | |
| harm_labels | string[] | No | |
| label_operator | string | No | |
| llm_harm_labels | Record<string, any> | No | |
| severity | string | No |
TextRuleParameters
interface TextRuleParameters {
blocklist_match?: string[];
contains_url?: boolean;
harm_labels?: string[];
llm_harm_labels?: Record<string, any>;
semantic_filter_min_threshold?: number;
semantic_filter_names?: string[];
severity?: string;
threshold?: number;
time_window?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist_match | string[] | No | |
| contains_url | boolean | No | |
| harm_labels | string[] | No | |
| llm_harm_labels | Record<string, any> | No | |
| semantic_filter_min_threshold | number | No | |
| semantic_filter_names | string[] | No | |
| severity | string | No | |
| threshold | number | No | |
| time_window | string | No |
TriggeredRuleResponse
interface TriggeredRuleResponse {
actions: string[];
call_options?: CallActionOptions;
rule_id: string;
rule_name?: string;
violation_number?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | string[] | Yes | Action types resolved from the rule's action sequence |
| rule_id | string | Yes | ID of the moderation rule that triggered |
| call_options | CallActionOptions | No | Options for call actions (mute settings, warning text, kick reason) |
| rule_name | string | No | Name of the moderation rule that triggered |
| violation_number | number | No | Violation count for action sequence rules (1-based) |
UnbanActionRequestPayload
Configuration for unban moderation action
interface UnbanActionRequestPayload {
channel_cid?: string;
decision_reason?: string;
remove_future_channels_ban?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | No | Channel CID for channel-specific unban |
| decision_reason | string | No | Reason for the appeal decision |
| remove_future_channels_ban | boolean | No | Also remove the future channels ban for this user |
UnbanResponse
interface UnbanResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
UnblockActionRequestPayload
Configuration for unblock action
interface UnblockActionRequestPayload {
decision_reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No | Reason for the appeal decision |
UnmuteResponse
interface UnmuteResponse {
duration: string;
non_existing_users?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| non_existing_users | string[] | No | A list of users that can't be found. Common cause for this is deleted users |
UpsertConfigResponse
interface UpsertConfigResponse {
config?: ConfigResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The created or updated moderation configuration |
UpsertModerationRuleResponse
Basic response information
interface UpsertModerationRuleResponse {
duration: string;
rule?: ModerationRuleV2Response;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| rule | ModerationRuleV2Response | No |
UpsertModerationTemplateResponse
interface UpsertModerationTemplateResponse {
config?: FeedsModerationTemplateConfigPayload;
created_at: number;
duration: string;
name: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the template was created |
| duration | string | Yes | |
| name | string | Yes | Name of the moderation template |
| updated_at | number | Yes | When the template was last updated |
| config | FeedsModerationTemplateConfigPayload | No | Configuration for the moderation template |
User
interface User {
data?: Record<string, any>;
id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | Record<string, any> | No |
UserCreatedWithinParameters
interface UserCreatedWithinParameters {
max_age?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| max_age | string | No |
UserCustomPropertyParameters
interface UserCustomPropertyParameters {
operator?: string;
property_key?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| property_key | string | No |
UserIdenticalContentCountParameters
interface UserIdenticalContentCountParameters {
threshold?: number;
time_window?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | number | No | |
| time_window | string | No |
UserMuteResponse
interface UserMuteResponse {
created_at: number;
expires?: number;
target?: UserResponse;
updated_at: number;
user?: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| updated_at | number | Yes | |
| expires | number | No | |
| target | UserResponse | No | |
| user | UserResponse | No |
UserRequest
User request object
interface UserRequest {
custom?: Record<string, any>;
id: string;
image?: string;
invisible?: boolean;
language?: string;
name?: string;
privacy_settings?: PrivacySettingsResponse;
role?: string;
teams?: string[];
teams_role?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | Record<string, any> | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | boolean | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | string | No | User's global role |
| teams | string[] | No | List of teams the user belongs to |
| teams_role | Record<string, any> | No | Map of team-specific roles for the user |
UserResponse
User response object
interface UserResponse {
avg_response_time?: number;
ban_expires?: number;
banned: boolean;
blocked_user_ids: string[];
bypass_moderation?: boolean;
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
devices?: DeviceResponse[];
id: string;
image?: string;
invisible: boolean;
language: string;
last_active?: number;
name?: string;
online: boolean;
privacy_settings?: PrivacySettingsResponse;
push_notifications?: PushNotificationSettingsResponse;
revoke_tokens_issued_before?: number;
role: string;
shadow_banned: boolean;
teams: string[];
teams_role?: Record<string, any>;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | Whether a user is banned or not |
| blocked_user_ids | string[] | Yes | |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | boolean | Yes | |
| language | string | Yes | Preferred language of a user |
| online | boolean | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | boolean | Yes | Whether a user is shadow banned |
| teams | string[] | Yes | List of teams user is a part of |
| updated_at | number | Yes | Date/time of the last update |
| avg_response_time | number | No | |
| ban_expires | number | No | Date when ban expires |
| bypass_moderation | boolean | No | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| devices | DeviceResponse[] | No | List of devices user is using |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | number | No | Revocation date for tokens |
| teams_role | Record<string, any> | No |
UserRoleParameters
interface UserRoleParameters {
operator?: string;
role?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| role | string | No |
UserRuleParameters
interface UserRuleParameters {
max_age?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| max_age | string | No |
VelocityFilterConfig
interface VelocityFilterConfig {
advanced_filters?: boolean;
async?: boolean;
cascading_actions?: boolean;
cids_per_user?: number;
enabled?: boolean;
first_message_only?: boolean;
rules?: VelocityFilterConfigRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | boolean | No | |
| async | boolean | No | |
| cascading_actions | boolean | No | |
| cids_per_user | number | No | |
| enabled | boolean | No | |
| first_message_only | boolean | No | |
| rules | VelocityFilterConfigRule[] | No |
VelocityFilterConfigRule
interface VelocityFilterConfigRule {
action: 'flag' | 'shadow' | 'remove' | 'ban';
ban_duration?: number;
cascading_action?: 'flag' | 'shadow' | 'remove' | 'ban';
cascading_threshold?: number;
check_message_context?: boolean;
fast_spam_threshold?: number;
fast_spam_ttl?: number;
ip_ban?: boolean;
probation_period?: number;
shadow_ban?: boolean;
slow_spam_ban_duration?: number;
slow_spam_threshold?: number;
slow_spam_ttl?: number;
url_only?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| ban_duration | number | No | |
| cascading_action | 'flag' | 'shadow' | 'remove' |
| cascading_threshold | number | No | |
| check_message_context | boolean | No | |
| fast_spam_threshold | number | No | |
| fast_spam_ttl | number | No | |
| ip_ban | boolean | No | |
| probation_period | number | No | |
| shadow_ban | boolean | No | |
| slow_spam_ban_duration | number | No | |
| slow_spam_threshold | number | No | |
| slow_spam_ttl | number | No | |
| url_only | boolean | No |
VideoCallRuleConfig
interface VideoCallRuleConfig {
flag_all_labels?: boolean;
flagged_labels?: string[];
rules?: HarmConfig[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | boolean | No | |
| flagged_labels | string[] | No | |
| rules | HarmConfig[] | No |
VideoContentParameters
interface VideoContentParameters {
harm_labels?: string[];
label_operator?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | string[] | No | |
| label_operator | string | No |
VideoRuleParameters
interface VideoRuleParameters {
harm_labels?: string[];
threshold?: number;
time_window?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | string[] | No | |
| threshold | number | No | |
| time_window | string | No |