Appearance
Moderation
About 6750 wordsAbout 23 min
Typescript SDK - Feeds API
Table of Contents
- appeal
- getAppeal
- queryAppeals
- ban
- upsertConfig
- getConfig
- deleteConfig
- queryModerationConfigs
- flag
- mute
- queryReviewQueue
- submitAction
- Types Reference
appeal
Appeal against the moderation decision
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Appeal against the moderation decision
const response = await client.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) |
getAppeal
Get appeal item
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get appeal item
const response = await client.getAppeal({
id: 'activity-123',
});
console.log(response);Response: GetAppealResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
queryAppeals
Query Appeals
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query Appeals
const response = await client.queryAppeals({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query Appeals
const response = await client.queryAppeals({
prev: null,
next: 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 |
ban
Ban
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Ban
const response = await client.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
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Ban
const response = await client.ban({
target_user_id: 'value',
channel_cid: 'value',
delete_messages: 'value',
});
console.log(response);Example: with ip_ban and reason
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Ban
const response = await client.ban({
target_user_id: 'value',
ip_ban: false,
reason: 'value',
});
console.log(response);Example: with shadow and timeout
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Ban
const response = await client.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 |
upsertConfig
Create or update moderation configuration
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create or update moderation configuration
const response = await client.upsertConfig({
key: 'value',
ai_image_config: { enabled: false, ocr_rules: [], rules: [], async: false },
ai_text_config: { enabled: false, profile: 'value', rules: [], severity_rules: [], async: false },
});
console.log(response);Example: with ai_video_config and async
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create or update moderation configuration
const response = await client.upsertConfig({
key: 'value',
ai_video_config: { enabled: false, rules: [], async: false },
async: false,
});
console.log(response);Example: with automod_platform_circumvention_config and automod_semantic_filters_config
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create or update moderation configuration
const response = await client.upsertConfig({
key: 'value',
automod_platform_circumvention_config: { enabled: false, rules: [], async: false },
automod_semantic_filters_config: { enabled: false, rules: [], async: false },
});
console.log(response);Example: with automod_toxicity_config and aws_rekognition_config
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create or update moderation configuration
const response = await client.upsertConfig({
key: 'value',
automod_toxicity_config: { enabled: false, rules: [], async: false },
aws_rekognition_config: { enabled: false, ocr_rules: [], rules: [], 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 |
| velocity_filter_config | VelocityFilterConfig | No | Configuration for velocity-based filtering |
| video_call_rule_config | VideoCallRuleConfig | No | - |
getConfig
Get moderation configuration
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get moderation configuration
const response = await client.getConfig({
key: 'value',
team: 'value',
});
console.log(response);Response: GetConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | - |
| team | string | No | - |
deleteConfig
Delete a moderation policy
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete a moderation policy
const response = await client.deleteConfig({
key: 'value',
team: 'value',
});
console.log(response);Response: DeleteModerationConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | - |
| team | string | No | - |
queryModerationConfigs
Query moderation configurations
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query moderation configurations
const response = await client.queryModerationConfigs({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query moderation configurations
const response = await client.queryModerationConfigs({
prev: null,
next: 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 |
flag
Flag content for moderation
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Flag content for moderation
const response = await client.flag({
entity_id: 'value',
entity_type: 'value',
custom: {},
entity_creator_id: 'value',
});
console.log(response);Example: with moderation_payload and reason
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Flag content for moderation
const response = await client.flag({
entity_id: 'value',
entity_type: 'value',
moderation_payload: { custom: {} },
reason: 'value',
});
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 |
mute
Mute
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Mute
const response = await client.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 |
queryReviewQueue
Query review queue items
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query review queue items
const response = await client.queryReviewQueue({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with lock_duration and lock_items
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query review queue items
const response = await client.queryReviewQueue({
lock_duration: 10,
lock_items: false,
});
console.log(response);Example: with next and prev
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query review queue items
const response = await client.queryReviewQueue({
next: null,
prev: null,
});
console.log(response);Example: with lock_count and stats_only
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query review queue items
const response = await client.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 |
submitAction
Submit moderation action
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Submit moderation action
const response = await client.submitAction({
action_type: 'value',
appeal_id: 'value',
ban: { channel_ban_only: false },
});
console.log(response);Example: with block and custom
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Submit moderation action
const response = await client.submitAction({
action_type: 'value',
block: { reason: 'value' },
custom: { id: 'activity-123' },
});
console.log(response);Example: with delete_activity and delete_comment
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Submit moderation action
const response = await client.submitAction({
action_type: 'value',
delete_activity: { hard_delete: false },
delete_comment: { hard_delete: false },
});
console.log(response);Example: with delete_message and delete_reaction
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Submit moderation action
const response = await client.submitAction({
action_type: 'value',
delete_message: { hard_delete: false },
delete_reaction: { hard_delete: false },
});
console.log(response);Response: SubmitActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| action_type | string | Yes | Type of moderation action to perform (mark_reviewed, delete_message, etc.) |
| appeal_id | string | No | UUID of the appeal to act on (required for reject_appeal, optional for other actions) |
| ban | BanActionRequest | No | Configuration for ban action |
| block | BlockActionRequest | No | Configuration for block action |
| custom | CustomActionRequest | No | Configuration for custom action |
| delete_activity | DeleteActivityRequest | No | Configuration for activity deletion action |
| delete_comment | DeleteCommentRequest | No | Configuration for comment deletion action |
| delete_message | DeleteMessageRequest | No | Configuration for message deletion action |
| delete_reaction | DeleteReactionRequest | No | Configuration for reaction deletion action |
| delete_user | DeleteUserRequest | No | Configuration for user deletion action |
| flag | FlagRequest | No | Configuration for flag action |
| item_id | string | No | UUID of the review queue item to act on |
| mark_reviewed | MarkReviewedRequest | No | Configuration for marking item as reviewed |
| reject_appeal | RejectAppealRequest | No | Configuration for rejecting an appeal |
| restore | RestoreActionRequest | No | Configuration for restore action |
| shadow_block | ShadowBlockActionRequest | No | Configuration for shadow block action |
| unban | UnbanActionRequest | No | Configuration for unban action |
| unblock | UnblockActionRequest | No | Configuration for unblock action |
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 |
|---|---|---|---|
| enabled | boolean | Yes | |
| ocr_rules | OCRRule[] | Yes | |
| rules | AWSRekognitionRule[] | Yes | |
| async | boolean | No |
AITextConfig
interface AITextConfig {
async?: boolean;
enabled: boolean;
profile: string;
rules: BodyguardRule[];
severity_rules: BodyguardSeverityRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Yes | |
| profile | string | Yes | |
| rules | BodyguardRule[] | Yes | |
| severity_rules | BodyguardSeverityRule[] | Yes | |
| async | boolean | No |
AIVideoConfig
interface AIVideoConfig {
async?: boolean;
enabled: boolean;
rules: AWSRekognitionRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Yes | |
| rules | AWSRekognitionRule[] | Yes | |
| async | boolean | No |
AWSRekognitionRule
interface AWSRekognitionRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
label: string;
min_confidence: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| label | string | Yes | |
| min_confidence | number | Yes |
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 |
ActivityLocation
interface ActivityLocation {
lat: number;
lng: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | number | Yes | Latitude coordinate |
| lng | number | Yes | Longitude coordinate |
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?: ActivityLocation;
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;
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 | ActivityLocation | 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 |
| 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;
}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) |
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 |
|---|---|---|---|
| enabled | boolean | Yes | |
| rules | AutomodRule[] | Yes | |
| async | boolean | 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 |
|---|---|---|---|
| enabled | boolean | Yes | |
| rules | AutomodSemanticFiltersRule[] | Yes | |
| async | boolean | No |
AutomodSemanticFiltersRule
interface AutomodSemanticFiltersRule {
action: 'flag' | 'shadow' | '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 |
|---|---|---|---|
| enabled | boolean | Yes | |
| rules | AutomodRule[] | Yes | |
| async | boolean | No |
Ban
interface Ban {
channel?: Channel;
created_at: number;
created_by?: User;
expires?: number;
reason?: string;
shadow: boolean;
target?: User;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| shadow | boolean | Yes | |
| channel | Channel | No | |
| created_by | User | No | |
| expires | number | No | |
| reason | string | No | |
| target | User | No |
BanActionRequest
interface BanActionRequest {
channel_ban_only?: boolean;
delete_messages?: 'soft' | 'pruning' | 'hard';
ip_ban?: boolean;
reason?: string;
shadow?: boolean;
target_user_id?: string;
timeout?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_ban_only | boolean | No | |
| delete_messages | 'soft' | 'pruning' | 'hard' |
| ip_ban | boolean | No | |
| reason | string | No | |
| shadow | boolean | No | |
| target_user_id | string | No | |
| timeout | number | No |
BanResponse
interface BanResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
BlockActionRequest
interface BlockActionRequest {
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No |
BlockListConfig
interface BlockListConfig {
async?: boolean;
enabled: boolean;
rules: BlockListRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Yes | |
| rules | BlockListRule[] | Yes | |
| async | boolean | 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 | Yes | |
| team | string | Yes |
BodyguardRule
interface BodyguardRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
label: string;
severity_rules: BodyguardSeverityRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| label | string | Yes | |
| severity_rules | BodyguardSeverityRule[] | Yes |
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' |
Channel
interface Channel {
active_live_locations?: SharedLocation[];
auto_translation_enabled?: boolean;
auto_translation_language: string;
cid: string;
config?: ChannelConfig;
config_overrides?: ConfigOverrides;
cooldown?: number;
created_at: number;
created_by?: User;
custom: Record<string, any>;
deleted_at?: number;
disabled: boolean;
filter_tags?: string[];
frozen: boolean;
id: string;
invites?: ChannelMember[];
last_campaigns?: string;
last_message_at?: number;
member_count?: number;
members?: ChannelMember[];
members_lookup?: Record<string, any>;
message_count?: number;
message_count_updated_at?: number;
team?: string;
truncated_by?: User;
type: string;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| auto_translation_language | string | Yes | |
| cid | string | Yes | |
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| disabled | boolean | Yes | |
| frozen | boolean | Yes | |
| id | string | Yes | |
| type | string | Yes | |
| updated_at | number | Yes | |
| active_live_locations | SharedLocation[] | No | |
| auto_translation_enabled | boolean | No | |
| config | ChannelConfig | No | |
| config_overrides | ConfigOverrides | No | |
| cooldown | number | No | |
| created_by | User | No | |
| deleted_at | number | No | |
| filter_tags | string[] | No | |
| invites | ChannelMember[] | No | |
| last_campaigns | string | No | |
| last_message_at | number | No | |
| member_count | number | No | |
| members | ChannelMember[] | No | |
| members_lookup | Record<string, any> | No | |
| message_count | number | No | |
| message_count_updated_at | number | No | |
| team | string | No | |
| truncated_by | User | No |
ChannelConfig
interface ChannelConfig {
allowed_flag_reasons?: string[];
automod: 'disabled' | 'simple' | 'AI';
automod_behavior: 'flag' | 'block' | 'shadow_block';
automod_thresholds?: Thresholds;
blocklist?: string;
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
blocklists?: BlockListOptions[];
commands: string[];
connect_events: boolean;
count_messages: boolean;
created_at: number;
custom_events: boolean;
delivery_events: boolean;
mark_messages_pending: boolean;
max_message_length: number;
mutes: boolean;
name: string;
partition_size?: number;
partition_ttl?: number;
polls: boolean;
push_level: string;
push_notifications: boolean;
quotes: boolean;
reactions: boolean;
read_events: boolean;
reminders: boolean;
replies: boolean;
search: boolean;
shared_locations: boolean;
skip_last_msg_update_for_system_msgs: boolean;
typing_events: boolean;
updated_at: number;
uploads: boolean;
url_enrichment: boolean;
user_message_reminders: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| automod | 'disabled' | 'simple' | 'AI' |
| automod_behavior | 'flag' | 'block' | 'shadow_block' |
| commands | string[] | Yes | |
| connect_events | boolean | Yes | |
| count_messages | boolean | Yes | |
| created_at | number | Yes | |
| custom_events | boolean | Yes | |
| delivery_events | boolean | Yes | |
| mark_messages_pending | boolean | Yes | |
| max_message_length | number | Yes | |
| mutes | boolean | Yes | |
| name | string | Yes | |
| polls | boolean | Yes | |
| push_level | string | Yes | |
| push_notifications | boolean | Yes | |
| quotes | boolean | Yes | |
| reactions | boolean | Yes | |
| read_events | boolean | Yes | |
| reminders | boolean | Yes | |
| replies | boolean | Yes | |
| search | boolean | Yes | |
| shared_locations | boolean | Yes | |
| skip_last_msg_update_for_system_msgs | boolean | Yes | |
| typing_events | boolean | Yes | |
| updated_at | number | Yes | |
| uploads | boolean | Yes | |
| url_enrichment | boolean | Yes | |
| user_message_reminders | boolean | Yes | |
| allowed_flag_reasons | string[] | No | |
| automod_thresholds | Thresholds | No | |
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | 'shadow_block' |
| blocklists | BlockListOptions[] | No | |
| partition_size | number | No | |
| partition_ttl | number | No |
ChannelMember
interface ChannelMember {
archived_at?: number;
ban_expires?: number;
banned: boolean;
blocked?: boolean;
channel?: DenormalizedChannelFields;
channel_role: string;
created_at: number;
custom: Record<string, any>;
deleted_at?: number;
deleted_messages?: string[];
hidden?: boolean;
invite_accepted_at?: number;
invite_rejected_at?: number;
invited?: boolean;
is_global_banned: boolean;
is_moderator?: boolean;
notifications_muted: boolean;
pinned_at?: number;
shadow_banned: boolean;
status?: string;
updated_at: number;
user?: User;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | |
| channel_role | string | Yes | |
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| is_global_banned | boolean | Yes | |
| notifications_muted | boolean | Yes | |
| shadow_banned | boolean | Yes | |
| updated_at | number | Yes | |
| archived_at | number | No | |
| ban_expires | number | No | |
| blocked | boolean | No | |
| channel | DenormalizedChannelFields | No | |
| deleted_at | number | No | |
| deleted_messages | string[] | No | |
| hidden | boolean | No | |
| invite_accepted_at | number | No | |
| invite_rejected_at | number | No | |
| invited | boolean | No | |
| is_moderator | boolean | No | |
| pinned_at | number | No | |
| status | string | No | |
| user | User | No | |
| user_id | string | No |
ConfigOverrides
interface ConfigOverrides {
blocklist?: string;
blocklist_behavior?: 'flag' | 'block';
commands: string[];
count_messages?: boolean;
grants: Record<string, any>;
max_message_length?: number;
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
quotes?: boolean;
reactions?: boolean;
replies?: boolean;
shared_locations?: boolean;
typing_events?: boolean;
uploads?: boolean;
url_enrichment?: boolean;
user_message_reminders?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| commands | string[] | Yes | |
| grants | Record<string, any> | Yes | |
| blocklist | string | No | |
| blocklist_behavior | 'flag' | 'block' | No |
| count_messages | boolean | No | |
| max_message_length | number | No | |
| push_level | 'all' | 'all_mentions' | 'mentions' |
| quotes | boolean | No | |
| reactions | boolean | No | |
| replies | boolean | No | |
| shared_locations | boolean | No | |
| typing_events | boolean | No | |
| uploads | boolean | No | |
| url_enrichment | boolean | No | |
| user_message_reminders | boolean | No |
ConfigResponse
interface ConfigResponse {
ai_image_config?: AIImageConfig;
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_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 |
CustomActionRequest
interface CustomActionRequest {
id?: string;
options?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | No | |
| options | Record<string, any> | No |
DeleteActivityRequest
interface DeleteActivityRequest {
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| hard_delete | boolean | No | |
| reason | string | No |
DeleteCommentRequest
interface DeleteCommentRequest {
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| hard_delete | boolean | No | |
| reason | string | No |
DeleteMessageRequest
interface DeleteMessageRequest {
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| hard_delete | boolean | No | |
| reason | string | No |
DeleteModerationConfigResponse
interface DeleteModerationConfigResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteReactionRequest
interface DeleteReactionRequest {
hard_delete?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| hard_delete | boolean | No | |
| reason | string | No |
DeleteUserRequest
interface DeleteUserRequest {
delete_conversation_channels?: boolean;
delete_feeds_content?: boolean;
hard_delete?: boolean;
mark_messages_deleted?: boolean;
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delete_conversation_channels | boolean | No | |
| delete_feeds_content | boolean | No | |
| hard_delete | boolean | No | |
| mark_messages_deleted | boolean | No | |
| reason | string | No |
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[];
llm_labels: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| llm_labels | string[] | Yes | |
| ai_text_labels | string[] | No |
FlagRequest
interface FlagRequest {
custom?: Record<string, any>;
entity_creator_id?: string;
entity_id: string;
entity_type: string;
moderation_payload?: ModerationPayload;
reason?: 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 |
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 |
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 |
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[] | Yes | |
| cooldown_period | number | Yes | |
| harm_types | string[] | Yes | |
| severity | number | Yes | |
| threshold | number | Yes |
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 |
LLMConfig
interface LLMConfig {
app_context?: string;
async?: boolean;
enabled: boolean;
rules: LLMRule[];
severity_descriptions?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Yes | |
| rules | LLMRule[] | Yes | |
| app_context | string | No | |
| async | boolean | 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 |
|---|---|---|---|
| action | 'flag' | 'shadow' | 'remove' |
| description | string | Yes | |
| label | string | Yes | |
| severity_rules | BodyguardSeverityRule[] | Yes |
MarkReviewedRequest
interface MarkReviewedRequest {
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 | |
| decision_reason | string | No | |
| disable_marking_content_as_reviewed | boolean | No |
Message
interface Message {
attachments: Attachment[];
before_message_send_failed?: boolean;
cid: string;
command?: string;
created_at: number;
custom: Record<string, any>;
deleted_at?: number;
deleted_for_me?: boolean;
deleted_reply_count: number;
html: string;
i18n?: Record<string, any>;
id: string;
image_labels?: Record<string, any>;
latest_reactions: Reaction[];
member?: ChannelMember;
mentioned_channel: boolean;
mentioned_users: User[];
message_text_updated_at?: number;
mml?: string;
moderation?: ModerationV2Response;
own_reactions: Reaction[];
parent_id?: string;
pin_expires?: number;
pinned: boolean;
pinned_at?: number;
pinned_by?: User;
poll?: Poll;
poll_id?: string;
quoted_message?: Message;
quoted_message_id?: string;
reaction_counts: Record<string, any>;
reaction_groups: Record<string, any>;
reaction_scores: Record<string, any>;
reminder?: MessageReminder;
reply_count: number;
restricted_visibility: string[];
shadowed: boolean;
shared_location?: SharedLocation;
show_in_channel?: boolean;
silent: boolean;
text: string;
thread_participants?: User[];
type: string;
updated_at: number;
user?: User;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | Yes | |
| cid | string | Yes | |
| created_at | number | Yes | |
| custom | Record<string, any> | Yes | |
| deleted_reply_count | number | Yes | |
| html | string | Yes | |
| id | string | Yes | |
| latest_reactions | Reaction[] | Yes | |
| mentioned_channel | boolean | Yes | |
| mentioned_users | User[] | Yes | |
| own_reactions | Reaction[] | Yes | |
| pinned | boolean | Yes | |
| reaction_counts | Record<string, any> | Yes | |
| reaction_groups | Record<string, any> | Yes | |
| reaction_scores | Record<string, any> | Yes | |
| reply_count | number | Yes | |
| restricted_visibility | string[] | Yes | |
| shadowed | boolean | Yes | |
| silent | boolean | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| updated_at | number | Yes | |
| before_message_send_failed | boolean | No | |
| command | string | No | |
| deleted_at | number | No | |
| deleted_for_me | boolean | No | |
| i18n | Record<string, any> | No | |
| image_labels | Record<string, any> | No | |
| member | ChannelMember | No | |
| message_text_updated_at | number | No | |
| mml | string | No | |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | |
| pin_expires | number | No | |
| pinned_at | number | No | |
| pinned_by | User | No | |
| poll | Poll | No | |
| poll_id | string | No | |
| quoted_message | Message | No | |
| quoted_message_id | string | No | |
| reminder | MessageReminder | No | |
| shared_location | SharedLocation | No | |
| show_in_channel | boolean | No | |
| thread_participants | User[] | No | |
| user | User | No |
MessageReminder
interface MessageReminder {
channel?: Channel;
channel_cid: string;
created_at: number;
message?: Message;
message_id: string;
remind_at?: number;
task_id: string;
updated_at: number;
user?: User;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | number | Yes | |
| message_id | string | Yes | |
| task_id | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| channel | Channel | No | |
| message | Message | No | |
| remind_at | number | No | |
| user | User | 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 |
ModerationV2Response
interface ModerationV2Response {
action: string;
blocklist_matched?: string;
image_harms?: string[];
original_text: string;
platform_circumvented?: boolean;
semantic_filter_matched?: string;
text_harms?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| original_text | string | Yes | |
| blocklist_matched | string | No | |
| image_harms | string[] | No | |
| platform_circumvented | boolean | No | |
| semantic_filter_matched | string | No | |
| text_harms | string[] | No |
MuteResponse
interface MuteResponse {
duration: string;
mutes?: UserMute[];
non_existing_users?: string[];
own_user?: OwnUser;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| mutes | UserMute[] | 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 | OwnUser | 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 |
OwnUser
interface OwnUser {
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: Device[];
id: string;
invisible?: boolean;
language: string;
last_active?: number;
last_engaged_at?: number;
latest_hidden_channels?: string[];
mutes: UserMute[];
online: boolean;
privacy_settings?: PrivacySettings;
push_preferences?: PushPreferences;
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 | Device[] | Yes | |
| id | string | Yes | |
| language | string | Yes | |
| mutes | UserMute[] | Yes | |
| online | boolean | Yes | |
| role | string | Yes | |
| total_unread_count | number | Yes | |
| total_unread_count_by_team | Record<string, any> | 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 | |
| invisible | boolean | No | |
| last_active | number | No | |
| last_engaged_at | number | No | |
| latest_hidden_channels | string[] | No | |
| privacy_settings | PrivacySettings | No | |
| push_preferences | PushPreferences | No | |
| teams | string[] | No | |
| teams_role | 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 |
Poll
interface Poll {
Custom: Record<string, any>;
allow_answers: boolean;
allow_user_suggested_options: boolean;
answers_count: number;
created_at: number;
created_by?: User;
created_by_id: string;
description: string;
enforce_unique_vote: boolean;
id: string;
is_closed?: boolean;
latest_answers: PollVote[];
latest_votes_by_option: Record<string, any>;
max_votes_allowed?: number;
name: string;
options: PollOption[];
own_votes: PollVote[];
updated_at: number;
vote_count: number;
vote_counts_by_option: Record<string, any>;
voting_visibility?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Custom | Record<string, any> | Yes | |
| allow_answers | boolean | Yes | |
| allow_user_suggested_options | boolean | Yes | |
| answers_count | number | Yes | |
| created_at | number | Yes | |
| created_by_id | string | Yes | |
| description | string | Yes | |
| enforce_unique_vote | boolean | Yes | |
| id | string | Yes | |
| latest_answers | PollVote[] | Yes | |
| latest_votes_by_option | Record<string, any> | Yes | |
| name | string | Yes | |
| options | PollOption[] | Yes | |
| own_votes | PollVote[] | Yes | |
| updated_at | number | Yes | |
| vote_count | number | Yes | |
| vote_counts_by_option | Record<string, any> | Yes | |
| created_by | User | No | |
| is_closed | boolean | No | |
| max_votes_allowed | number | No | |
| voting_visibility | string | No |
PrivacySettings
interface PrivacySettings {
delivery_receipts?: DeliveryReceipts;
read_receipts?: ReadReceipts;
typing_indicators?: TypingIndicators;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceipts | No | |
| read_receipts | ReadReceipts | No | |
| typing_indicators | TypingIndicators | 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 |
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 |
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 |
RejectAppealRequest
interface RejectAppealRequest {
decision_reason: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | Yes |
RestoreActionRequest
interface RestoreActionRequest {
decision_reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No |
ReviewQueueItemResponse
interface ReviewQueueItemResponse {
actions: ActionLogResponse[];
activity?: EnrichedActivity;
ai_text_severity: string;
appeal?: AppealItemResponse;
assigned_to?: UserResponse;
bans: Ban[];
call?: CallResponse;
completed_at?: number;
config_key?: string;
created_at: number;
entity_creator?: EntityCreatorResponse;
entity_creator_id?: string;
entity_id: string;
entity_type: string;
feeds_v2_activity?: EnrichedActivity;
feeds_v2_reaction?: Reaction;
feeds_v3_activity?: ActivityResponse;
feeds_v3_comment?: CommentResponse;
flags: ModerationFlagResponse[];
flags_count: number;
id: string;
languages: string[];
latest_moderator_action: string;
message?: MessageResponse;
moderation_payload?: ModerationPayload;
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 | Ban[] | 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 |
| 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 |
| feeds_v2_activity | EnrichedActivity | No | Associated feed activity |
| feeds_v2_reaction | Reaction | No | Associated feed reaction |
| feeds_v3_activity | ActivityResponse | No | |
| feeds_v3_comment | CommentResponse | No | |
| message | MessageResponse | No | Associated message details |
| moderation_payload | ModerationPayload | No | Content being moderated |
| reaction | Reaction | No | |
| reviewed_at | number | No | When the item was reviewed |
| teams | string[] | No | Teams associated with this item |
RuleBuilderConfig
interface RuleBuilderConfig {
async?: boolean;
rules?: RuleBuilderRule[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | boolean | No | |
| rules | RuleBuilderRule[] | No |
RuleBuilderRule
interface RuleBuilderRule {
action: RuleBuilderAction;
conditions?: RuleBuilderCondition[];
cooldown_period?: string;
groups?: RuleBuilderConditionGroup[];
id?: string;
logic?: string;
rule_type: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | RuleBuilderAction | Yes | |
| rule_type | string | Yes | |
| conditions | RuleBuilderCondition[] | No | |
| cooldown_period | string | No | |
| groups | RuleBuilderConditionGroup[] | No | |
| id | string | No | |
| logic | string | No |
ShadowBlockActionRequest
interface ShadowBlockActionRequest {
reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No |
SharedLocation
interface SharedLocation {
channel?: Channel;
channel_cid: string;
created_at: number;
created_by_device_id: string;
end_at?: number;
latitude?: number;
longitude?: number;
message?: Message;
message_id: string;
updated_at: number;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | number | Yes | |
| created_by_device_id | string | Yes | |
| message_id | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| channel | Channel | No | |
| end_at | number | No | |
| latitude | number | No | |
| longitude | number | No | |
| message | Message | No |
SortParam
interface SortParam {
direction: number;
field: string;
type: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | Yes | |
| field | string | Yes | |
| type | string | Yes |
SortParamRequest
interface SortParamRequest {
direction?: number;
field?: string;
type?: '' | 'number' | 'boolean';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1 |
| field | string | No | Name of field to sort by |
| type | '' | 'number' | 'boolean' |
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 |
UnbanActionRequest
interface UnbanActionRequest {
decision_reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No |
UnblockActionRequest
interface UnblockActionRequest {
decision_reason?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No |
UpsertConfigResponse
interface UpsertConfigResponse {
config?: ConfigResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The created or updated moderation configuration |
User
interface User {
avg_response_time?: number;
ban_expires?: number;
banned: boolean;
created_at?: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
id: string;
invisible?: boolean;
language?: string;
last_active?: number;
last_engaged_at?: number;
online: boolean;
privacy_settings?: PrivacySettings;
revoke_tokens_issued_before?: number;
role: string;
teams?: string[];
teams_role: Record<string, any>;
updated_at?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | |
| custom | Record<string, any> | Yes | |
| id | string | Yes | |
| online | boolean | Yes | |
| role | string | Yes | |
| teams_role | Record<string, any> | Yes | |
| avg_response_time | number | No | |
| ban_expires | number | No | |
| created_at | number | No | |
| deactivated_at | number | No | |
| deleted_at | number | No | |
| invisible | boolean | No | |
| language | string | No | |
| last_active | number | No | |
| last_engaged_at | number | No | |
| privacy_settings | PrivacySettings | No | |
| revoke_tokens_issued_before | number | No | |
| teams | string[] | No | |
| updated_at | number | No |
UserMute
interface UserMute {
created_at: number;
expires?: number;
target?: User;
updated_at: number;
user?: User;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | Date/time of creation |
| updated_at | number | Yes | Date/time of the last update |
| expires | number | No | Date/time of mute expiration |
| target | User | No | User who's muted |
| user | User | No | Owner of channel mute |
UserRequest
User request object
interface UserRequest {
custom?: Record<string, any>;
id: string;
image?: string;
invisible?: boolean;
language?: string;
name?: string;
privacy_settings?: PrivacySettingsResponse;
}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 |
UserResponse
User response object
interface UserResponse {
avg_response_time?: number;
banned: boolean;
blocked_user_ids: string[];
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
id: string;
image?: string;
language: string;
last_active?: number;
name?: string;
online: boolean;
revoke_tokens_issued_before?: number;
role: string;
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 |
| 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 |
| 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 | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| revoke_tokens_issued_before | number | No | Revocation date for tokens |
| teams_role | Record<string, any> | 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 | Yes | |
| cascading_actions | boolean | Yes | |
| cids_per_user | number | Yes | |
| enabled | boolean | Yes | |
| first_message_only | boolean | Yes | |
| rules | VelocityFilterConfigRule[] | Yes | |
| async | boolean | 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 | Yes | |
| cascading_action | 'flag' | 'shadow' | 'remove' |
| cascading_threshold | number | Yes | |
| check_message_context | boolean | Yes | |
| fast_spam_threshold | number | Yes | |
| fast_spam_ttl | number | Yes | |
| ip_ban | boolean | Yes | |
| probation_period | number | Yes | |
| shadow_ban | boolean | Yes | |
| slow_spam_threshold | number | Yes | |
| slow_spam_ttl | number | Yes | |
| url_only | boolean | Yes | |
| slow_spam_ban_duration | number | No |
VideoCallRuleConfig
interface VideoCallRuleConfig {
flag_all_labels: boolean;
flagged_labels: string[];
rules: HarmConfig[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | boolean | Yes | |
| flagged_labels | string[] | Yes | |
| rules | HarmConfig[] | Yes |