Appearance
Moderation
About 14263 wordsAbout 48 min
Php SDK - Chat 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
Use this method to record a log of moderation actions taken within a chat, which helps in maintaining a history of actions for accountability and future reference.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Insert moderation action log
$response = $client->insertActionLog([
'action_type' => 'value',
'entity_creator_id' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'custom' => {},
'reason' => 'value',
]);
print_r($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 | array | No | Custom metadata for the action log |
| reason | string | No | Reason for the action |
appeal
Submit a request to challenge a moderation decision if you believe it was incorrect or unfair, helping to ensure accurate content moderation.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Appeal against the moderation decision
$response = $client->appeal([
'appeal_reason' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with attachments
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Appeal against the moderation decision
$response = $client->appeal([
'appeal_reason' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'attachments' => [],
]);
print_r($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 of a specific appeal you have submitted, allowing you to track the status and outcome of the appeal process.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get appeal item
$response = $client->getAppeal([
'id' => 'activity-123',
]);
print_r($response);Response: GetAppealResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
queryAppeals
Search and list submitted appeals based on specific criteria, enabling you to manage and review multiple appeals efficiently.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Appeals
$response = $client->queryAppeals([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Appeals
$response = $client->queryAppeals([
'sort' => [],
'next' => null,
]);
print_r($response);Example: with user and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query Appeals
$response = $client->queryAppeals([
'user' => ['id' => 'activity-123', 'custom' => {}],
'prev' => null,
]);
print_r($response);Response: QueryAppealsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter conditions for appeals |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for appeals |
| user | UserRequest | No | - |
| user_id | string | No | - |
ban
Use this method to prohibit a user from accessing your service due to violations, ensuring a safe and respectful environment.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ban
$response = $client->ban([
'target_user_id' => 'value',
'banned_by' => ['id' => 'activity-123', 'custom' => {}],
'banned_by_id' => 'value',
]);
print_r($response);Example: with channel_cid and delete_messages
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ban
$response = $client->ban([
'target_user_id' => 'value',
'channel_cid' => 'value',
'delete_messages' => 'value',
]);
print_r($response);Example: with ip_ban and reason
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ban
$response = $client->ban([
'target_user_id' => 'value',
'ip_ban' => false,
'reason' => 'value',
]);
print_r($response);Example: with shadow and timeout
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Ban
$response = $client->ban([
'target_user_id' => 'value',
'shadow' => false,
'timeout' => 10,
]);
print_r($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 | bool | No | Whether to ban the user's IP address |
| reason | string | No | Optional explanation for the ban |
| shadow | bool | No | Whether this is a shadow ban |
| timeout | int | No | Duration of the ban in minutes |
bulkImageModeration
Moderate multiple images at once to quickly assess and filter large volumes of visual content for adherence to guidelines.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Bulk image moderation
$response = $client->bulkImageModeration([
'csv_file' => 'value',
]);
print_r($response);Response: BulkImageModerationResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| csv_file | string | Yes | URL to CSV file containing image URLs to moderate |
bypass
This method allows you to override the moderation system for specific messages, ensuring that important content is delivered without delay or restriction.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Bypass Moderation
$response = $client->bypass([
'enabled' => false,
'target_user_id' => 'value',
]);
print_r($response);Response: BypassResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enabled | bool | Yes | Whether to enable moderation bypass for this user |
| target_user_id | string | Yes | ID of the user to update |
check
Evaluate a piece of content to determine if it complies with established moderation policies, safeguarding your community standards.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Check
$response = $client->check([
'entity_creator_id' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'user_id' => 'john',
'config_key' => 'value',
]);
print_r($response);Example: with config_team and content_published_at
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Check
$response = $client->check([
'entity_creator_id' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'config_team' => 'value',
'content_published_at' => 10,
]);
print_r($response);Example: with moderation_payload and options
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Check
$response = $client->check([
'entity_creator_id' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'moderation_payload' => ['custom' => {}],
'options' => {},
]);
print_r($response);Example: with test_mode and user
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Check
$response = $client->check([
'entity_creator_id' => 'value',
'entity_id' => 'value',
'entity_type' => 'value',
'test_mode' => false,
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($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 | array | No | Additional moderation configuration options |
| test_mode | bool | No | Whether to run moderation in test mode |
| user | UserRequest | No | - |
| user_id | string | No | - |
checkS3Access
Utilize this method to verify if your application has the necessary permissions to access images stored in an S3 bucket, ensuring smooth media retrieval and display.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Check S3 image access
$response = $client->checkS3Access([
's3_url' => 'value',
]);
print_r($response);Response: CheckS3AccessResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| s3_url | string | No | Optional stream+s3:// reference to test access against |
upsertConfig
Create a new or update an existing moderation policy configuration to tailor content review processes to your specific needs.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create or update moderation configuration
$response = $client->upsertConfig([
'key' => 'value',
'user_id' => 'john',
'ai_text_config' => ['async' => false],
]);
print_r($response);Example: with ai_video_config and async
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create or update moderation configuration
$response = $client->upsertConfig([
'key' => 'value',
'ai_video_config' => ['async' => false],
'async' => false,
]);
print_r($response);Example: with automod_platform_circumvention_config and automod_semantic_filters_config
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create or update moderation configuration
$response = $client->upsertConfig([
'key' => 'value',
'automod_platform_circumvention_config' => ['async' => false],
'automod_semantic_filters_config' => ['async' => false],
]);
print_r($response);Example: with automod_toxicity_config and aws_rekognition_config
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Create or update moderation configuration
$response = $client->upsertConfig([
'key' => 'value',
'automod_toxicity_config' => ['async' => false],
'aws_rekognition_config' => ['async' => false],
]);
print_r($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 | bool | 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 moderation configuration settings to review or audit how content moderation is being conducted.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get moderation configuration
$response = $client->getConfig([
'key' => 'value',
'team' => 'value',
]);
print_r($response);Response: GetConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | - |
| team | string | No | - |
deleteConfig
Remove a specific moderation policy to discontinue its application, allowing for policy updates or changes in moderation strategy.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete a moderation policy
$response = $client->deleteConfig([
'key' => 'value',
'user_id' => 'john',
'team' => 'value',
]);
print_r($response);Response: DeleteModerationConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | - |
| team | string | No | - |
| user_id | string | No | - |
queryModerationConfigs
Search and retrieve a list of all moderation configurations, offering visibility into the rules and policies currently in effect.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation configurations
$response = $client->queryModerationConfigs([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation configurations
$response = $client->queryModerationConfigs([
'sort' => [],
'next' => null,
]);
print_r($response);Example: with user and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation configurations
$response = $client->queryModerationConfigs([
'user' => ['id' => 'activity-123', 'custom' => {}],
'prev' => null,
]);
print_r($response);Response: QueryModerationConfigsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter conditions for moderation configs |
| limit | int | 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 moderation check on content, allowing users to apply specific rules or criteria. Use this method to evaluate content against bespoke moderation standards.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Custom check endpoint
$response = $client->customCheck([
'entity_id' => 'value',
'entity_type' => 'value',
'flags' => [],
'user_id' => 'john',
'moderation_payload' => ['custom' => {}],
]);
print_r($response);Example: with user and entity_creator_id
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Custom check endpoint
$response = $client->customCheck([
'entity_id' => 'value',
'entity_type' => 'value',
'flags' => [],
'user' => ['id' => 'activity-123', 'custom' => {}],
'entity_creator_id' => 'value',
]);
print_r($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 moderation templates for managing content feeds. Use this to view and select predefined moderation configurations for your content streams.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query feed moderation templates
$response = $client->v2QueryTemplates();
print_r($response);Response: QueryFeedModerationTemplatesResponse
v2UpsertTemplate
Creates or updates a feed moderation template, enabling users to maintain consistent moderation settings. Use this to ensure your feed templates are current or to introduce new moderation guidelines.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upsert feeds template
$response = $client->v2UpsertTemplate([
'config' => ['data_types' => {}, 'config_key' => 'value'],
'name' => 'My Feed',
]);
print_r($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 specific moderation template from the system. Use this method to clean up outdated or unnecessary templates from your moderation toolkit.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete a moderation template
$response = $client->v2DeleteTemplate();
print_r($response);Response: DeleteModerationTemplateResponse
flag
Marks content as needing moderation review, helping prioritize items that may violate guidelines. Use this method to alert moderators to potentially problematic content.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Flag content for moderation
$response = $client->flag([
'entity_id' => 'value',
'entity_type' => 'value',
'user_id' => 'john',
'entity_creator_id' => 'value',
]);
print_r($response);Example: with moderation_payload and reason
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Flag content for moderation
$response = $client->flag([
'entity_id' => 'value',
'entity_type' => 'value',
'moderation_payload' => ['custom' => {}],
'reason' => 'value',
]);
print_r($response);Example: with user and custom
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Flag content for moderation
$response = $client->flag([
'entity_id' => 'value',
'entity_type' => 'value',
'user' => ['id' => 'activity-123', 'custom' => {}],
'custom' => {},
]);
print_r($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 | array | 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
Use this method to retrieve the total number of flags associated with a user, which is useful for monitoring user activity and identifying potential issues or violations.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get flag count for a user
$response = $client->getFlagCount([
'entity_creator_id' => 'value',
'entity_type' => 'value',
]);
print_r($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
Provides a list of content items that have been flagged for moderation. Use this to review and manage content that requires attention due to potential guideline violations.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation flags
$response = $client->queryModerationFlags([
'limit' => 25,
'filter' => {},
'sort' => [],
]);
print_r($response);Example: with prev and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation flags
$response = $client->queryModerationFlags([
'prev' => null,
'next' => null,
]);
print_r($response);Response: QueryModerationFlagsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | - |
| limit | int | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | - |
queryModerationLogs
Accesses logs of past moderation actions, offering insights into historical moderation activities. Use this to audit, review, or analyze past moderation decisions and actions.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation action logs
$response = $client->queryModerationLogs([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation action logs
$response = $client->queryModerationLogs([
'sort' => [],
'next' => null,
]);
print_r($response);Example: with user and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation action logs
$response = $client->queryModerationLogs([
'user' => ['id' => 'activity-123', 'custom' => {}],
'prev' => null,
]);
print_r($response);Response: QueryModerationLogsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter conditions for moderation logs |
| limit | int | 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 moderation rule to apply specific guidelines to content evaluation. Use this to ensure your moderation policy is up-to-date or to introduce new criteria.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upsert moderation rule
$response = $client->upsertModerationRule([
'name' => 'My Feed',
'rule_type' => 'value',
'user_id' => 'john',
'action_sequences' => [],
]);
print_r($response);Example: with conditions and config_keys
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upsert moderation rule
$response = $client->upsertModerationRule([
'name' => 'My Feed',
'rule_type' => 'value',
'conditions' => [],
'config_keys' => [],
]);
print_r($response);Example: with cooldown_period and description
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upsert moderation rule
$response = $client->upsertModerationRule([
'name' => 'My Feed',
'rule_type' => 'value',
'cooldown_period' => 'value',
'description' => 'A description',
]);
print_r($response);Example: with enabled and groups
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Upsert moderation rule
$response = $client->upsertModerationRule([
'name' => 'My Feed',
'rule_type' => 'value',
'enabled' => false,
'groups' => [],
]);
print_r($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 | bool | 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 the details of a specific moderation rule, allowing users to review current moderation criteria. Use this to understand existing rules or to verify their application.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get moderation rule
$response = $client->getModerationRule();
print_r($response);Response: GetModerationRuleResponse
deleteModerationRule
Removes a specific moderation rule from the active set, aiding in policy refinement. Use this to eliminate outdated or irrelevant rules from your moderation framework.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Delete moderation rule
$response = $client->deleteModerationRule([
'user_id' => 'john',
]);
print_r($response);Response: DeleteModerationRuleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | No | - |
queryModerationRules
Retrieve a list of active moderation rules to understand the criteria used for content moderation. Use this method to stay informed about which rules are currently in effect within the chat environment.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation rules
$response = $client->queryModerationRules([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and next
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation rules
$response = $client->queryModerationRules([
'sort' => [],
'next' => null,
]);
print_r($response);Example: with user and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query moderation rules
$response = $client->queryModerationRules([
'user' => ['id' => 'activity-123', 'custom' => {}],
'prev' => null,
]);
print_r($response);Response: QueryModerationRulesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter conditions for moderation rules |
| limit | int | 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 in the chat, preventing them from sending messages. Use this method to maintain order during discussions or to prevent disruptive behavior.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mute
$response = $client->mute([
'target_ids' => [],
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($response);Example: with timeout
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Mute
$response = $client->mute([
'target_ids' => [],
'timeout' => 10,
]);
print_r($response);Response: MuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| target_ids | []string | Yes | User IDs to mute (if multiple users) |
| timeout | int | No | Duration of mute in minutes |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryReviewQueue
Access a list of content items waiting for moderation review. Use this method to manage and prioritize pending moderation tasks efficiently.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query review queue items
$response = $client->queryReviewQueue([
'user_id' => 'john',
'limit' => 25,
'filter' => {},
]);
print_r($response);Example: with sort and lock_items
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query review queue items
$response = $client->queryReviewQueue([
'sort' => [],
'lock_items' => false,
]);
print_r($response);Example: with next and prev
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query review queue items
$response = $client->queryReviewQueue([
'next' => null,
'prev' => null,
]);
print_r($response);Example: with lock_count and stats_only
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Query review queue items
$response = $client->queryReviewQueue([
'lock_count' => 10,
'stats_only' => false,
]);
print_r($response);Response: QueryReviewQueueResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | array | No | Filter conditions for review queue items |
| limit | int | No | - |
| lock_count | int | No | Number of items to lock (1-25) |
| lock_duration | int | No | Duration for which items should be locked |
| lock_items | bool | 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 | bool | No | Whether to return only statistics |
| user | UserRequest | No | - |
| user_id | string | No | - |
getReviewQueueItem
Fetch detailed information about a specific item in the moderation review queue. Use this method to examine the content and context of an item before making a moderation decision.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Get review queue item
$response = $client->getReviewQueueItem([
'id' => 'activity-123',
]);
print_r($response);Response: GetReviewQueueItemResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
submitAction
Perform a moderation action, such as approving or rejecting content, based on your review. Use this method to enforce moderation decisions and maintain community standards.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Submit moderation action
$response = $client->submitAction([
'action_type' => 'value',
'user_id' => 'john',
'ban' => ['ban_from_future_channels' => false],
]);
print_r($response);Example: with block and bypass
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Submit moderation action
$response = $client->submitAction([
'action_type' => 'value',
'block' => ['reason' => 'value'],
'bypass' => ['enabled' => false],
]);
print_r($response);Example: with custom and delete_activity
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Submit moderation action
$response = $client->submitAction([
'action_type' => 'value',
'custom' => ['id' => 'activity-123'],
'delete_activity' => ['entity_id' => 'value'],
]);
print_r($response);Example: with delete_comment and delete_message
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Submit moderation action
$response = $client->submitAction([
'action_type' => 'value',
'delete_comment' => ['entity_id' => 'value'],
'delete_message' => ['entity_id' => 'value'],
]);
print_r($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 previously banned user, restoring their ability to participate in the chat. Use this method when a user's ban period has ended or if a ban was issued in error.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Unban
$response = $client->unban([
'target_user_id' => 'value',
'channel_cid' => 'value',
'created_by' => 'value',
]);
print_r($response);Example: with unbanned_by and unbanned_by_id
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Unban
$response = $client->unban([
'target_user_id' => 'value',
'unbanned_by' => ['id' => 'activity-123', 'custom' => {}],
'unbanned_by_id' => 'value',
]);
print_r($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
Restore a muted user's ability to send messages in the chat. Use this method when the mute period has ended or if the mute was applied by mistake.
Example
<?php
use GetStream\StreamChat\Client;
$client = new Client($apiKey, $apiSecret);
// Or using environment variables:
// $client = new Client(getenv('STREAM_API_KEY'), getenv('STREAM_API_SECRET'));
// Unmute a user
$response = $client->unmute([
'target_ids' => [],
'user_id' => 'john',
'user' => ['id' => 'activity-123', 'custom' => {}],
]);
print_r($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
// AIImageConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'ocr_rules' => array, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| ocr_rules | array | No | |
| rules | array | No |
AIImageLabelDefinition
// AIImageLabelDefinition array structure
[
'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
// AITextConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'profile' => string, //
'rules' => array, //
'severity_rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| profile | string | No | |
| rules | array | No | |
| severity_rules | array | No |
AIVideoConfig
// AIVideoConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
AWSRekognitionRule
// AWSRekognitionRule array structure
[
'action' => string, //
'label' => string, //
'min_confidence' => float, //
'subclassifications' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| label | string | Yes | |
| min_confidence | float | Yes | |
| subclassifications | array | No |
Action
// Action array structure
[
'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
// ActionLogResponse array structure
[
'ai_providers' => array, //
'created_at' => float, // Timestamp when the action was taken
'custom' => array, // Additional metadata about the action
'id' => string, // Unique identifier of the action log
'reason' => string, // Reason for the moderation action
'review_queue_item' => ReviewQueueItemResponse, // Associated review queue item
'target_user' => UserResponse, // User who was the target of the action
'target_user_id' => string, // ID of the user who was the target of the action
'type' => string, // Type of moderation action
'user' => UserResponse, // User who performed the action
'user_id' => string, // ID of the user who performed the action
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_providers | array | Yes | |
| created_at | float | Yes | Timestamp when the action was taken |
| custom | array | 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
// ActionSequence array structure
[
'action' => string, //
'blur' => bool, //
'cooldown_period' => int, //
'threshold' => int, //
'time_window' => int, //
'warning' => bool, //
'warning_text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | No | |
| blur | bool | No | |
| cooldown_period | int | No | |
| threshold | int | No | |
| time_window | int | No | |
| warning | bool | No | |
| warning_text | string | No |
AppealItemResponse
// AppealItemResponse array structure
[
'appeal_reason' => string, // Reason Text of the Appeal Item
'attachments' => array, // Attachments(e.g. Images) of the Appeal Item
'created_at' => float, // When the flag was created
'decision_reason' => string, // Decision Reason of the Appeal Item
'entity_content' => ModerationPayload, //
'entity_id' => string, // ID of the entity
'entity_type' => string, // Type of entity
'id' => string, //
'status' => string, // Status of the Appeal Item
'updated_at' => float, // When the flag was last updated
'user' => UserResponse, // Details of the user who created the appeal
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | string | Yes | Reason Text of the Appeal Item |
| created_at | float | 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 | float | Yes | When the flag was last updated |
| attachments | array | 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
// AppealRequest array structure
[
'appeal_reason' => string, // Explanation for why the content is being appealed
'attachments' => array, // Array of Attachment URLs(e.g., images)
'entity_id' => string, // Unique identifier of the entity being appealed
'entity_type' => string, // Type of entity being appealed (e.g., message, user)
'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 | array | No | Array of Attachment URLs(e.g., images) |
| user | UserRequest | No | |
| user_id | string | No |
AppealResponse
// AppealResponse array structure
[
'appeal_id' => string, // Unique identifier of the created Appeal item
'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.
// Attachment array structure
[
'actions' => array, //
'asset_url' => string, //
'author_icon' => string, //
'author_link' => string, //
'author_name' => string, //
'color' => string, //
'custom' => array, //
'fallback' => string, //
'fields' => array, //
'footer' => string, //
'footer_icon' => string, //
'giphy' => Images, //
'image_url' => string, //
'og_scrape_url' => string, //
'original_height' => int, //
'original_width' => int, //
'pretext' => string, //
'text' => string, //
'thumb_url' => string, //
'title' => string, //
'title_link' => string, //
'type' => string, // Attachment type (e.g. image, video, url)
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | Yes | |
| actions | array | No | |
| asset_url | string | No | |
| author_icon | string | No | |
| author_link | string | No | |
| author_name | string | No | |
| color | string | No | |
| fallback | string | No | |
| fields | array | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | |
| og_scrape_url | string | No | |
| original_height | int | No | |
| original_width | int | 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
// AutomodPlatformCircumventionConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
AutomodRule
// AutomodRule array structure
[
'action' => string, //
'label' => string, //
'threshold' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| label | string | Yes | |
| threshold | float | Yes |
AutomodSemanticFiltersConfig
// AutomodSemanticFiltersConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
AutomodSemanticFiltersRule
// AutomodSemanticFiltersRule array structure
[
'action' => string, //
'name' => string, //
'threshold' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| name | string | Yes | |
| threshold | float | Yes |
AutomodToxicityConfig
// AutomodToxicityConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No |
BanActionRequestPayload
Configuration for ban moderation action
// BanActionRequestPayload array structure
[
'ban_from_future_channels' => bool, // Also ban user from all channels this moderator creates in the future
'channel_ban_only' => bool, // Ban only from specific channel
'channel_cid' => string, //
'delete_messages' => string, // Message deletion mode: soft, pruning, or hard
'ip_ban' => bool, // Whether to ban by IP address
'reason' => string, // Reason for the ban
'shadow' => bool, // Whether this is a shadow ban
'target_user_id' => string, // Optional: ban user directly without review item
'timeout' => int, // Duration of ban in minutes
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ban_from_future_channels | bool | No | Also ban user from all channels this moderator creates in the future |
| channel_ban_only | bool | No | Ban only from specific channel |
| channel_cid | string | No | |
| delete_messages | string | No | Message deletion mode: soft, pruning, or hard |
| ip_ban | bool | No | Whether to ban by IP address |
| reason | string | No | Reason for the ban |
| shadow | bool | No | Whether this is a shadow ban |
| target_user_id | string | No | Optional: ban user directly without review item |
| timeout | int | No | Duration of ban in minutes |
BanOptions
// BanOptions array structure
[
'delete_messages' => string, //
'duration' => int, //
'ip_ban' => bool, //
'reason' => string, //
'shadow_ban' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delete_messages | string | No | |
| duration | int | No | |
| ip_ban | bool | No | |
| reason | string | No | |
| shadow_ban | bool | No |
BanResponse
// BanResponse array structure
[
'banned_by' => UserResponse, //
'channel' => ChannelResponse, //
'created_at' => float, //
'expires' => float, //
'reason' => string, //
'shadow' => bool, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | float | No | |
| reason | string | No | |
| shadow | bool | No | |
| user | UserResponse | No |
BlockActionRequestPayload
Configuration for block action
// BlockActionRequestPayload array structure
[
'reason' => string, // Reason for blocking
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No | Reason for blocking |
BlockListConfig
// BlockListConfig array structure
[
'async' => bool, //
'enabled' => bool, //
'match_substring' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| match_substring | bool | No | |
| rules | array | No |
BlockListRule
// BlockListRule array structure
[
'action' => string, //
'name' => string, //
'team' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| name | string | No | |
| team | string | No |
BodyguardImageAnalysisConfig
// BodyguardImageAnalysisConfig array structure
[
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | array | No |
BodyguardRule
// BodyguardRule array structure
[
'action' => string, //
'label' => string, //
'severity_rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| label | string | Yes | |
| action | string | No | |
| severity_rules | array | No |
BodyguardSeverityRule
// BodyguardSeverityRule array structure
[
'action' => string, //
'severity' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| severity | string | Yes |
BulkImageModerationResponse
// BulkImageModerationResponse array structure
[
'duration' => string, //
'task_id' => string, // ID of the task for processing the bulk image moderation
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | ID of the task for processing the bulk image moderation |
BypassActionRequest
// BypassActionRequest array structure
[
'enabled' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
BypassResponse
// BypassResponse array structure
[
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
CallActionOptions
// CallActionOptions array structure
[
'duration' => int, //
'flag_reason' => string, //
'kick_reason' => string, //
'mute_audio' => bool, //
'mute_video' => bool, //
'reason' => string, //
'warning_text' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | int | No | |
| flag_reason | string | No | |
| kick_reason | string | No | |
| mute_audio | bool | No | |
| mute_video | bool | No | |
| reason | string | No | |
| warning_text | string | No |
CallCustomPropertyParameters
// CallCustomPropertyParameters array structure
[
'operator' => string, //
'property_key' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| property_key | string | No |
CallRuleActionSequence
// CallRuleActionSequence array structure
[
'actions' => array, //
'call_options' => CallActionOptions, //
'violation_number' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | array | No | |
| call_options | CallActionOptions | No | |
| violation_number | int | No |
CallTypeRuleParameters
// CallTypeRuleParameters array structure
[
'call_type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_type | string | No |
CallViolationCountParameters
// CallViolationCountParameters array structure
[
'threshold' => int, //
'time_window' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No | |
| time_window | string | No |
ChannelResponse
Represents channel in chat
// ChannelResponse array structure
[
'auto_translation_enabled' => bool, // Whether auto translation is enabled or not
'auto_translation_language' => string, // Language to translate to when auto translation is active
'blocked' => bool, // Whether this channel is blocked by current user or not
'cid' => string, // Channel CID (<type>:<id>)
'config' => ChannelConfigWithInfo, // Channel configuration
'cooldown' => int, // Cooldown period after sending each message
'created_at' => float, // Date/time of creation
'created_by' => UserResponse, // Creator of the channel
'custom' => array, // Custom data for this object
'deleted_at' => float, // Date/time of deletion
'disabled' => bool, //
'filter_tags' => array, // List of filter tags associated with the channel
'frozen' => bool, // Whether channel is frozen or not
'hidden' => bool, // Whether this channel is hidden by current user or not
'hide_messages_before' => float, // Date since when the message history is accessible
'id' => string, // Channel unique ID
'last_message_at' => float, // Date of the last message sent
'member_count' => int, // Number of members in the channel
'members' => array, // List of channel members (max 100)
'message_count' => int, // Number of messages in the channel
'mute_expires_at' => float, // Date of mute expiration
'muted' => bool, // Whether this channel is muted or not
'own_capabilities' => array, // List of channel capabilities of authenticated user
'team' => string, // Team the channel belongs to (multi-tenant only)
'truncated_at' => float, // Date of the latest truncation of the channel
'truncated_by' => UserResponse, //
'type' => string, // Type of the channel
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | Yes | Channel CID (<type>:<id>) |
| created_at | float | Yes | Date/time of creation |
| custom | array | Yes | Custom data for this object |
| disabled | bool | Yes | |
| frozen | bool | Yes | Whether channel is frozen or not |
| id | string | Yes | Channel unique ID |
| type | string | Yes | Type of the channel |
| updated_at | float | Yes | Date/time of the last update |
| auto_translation_enabled | bool | No | Whether auto translation is enabled or not |
| auto_translation_language | string | No | Language to translate to when auto translation is active |
| blocked | bool | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | int | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | float | No | Date/time of deletion |
| filter_tags | array | No | List of filter tags associated with the channel |
| hidden | bool | No | Whether this channel is hidden by current user or not |
| hide_messages_before | float | No | Date since when the message history is accessible |
| last_message_at | float | No | Date of the last message sent |
| member_count | int | No | Number of members in the channel |
| members | array | No | List of channel members (max 100) |
| message_count | int | No | Number of messages in the channel |
| mute_expires_at | float | No | Date of mute expiration |
| muted | bool | No | Whether this channel is muted or not |
| own_capabilities | array | No | List of channel capabilities of authenticated user |
| team | string | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | float | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
CheckResponse
// CheckResponse array structure
[
'duration' => string, //
'item' => ReviewQueueItemResponse, // Review queue item (present if action != keep)
'recommended_action' => string, // Suggested action based on moderation results
'status' => string, // Status of the moderation check (completed or pending)
'task_id' => string, // ID of the running moderation task
'triggered_rule' => TriggeredRuleResponse, // Rule triggered by evaluation, with resolved actions and escalation details
]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
// CheckS3AccessResponse array structure
[
'duration' => string, //
'message' => string, // Descriptive message about the check result
'success' => bool, // Whether the S3 access check succeeded
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| success | bool | Yes | Whether the S3 access check succeeded |
| message | string | No | Descriptive message about the check result |
ClosedCaptionRuleParameters
// ClosedCaptionRuleParameters array structure
[
'harm_labels' => array, //
'llm_harm_labels' => array, //
'threshold' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | array | No | |
| llm_harm_labels | array | No | |
| threshold | int | No |
ConfigResponse
// ConfigResponse array structure
[
'ai_image_config' => AIImageConfig, // Configuration for AI image analysis
'ai_image_label_definitions' => array, // Configurable image moderation label definitions for dashboard rendering
'ai_image_subclassifications' => array, // Available L2 subclassifications per L1 image moderation label, based on the active provider
'ai_text_config' => AITextConfig, // Configuration for AI text analysis
'ai_video_config' => AIVideoConfig, // Configuration for AI video analysis
'async' => bool, // Whether moderation should be performed asynchronously
'automod_platform_circumvention_config' => AutomodPlatformCircumventionConfig, // Configuration for platform circumvention detection
'automod_semantic_filters_config' => AutomodSemanticFiltersConfig, // Configuration for semantic filtering
'automod_toxicity_config' => AutomodToxicityConfig, // Configuration for toxicity detection
'block_list_config' => BlockListConfig, // Configuration for block list filtering
'created_at' => float, // When the configuration was created
'key' => string, // Unique identifier for the moderation configuration
'llm_config' => LLMConfig, // Configuration for customer-configured LLM moderation
'supported_video_call_harm_types' => array, //
'team' => string, // Team associated with the configuration
'updated_at' => float, // When the configuration was last updated
'velocity_filter_config' => VelocityFilterConfig, // Configuration for velocity-based filtering
'video_call_rule_config' => VideoCallRuleConfig, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | Yes | Whether moderation should be performed asynchronously |
| created_at | float | Yes | When the configuration was created |
| key | string | Yes | Unique identifier for the moderation configuration |
| supported_video_call_harm_types | array | Yes | |
| team | string | Yes | Team associated with the configuration |
| updated_at | float | Yes | When the configuration was last updated |
| ai_image_config | AIImageConfig | No | Configuration for AI image analysis |
| ai_image_label_definitions | array | No | Configurable image moderation label definitions for dashboard rendering |
| ai_image_subclassifications | array | 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
// ContentCountRuleParameters array structure
[
'threshold' => int, //
'time_window' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No | |
| time_window | string | No |
CustomActionRequestPayload
Configuration for custom moderation action
// CustomActionRequestPayload array structure
[
'id' => string, // Custom action identifier
'options' => array, // Custom action options
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | No | Custom action identifier |
| options | array | No | Custom action options |
CustomCheckFlag
// CustomCheckFlag array structure
[
'custom' => array, // Additional metadata for the flag
'labels' => array, // Labels from various moderation sources
'reason' => string, // Optional explanation for the flag
'type' => string, // Type of check (custom_check_text, custom_check_image, custom_check_video)
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of check (custom_check_text, custom_check_image, custom_check_video) |
| custom | array | No | Additional metadata for the flag |
| labels | array | No | Labels from various moderation sources |
| reason | string | No | Optional explanation for the flag |
CustomCheckResponse
// CustomCheckResponse array structure
[
'duration' => string, //
'id' => string, // Unique identifier of the custom check
'item' => ReviewQueueItemResponse, // Review queue item details
'status' => string, // Status of the custom check
]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
// DeleteActivityRequestPayload array structure
[
'entity_id' => string, // ID of the activity to delete (alternative to item_id)
'entity_type' => string, // Type of the entity (required for delete_activity to distinguish v2 vs v3)
'hard_delete' => bool, // Whether to permanently delete the activity
'reason' => string, // Reason for deletion
]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 | bool | No | Whether to permanently delete the activity |
| reason | string | No | Reason for deletion |
DeleteCommentRequestPayload
Configuration for comment deletion action
// DeleteCommentRequestPayload array structure
[
'entity_id' => string, // ID of the comment to delete (alternative to item_id)
'entity_type' => string, // Type of the entity
'hard_delete' => bool, // Whether to permanently delete the comment
'reason' => string, // Reason for deletion
]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 | bool | No | Whether to permanently delete the comment |
| reason | string | No | Reason for deletion |
DeleteMessageRequestPayload
Configuration for message deletion action
// DeleteMessageRequestPayload array structure
[
'entity_id' => string, // ID of the message to delete (alternative to item_id)
'entity_type' => string, // Type of the entity
'hard_delete' => bool, // Whether to permanently delete the message
'reason' => string, // Reason for deletion
]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 | bool | No | Whether to permanently delete the message |
| reason | string | No | Reason for deletion |
DeleteModerationConfigResponse
// DeleteModerationConfigResponse array structure
[
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteModerationRuleResponse
Basic response information
// DeleteModerationRuleResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteModerationTemplateResponse
// DeleteModerationTemplateResponse array structure
[
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteReactionRequestPayload
Configuration for reaction deletion action
// DeleteReactionRequestPayload array structure
[
'entity_id' => string, // ID of the reaction to delete (alternative to item_id)
'entity_type' => string, // Type of the entity
'hard_delete' => bool, // Whether to permanently delete the reaction
'reason' => string, // Reason for deletion
]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 | bool | No | Whether to permanently delete the reaction |
| reason | string | No | Reason for deletion |
DeleteUserRequestPayload
Configuration for user deletion action
// DeleteUserRequestPayload array structure
[
'delete_conversation_channels' => bool, // Also delete all user conversations
'delete_feeds_content' => bool, // Delete flagged feeds content
'entity_id' => string, // ID of the user to delete (alternative to item_id)
'entity_type' => string, // Type of the entity
'hard_delete' => bool, // Whether to permanently delete the user
'mark_messages_deleted' => bool, // Also delete all user messages
'reason' => string, // Reason for deletion
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delete_conversation_channels | bool | No | Also delete all user conversations |
| delete_feeds_content | bool | 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 | bool | No | Whether to permanently delete the user |
| mark_messages_deleted | bool | No | Also delete all user messages |
| reason | string | No | Reason for deletion |
EscalatePayload
Configuration for escalation action
// EscalatePayload array structure
[
'notes' => string, // Additional context for the reviewer
'priority' => string, // Priority of the escalation (low, medium, high)
'reason' => string, // Reason for the escalation (from configured escalation_reasons)
]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
// FeedsModerationTemplateConfigPayload array structure
[
'config_key' => string, // Key of the moderation configuration to use
'data_types' => array, // Map of data type names to their content types
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| data_types | array | Yes | Map of data type names to their content types |
| config_key | string | No | Key of the moderation configuration to use |
Field
// Field array structure
[
'short' => bool, //
'title' => string, //
'value' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | string | Yes | |
| value | string | Yes |
FilterConfigResponse
// FilterConfigResponse array structure
[
'ai_text_labels' => array, //
'config_keys' => array, //
'llm_labels' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| llm_labels | array | Yes | |
| ai_text_labels | array | No | |
| config_keys | array | No |
FlagCountRuleParameters
// FlagCountRuleParameters array structure
[
'threshold' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No |
FlagRequest
// FlagRequest array structure
[
'custom' => array, // Additional metadata about the flag
'entity_creator_id' => string, // ID of the user who created the flagged entity
'entity_id' => string, // Unique identifier of the entity being flagged
'entity_type' => string, // Type of entity being flagged (e.g., message, user)
'moderation_payload' => ModerationPayload, // Content being flagged
'reason' => string, // Optional explanation for why the content is being flagged
'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 | array | 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
// FlagResponse array structure
[
'duration' => string, //
'item_id' => string, // Unique identifier of the created moderation item
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item_id | string | Yes | Unique identifier of the created moderation item |
FlagUserOptions
// FlagUserOptions array structure
[
'reason' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No |
GetAppealResponse
// GetAppealResponse array structure
[
'duration' => string, //
'item' => AppealItemResponse, // Current state of the appeal
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item | AppealItemResponse | No | Current state of the appeal |
GetConfigResponse
// GetConfigResponse array structure
[
'config' => ConfigResponse, // The retrieved moderation configuration
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The retrieved moderation configuration |
GetFlagCountResponse
// GetFlagCountResponse array structure
[
'count' => int, // Total number of flags against the specified user's content
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| count | int | Yes | Total number of flags against the specified user's content |
| duration | string | Yes |
GetModerationRuleResponse
Basic response information
// GetModerationRuleResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'rule' => ModerationRuleV2Response, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| rule | ModerationRuleV2Response | No |
GetReviewQueueItemResponse
// GetReviewQueueItemResponse array structure
[
'duration' => string, //
'item' => ReviewQueueItemResponse, // Current state of the review queue item
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item | ReviewQueueItemResponse | No | Current state of the review queue item |
GoogleVisionConfig
// GoogleVisionConfig array structure
[
'enabled' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
HarmConfig
// HarmConfig array structure
[
'action_sequences' => array, //
'cooldown_period' => int, //
'harm_types' => array, //
'severity' => int, //
'threshold' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_sequences | array | No | |
| cooldown_period | int | No | |
| harm_types | array | No | |
| severity | int | No | |
| threshold | int | No |
ImageContentParameters
// ImageContentParameters array structure
[
'harm_labels' => array, //
'label_operator' => string, //
'min_confidence' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | array | No | |
| label_operator | string | No | |
| min_confidence | float | No |
ImageRuleParameters
// ImageRuleParameters array structure
[
'harm_labels' => array, //
'min_confidence' => float, //
'threshold' => int, //
'time_window' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | array | No | |
| min_confidence | float | No | |
| threshold | int | No | |
| time_window | string | No |
Images
// Images array structure
[
'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
// InsertActionLogResponse array structure
[
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
KeyframeRuleParameters
// KeyframeRuleParameters array structure
[
'harm_labels' => array, //
'min_confidence' => float, //
'threshold' => int, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | array | No | |
| min_confidence | float | No | |
| threshold | int | No |
LLMConfig
// LLMConfig array structure
[
'app_context' => string, //
'async' => bool, //
'enabled' => bool, //
'rules' => array, //
'severity_descriptions' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | string | No | |
| async | bool | No | |
| enabled | bool | No | |
| rules | array | No | |
| severity_descriptions | array | No |
LLMRule
// LLMRule array structure
[
'action' => string, //
'description' => string, //
'label' => string, //
'severity_rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | |
| label | string | Yes | |
| action | string | No | |
| severity_rules | array | No |
MarkReviewedRequestPayload
Configuration for mark reviewed action
// MarkReviewedRequestPayload array structure
[
'content_to_mark_as_reviewed_limit' => int, // Maximum content items to mark as reviewed
'decision_reason' => string, // Reason for the appeal decision
'disable_marking_content_as_reviewed' => bool, // Skip marking content as reviewed
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| content_to_mark_as_reviewed_limit | int | No | Maximum content items to mark as reviewed |
| decision_reason | string | No | Reason for the appeal decision |
| disable_marking_content_as_reviewed | bool | No | Skip marking content as reviewed |
MessageRequest
Message data for creating or updating a message
// MessageRequest array structure
[
'attachments' => array, // Array of message attachments
'custom' => array, //
'html' => string, // Contains HTML markup of the message. Can only be set when using server-side API
'id' => string, // Message ID is unique string identifier of the message
'mentioned_channel' => bool, //
'mentioned_group_ids' => array, // List of user group IDs to mention. Group members who are also channel members will receive push notifications. Max 10 groups
'mentioned_here' => bool, //
'mentioned_roles' => array, //
'mentioned_users' => array, // Array of user IDs to mention
'mml' => string, // Should be empty if `text` is provided. Can only be set when using server-side API
'parent_id' => string, // ID of parent message (thread)
'pin_expires' => float, // Date when pinned message expires
'pinned' => bool, // Whether message is pinned or not
'pinned_at' => string, // Date when message got pinned
'poll_id' => string, // Identifier of the poll to include in the message
'quoted_message_id' => string, //
'restricted_visibility' => array, // A list of user ids that have restricted visibility to the message
'shared_location' => SharedLocation, // Contains shared location data
'show_in_channel' => bool, // Whether thread reply should be shown in the channel as well
'silent' => bool, // Whether message is silent or not
'text' => string, // Text of the message. Should be empty if `mml` is provided
'type' => string, // Contains type of the message. One of: regular, system
'user' => UserRequest, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | array | No | Array of message attachments |
| custom | array | No | |
| html | string | No | Contains HTML markup of the message. Can only be set when using server-side API |
| id | string | No | Message ID is unique string identifier of the message |
| mentioned_channel | bool | No | |
| mentioned_group_ids | array | No | List of user group IDs to mention. Group members who are also channel members... |
| mentioned_here | bool | No | |
| mentioned_roles | array | No | |
| mentioned_users | array | No | Array of user IDs to mention |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | float | No | Date when pinned message expires |
| pinned | bool | No | Whether message is pinned or not |
| pinned_at | string | No | Date when message got pinned |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message_id | string | No | |
| restricted_visibility | array | No | A list of user ids that have restricted visibility to the message |
| shared_location | SharedLocation | No | Contains shared location data |
| show_in_channel | bool | No | Whether thread reply should be shown in the channel as well |
| silent | bool | No | Whether message is silent or not |
| text | string | No | Text of the message. Should be empty if mml is provided |
| type | string | No | Contains type of the message. One of: regular, system |
| user | UserRequest | No | |
| user_id | string | No |
ModerationConfig
// ModerationConfig array structure
[
'ai_image_config' => AIImageConfig, //
'ai_image_lite_config' => BodyguardImageAnalysisConfig, //
'ai_text_config' => AITextConfig, //
'ai_video_config' => AIVideoConfig, //
'async' => bool, //
'automod_platform_circumvention_config' => AutomodPlatformCircumventionConfig, //
'automod_semantic_filters_config' => AutomodSemanticFiltersConfig, //
'automod_toxicity_config' => AutomodToxicityConfig, //
'block_list_config' => BlockListConfig, //
'created_at' => float, //
'google_vision_config' => GoogleVisionConfig, //
'key' => string, //
'llm_config' => LLMConfig, //
'supported_video_call_harm_types' => array, //
'team' => string, //
'updated_at' => float, //
'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 | bool | No | |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | |
| automod_toxicity_config | AutomodToxicityConfig | No | |
| block_list_config | BlockListConfig | No | |
| created_at | float | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | string | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | array | No | |
| team | string | No | |
| updated_at | float | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationFlagResponse
// ModerationFlagResponse array structure
[
'created_at' => float, //
'custom' => array, //
'entity_creator_id' => string, //
'entity_id' => string, //
'entity_type' => string, //
'labels' => array, //
'moderation_payload' => ModerationPayloadResponse, //
'reason' => string, //
'result' => array, //
'review_queue_item' => ReviewQueueItemResponse, //
'review_queue_item_id' => string, //
'type' => string, //
'updated_at' => float, //
'user' => UserResponse, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| entity_id | string | Yes | |
| entity_type | string | Yes | |
| result | array | Yes | |
| type | string | Yes | |
| updated_at | float | Yes | |
| user_id | string | Yes | |
| custom | array | No | |
| entity_creator_id | string | No | |
| labels | array | No | |
| moderation_payload | ModerationPayloadResponse | No | |
| reason | string | No | |
| review_queue_item | ReviewQueueItemResponse | No | |
| review_queue_item_id | string | No | |
| user | UserResponse | No |
ModerationPayload
// ModerationPayload array structure
[
'custom' => array, //
'images' => array, //
'texts' => array, //
'videos' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | No | |
| images | array | No | |
| texts | array | No | |
| videos | array | No |
ModerationPayloadRequest
Content payload for moderation
// ModerationPayloadRequest array structure
[
'custom' => array, // Custom data for moderation
'images' => array, // Image URLs to moderate (max 30)
'texts' => array, // Text content to moderate
'videos' => array, // Video URLs to moderate
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | array | No | Custom data for moderation |
| images | array | No | Image URLs to moderate (max 30) |
| texts | array | No | Text content to moderate |
| videos | array | No | Video URLs to moderate |
ModerationRuleV2Response
// ModerationRuleV2Response array structure
[
'action' => RuleBuilderAction, //
'action_sequences' => array, //
'conditions' => array, //
'config_keys' => array, //
'cooldown_period' => string, //
'created_at' => float, //
'description' => string, //
'enabled' => bool, //
'groups' => array, //
'id' => string, //
'logic' => string, //
'name' => string, //
'rule_type' => string, //
'team' => string, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| config_keys | array | Yes | |
| created_at | float | Yes | |
| description | string | Yes | |
| enabled | bool | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| rule_type | string | Yes | |
| team | string | Yes | |
| updated_at | float | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | array | No | |
| conditions | array | No | |
| cooldown_period | string | No | |
| groups | array | No | |
| logic | string | No |
MuteResponse
// MuteResponse array structure
[
'duration' => string, //
'mutes' => array, // Object with mutes (if multiple users were muted)
'non_existing_users' => array, // A list of users that can't be found. Common cause for this is deleted users
'own_user' => OwnUserResponse, // Authorized user object with fresh mutes information
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| mutes | array | No | Object with mutes (if multiple users were muted) |
| non_existing_users | array | 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
// OCRRule array structure
[
'action' => string, //
'label' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| label | string | Yes |
OwnUserResponse
// OwnUserResponse array structure
[
'avg_response_time' => int, //
'banned' => bool, //
'blocked_user_ids' => array, //
'channel_mutes' => array, //
'created_at' => float, //
'custom' => array, //
'deactivated_at' => float, //
'deleted_at' => float, //
'devices' => array, //
'id' => string, //
'image' => string, //
'invisible' => bool, //
'language' => string, //
'last_active' => float, //
'latest_hidden_channels' => array, //
'mutes' => array, //
'name' => string, //
'online' => bool, //
'privacy_settings' => PrivacySettingsResponse, //
'push_preferences' => PushPreferencesResponse, //
'revoke_tokens_issued_before' => float, //
'role' => string, //
'teams' => array, //
'teams_role' => array, //
'total_unread_count' => int, //
'total_unread_count_by_team' => array, //
'unread_channels' => int, //
'unread_count' => int, //
'unread_threads' => int, //
'updated_at' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | |
| channel_mutes | array | Yes | |
| created_at | float | Yes | |
| custom | array | Yes | |
| devices | array | Yes | |
| id | string | Yes | |
| invisible | bool | Yes | |
| language | string | Yes | |
| mutes | array | Yes | |
| online | bool | Yes | |
| role | string | Yes | |
| teams | array | Yes | |
| total_unread_count | int | Yes | |
| unread_channels | int | Yes | |
| unread_count | int | Yes | |
| unread_threads | int | Yes | |
| updated_at | float | Yes | |
| avg_response_time | int | No | |
| blocked_user_ids | array | No | |
| deactivated_at | float | No | |
| deleted_at | float | No | |
| image | string | No | |
| last_active | float | No | |
| latest_hidden_channels | array | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | float | No | |
| teams_role | array | No | |
| total_unread_count_by_team | array | No |
PrivacySettingsResponse
// PrivacySettingsResponse array structure
[
'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
// QueryAppealsResponse array structure
[
'duration' => string, //
'items' => array, // List of Appeal Items
'next' => string, //
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| items | array | Yes | List of Appeal Items |
| next | string | No | |
| prev | string | No |
QueryFeedModerationTemplate
// QueryFeedModerationTemplate array structure
[
'config' => FeedsModerationTemplateConfigPayload, // Configuration for the moderation template
'created_at' => float, // When the template was created
'name' => string, // Name of the moderation template
'updated_at' => float, // When the template was last updated
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the template was created |
| name | string | Yes | Name of the moderation template |
| updated_at | float | Yes | When the template was last updated |
| config | FeedsModerationTemplateConfigPayload | No | Configuration for the moderation template |
QueryFeedModerationTemplatesResponse
// QueryFeedModerationTemplatesResponse array structure
[
'duration' => string, //
'templates' => array, // List of moderation templates
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| templates | array | Yes | List of moderation templates |
QueryModerationConfigsResponse
// QueryModerationConfigsResponse array structure
[
'configs' => array, // List of moderation configurations
'duration' => string, //
'next' => string, //
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| configs | array | Yes | List of moderation configurations |
| duration | string | Yes | |
| next | string | No | |
| prev | string | No |
QueryModerationFlagsResponse
Basic response information
// QueryModerationFlagsResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'flags' => array, //
'next' => string, //
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| flags | array | Yes | |
| next | string | No | |
| prev | string | No |
QueryModerationLogsResponse
// QueryModerationLogsResponse array structure
[
'duration' => string, //
'logs' => array, // List of moderation action logs
'next' => string, //
'prev' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| logs | array | Yes | List of moderation action logs |
| next | string | No | |
| prev | string | No |
QueryModerationRulesResponse
// QueryModerationRulesResponse array structure
[
'ai_image_label_definitions' => array, // AI image label definitions with metadata for dashboard rendering
'ai_image_subclassifications' => array, // Stream L1 to leaf-level label name mapping for AI image rules
'closed_caption_labels' => array, // Available harm labels for closed caption rules
'default_llm_labels' => array, // Default LLM label descriptions
'duration' => string, //
'keyframe_label_classifications' => array, // L1 to L2 mapping of keyframe harm label classifications
'keyframe_labels' => array, // Deprecated: use keyframe_label_classifications instead. Available L1 harm labels for keyframe rules
'next' => string, //
'prev' => string, //
'rules' => array, // List of moderation rules
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_label_definitions | array | Yes | AI image label definitions with metadata for dashboard rendering |
| ai_image_subclassifications | array | Yes | Stream L1 to leaf-level label name mapping for AI image rules |
| closed_caption_labels | array | Yes | Available harm labels for closed caption rules |
| default_llm_labels | array | Yes | Default LLM label descriptions |
| duration | string | Yes | |
| keyframe_label_classifications | array | Yes | L1 to L2 mapping of keyframe harm label classifications |
| keyframe_labels | array | Yes | Deprecated: use keyframe_label_classifications instead. Available L1 harm lab... |
| rules | array | Yes | List of moderation rules |
| next | string | No | |
| prev | string | No |
QueryReviewQueueResponse
// QueryReviewQueueResponse array structure
[
'action_config' => array, // Configuration for moderation actions
'duration' => string, //
'filter_config' => FilterConfigResponse, // Configuration for filters in moderation review queue
'items' => array, // List of review queue items
'next' => string, //
'prev' => string, //
'stats' => array, // Statistics about the review queue
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_config | array | Yes | Configuration for moderation actions |
| duration | string | Yes | |
| items | array | Yes | List of review queue items |
| stats | array | Yes | Statistics about the review queue |
| filter_config | FilterConfigResponse | No | Configuration for filters in moderation review queue |
| next | string | No | |
| prev | string | No |
Reaction
// Reaction array structure
[
'activity_id' => string, //
'children_counts' => array, //
'created_at' => float, //
'data' => array, //
'deleted_at' => float, //
'id' => string, //
'kind' => string, //
'latest_children' => array, //
'moderation' => array, //
'own_children' => array, //
'parent' => string, //
'score' => float, //
'target_feeds' => array, //
'target_feeds_extra_data' => array, //
'updated_at' => float, //
'user' => User, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | float | Yes | |
| kind | string | Yes | |
| updated_at | float | Yes | |
| user_id | string | Yes | |
| children_counts | array | No | |
| data | array | No | |
| deleted_at | float | No | |
| id | string | No | |
| latest_children | array | No | |
| moderation | array | No | |
| own_children | array | No | |
| parent | string | No | |
| score | float | No | |
| target_feeds | array | No | |
| target_feeds_extra_data | array | No | |
| user | User | No |
ReactionRequest
Represents user reaction to a message
// ReactionRequest array structure
[
'created_at' => float, // Date/time of creation
'custom' => array, //
'score' => int, // Reaction score. If not specified reaction has score of 1
'type' => string, // The type of reaction (e.g. 'like', 'laugh', 'wow')
'updated_at' => float, // Date/time of the last update
'user' => UserRequest, //
'user_id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | The type of reaction (e.g. 'like', 'laugh', 'wow') |
| created_at | float | No | Date/time of creation |
| custom | array | No | |
| score | int | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | float | No | Date/time of the last update |
| user | UserRequest | No | |
| user_id | string | No |
RejectAppealRequestPayload
Configuration for rejecting an appeal
// RejectAppealRequestPayload array structure
[
'decision_reason' => string, // Reason for rejecting the appeal
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | Yes | Reason for rejecting the appeal |
RestoreActionRequestPayload
Configuration for restore action
// RestoreActionRequestPayload array structure
[
'decision_reason' => string, // Reason for the appeal decision
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No | Reason for the appeal decision |
ReviewQueueItemResponse
// ReviewQueueItemResponse array structure
[
'actions' => array, // Moderation actions taken
'activity' => EnrichedActivity, //
'ai_text_severity' => string, // AI-determined text severity
'appeal' => AppealItemResponse, // Appeal submitted for this item if it exists
'assigned_to' => UserResponse, // Moderator assigned to review this item
'bans' => array, // Associated ban records
'call' => CallResponse, //
'completed_at' => float, // When the review was completed
'config_key' => string, //
'created_at' => float, // When the item was created
'entity_creator' => EntityCreatorResponse, // Details about who created the entity
'entity_creator_id' => string, // ID of who created the entity
'entity_id' => string, // ID of the entity being reviewed
'entity_type' => string, // Type of entity being reviewed
'escalated' => bool, // Whether the item has been escalated
'escalated_at' => float, // When the item was escalated
'escalated_by' => string, // ID of the moderator who escalated the item
'escalation_metadata' => EscalationMetadata, // Escalation details including reason, notes, and priority
'feeds_v2_activity' => EnrichedActivity, // Associated feed activity
'feeds_v2_reaction' => Reaction, // Associated feed reaction
'feeds_v3_activity' => FeedsV3ActivityResponse, //
'feeds_v3_comment' => FeedsV3CommentResponse, //
'flags' => array, // Associated flag records
'flags_count' => int, //
'id' => string, // Unique identifier of the review queue item
'languages' => array, // Detected languages in the content
'latest_moderator_action' => string, //
'message' => MessageResponse, // Associated message details
'moderation_payload' => ModerationPayloadResponse, // Content being moderated
'reaction' => Reaction, //
'recommended_action' => string, // Suggested moderation action
'reviewed_at' => float, // When the item was reviewed
'reviewed_by' => string, // ID of the moderator who reviewed the item
'severity' => int, // Severity level of the content
'status' => string, // Current status of the review
'teams' => array, // Teams associated with this item
'updated_at' => float, // When the item was last updated
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | array | Yes | Moderation actions taken |
| ai_text_severity | string | Yes | AI-determined text severity |
| bans | array | Yes | Associated ban records |
| created_at | float | 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 | bool | Yes | Whether the item has been escalated |
| flags | array | Yes | Associated flag records |
| flags_count | int | Yes | |
| id | string | Yes | Unique identifier of the review queue item |
| languages | array | 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 | int | Yes | Severity level of the content |
| status | string | Yes | Current status of the review |
| updated_at | float | 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 | float | 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 | float | 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 | float | No | When the item was reviewed |
| teams | array | No | Teams associated with this item |
RuleBuilderAction
// RuleBuilderAction array structure
[
'ban_options' => BanOptions, //
'call_options' => CallActionOptions, //
'flag_user_options' => FlagUserOptions, //
'skip_inbox' => bool, //
'type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ban_options | BanOptions | No | |
| call_options | CallActionOptions | No | |
| flag_user_options | FlagUserOptions | No | |
| skip_inbox | bool | No | |
| type | string | No |
RuleBuilderCondition
// RuleBuilderCondition array structure
[
'call_custom_property_params' => CallCustomPropertyParameters, //
'call_type_rule_params' => CallTypeRuleParameters, //
'call_violation_count_params' => CallViolationCountParameters, //
'closed_caption_rule_params' => ClosedCaptionRuleParameters, //
'confidence' => float, //
'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 | float | 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
// RuleBuilderConditionGroup array structure
[
'conditions' => array, //
'logic' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| conditions | array | No | |
| logic | string | No |
RuleBuilderConfig
// RuleBuilderConfig array structure
[
'async' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| rules | array | No |
RuleBuilderRule
// RuleBuilderRule array structure
[
'action' => RuleBuilderAction, //
'action_sequences' => array, //
'conditions' => array, //
'cooldown_period' => string, //
'groups' => array, //
'id' => string, //
'logic' => string, //
'rule_type' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rule_type | string | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | array | No | |
| conditions | array | No | |
| cooldown_period | string | No | |
| groups | array | No | |
| id | string | No | |
| logic | string | No |
ShadowBlockActionRequestPayload
Configuration for shadow block action
// ShadowBlockActionRequestPayload array structure
[
'reason' => string, // Reason for shadow blocking
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No | Reason for shadow blocking |
SharedLocation
// SharedLocation array structure
[
'created_by_device_id' => string, //
'end_at' => float, //
'latitude' => float, //
'longitude' => float, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | float | Yes | |
| longitude | float | Yes | |
| created_by_device_id | string | No | |
| end_at | float | No |
SortParamRequest
// SortParamRequest array structure
[
'direction' => int, // Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One of: -1, 1
'field' => string, // Name of field to sort by
'type' => string, // Type of field to sort by. Empty string or omitted means string type (default). One of: number, boolean
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | int | 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
// SubmitActionResponse array structure
[
'appeal_item' => AppealItemResponse, // Updated Appeal item after action was performed
'duration' => string, //
'item' => ReviewQueueItemResponse, // Updated review queue item after action was performed
]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
// TextContentParameters array structure
[
'blocklist_match' => array, //
'contains_url' => bool, //
'harm_labels' => array, //
'label_operator' => string, //
'llm_harm_labels' => array, //
'severity' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist_match | array | No | |
| contains_url | bool | No | |
| harm_labels | array | No | |
| label_operator | string | No | |
| llm_harm_labels | array | No | |
| severity | string | No |
TextRuleParameters
// TextRuleParameters array structure
[
'blocklist_match' => array, //
'contains_url' => bool, //
'harm_labels' => array, //
'llm_harm_labels' => array, //
'semantic_filter_min_threshold' => float, //
'semantic_filter_names' => array, //
'severity' => string, //
'threshold' => int, //
'time_window' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist_match | array | No | |
| contains_url | bool | No | |
| harm_labels | array | No | |
| llm_harm_labels | array | No | |
| semantic_filter_min_threshold | float | No | |
| semantic_filter_names | array | No | |
| severity | string | No | |
| threshold | int | No | |
| time_window | string | No |
TriggeredRuleResponse
// TriggeredRuleResponse array structure
[
'actions' => array, // Action types resolved from the rule's action sequence
'call_options' => CallActionOptions, // Options for call actions (mute settings, warning text, kick reason)
'rule_id' => string, // ID of the moderation rule that triggered
'rule_name' => string, // Name of the moderation rule that triggered
'violation_number' => int, // Violation count for action sequence rules (1-based)
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | array | 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 | int | No | Violation count for action sequence rules (1-based) |
UnbanActionRequestPayload
Configuration for unban moderation action
// UnbanActionRequestPayload array structure
[
'channel_cid' => string, // Channel CID for channel-specific unban
'decision_reason' => string, // Reason for the appeal decision
'remove_future_channels_ban' => bool, // Also remove the future channels ban for this user
]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 | bool | No | Also remove the future channels ban for this user |
UnbanResponse
// UnbanResponse array structure
[
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
UnblockActionRequestPayload
Configuration for unblock action
// UnblockActionRequestPayload array structure
[
'decision_reason' => string, // Reason for the appeal decision
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No | Reason for the appeal decision |
UnmuteResponse
// UnmuteResponse array structure
[
'duration' => string, //
'non_existing_users' => array, // A list of users that can't be found. Common cause for this is deleted users
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| non_existing_users | array | No | A list of users that can't be found. Common cause for this is deleted users |
UpsertConfigResponse
// UpsertConfigResponse array structure
[
'config' => ConfigResponse, // The created or updated moderation configuration
'duration' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The created or updated moderation configuration |
UpsertModerationRuleResponse
Basic response information
// UpsertModerationRuleResponse array structure
[
'duration' => string, // Duration of the request in milliseconds
'rule' => ModerationRuleV2Response, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| rule | ModerationRuleV2Response | No |
UpsertModerationTemplateResponse
// UpsertModerationTemplateResponse array structure
[
'config' => FeedsModerationTemplateConfigPayload, // Configuration for the moderation template
'created_at' => float, // When the template was created
'duration' => string, //
'name' => string, // Name of the moderation template
'updated_at' => float, // When the template was last updated
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the template was created |
| duration | string | Yes | |
| name | string | Yes | Name of the moderation template |
| updated_at | float | Yes | When the template was last updated |
| config | FeedsModerationTemplateConfigPayload | No | Configuration for the moderation template |
User
// User array structure
[
'data' => array, //
'id' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | array | No |
UserCreatedWithinParameters
// UserCreatedWithinParameters array structure
[
'max_age' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| max_age | string | No |
UserCustomPropertyParameters
// UserCustomPropertyParameters array structure
[
'operator' => string, //
'property_key' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| property_key | string | No |
UserIdenticalContentCountParameters
// UserIdenticalContentCountParameters array structure
[
'threshold' => int, //
'time_window' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No | |
| time_window | string | No |
UserMuteResponse
// UserMuteResponse array structure
[
'created_at' => float, //
'expires' => float, //
'target' => UserResponse, //
'updated_at' => float, //
'user' => UserResponse, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| updated_at | float | Yes | |
| expires | float | No | |
| target | UserResponse | No | |
| user | UserResponse | No |
UserRequest
User request object
// UserRequest array structure
[
'custom' => array, // Custom user data
'id' => string, // User ID
'image' => string, // User's profile image URL
'invisible' => bool, //
'language' => string, //
'name' => string, // Optional name of user
'privacy_settings' => PrivacySettingsResponse, //
'role' => string, // User's global role
'teams' => array, // List of teams the user belongs to
'teams_role' => array, // Map of team-specific roles for the user
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | array | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | bool | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | string | No | User's global role |
| teams | array | No | List of teams the user belongs to |
| teams_role | array | No | Map of team-specific roles for the user |
UserResponse
User response object
// UserResponse array structure
[
'avg_response_time' => int, //
'ban_expires' => float, // Date when ban expires
'banned' => bool, // Whether a user is banned or not
'blocked_user_ids' => array, //
'bypass_moderation' => bool, //
'created_at' => float, // Date/time of creation
'custom' => array, // Custom data for this object
'deactivated_at' => float, // Date of deactivation
'deleted_at' => float, // Date/time of deletion
'devices' => array, // List of devices user is using
'id' => string, // Unique user identifier
'image' => string, //
'invisible' => bool, //
'language' => string, // Preferred language of a user
'last_active' => float, // Date of last activity
'name' => string, // Optional name of user
'online' => bool, // Whether a user online or not
'privacy_settings' => PrivacySettingsResponse, // User privacy settings
'push_notifications' => PushNotificationSettingsResponse, // User push notification settings
'revoke_tokens_issued_before' => float, // Revocation date for tokens
'role' => string, // Determines the set of user permissions
'shadow_banned' => bool, // Whether a user is shadow banned
'teams' => array, // List of teams user is a part of
'teams_role' => array, //
'updated_at' => float, // Date/time of the last update
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | array | Yes | |
| created_at | float | Yes | Date/time of creation |
| custom | array | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | bool | Yes | |
| language | string | Yes | Preferred language of a user |
| online | bool | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | bool | Yes | Whether a user is shadow banned |
| teams | array | Yes | List of teams user is a part of |
| updated_at | float | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float | No | Date of deactivation |
| deleted_at | float | No | Date/time of deletion |
| devices | array | No | List of devices user is using |
| image | string | No | |
| last_active | float | 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 | float | No | Revocation date for tokens |
| teams_role | array | No |
UserRoleParameters
// UserRoleParameters array structure
[
'operator' => string, //
'role' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| role | string | No |
UserRuleParameters
// UserRuleParameters array structure
[
'max_age' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| max_age | string | No |
VelocityFilterConfig
// VelocityFilterConfig array structure
[
'advanced_filters' => bool, //
'async' => bool, //
'cascading_actions' => bool, //
'cids_per_user' => int, //
'enabled' => bool, //
'first_message_only' => bool, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | bool | No | |
| async | bool | No | |
| cascading_actions | bool | No | |
| cids_per_user | int | No | |
| enabled | bool | No | |
| first_message_only | bool | No | |
| rules | array | No |
VelocityFilterConfigRule
// VelocityFilterConfigRule array structure
[
'action' => string, //
'ban_duration' => int, //
'cascading_action' => string, //
'cascading_threshold' => int, //
'check_message_context' => bool, //
'fast_spam_threshold' => int, //
'fast_spam_ttl' => int, //
'ip_ban' => bool, //
'probation_period' => int, //
'shadow_ban' => bool, //
'slow_spam_ban_duration' => int, //
'slow_spam_threshold' => int, //
'slow_spam_ttl' => int, //
'url_only' => bool, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| ban_duration | int | No | |
| cascading_action | string | No | |
| cascading_threshold | int | No | |
| check_message_context | bool | No | |
| fast_spam_threshold | int | No | |
| fast_spam_ttl | int | No | |
| ip_ban | bool | No | |
| probation_period | int | No | |
| shadow_ban | bool | No | |
| slow_spam_ban_duration | int | No | |
| slow_spam_threshold | int | No | |
| slow_spam_ttl | int | No | |
| url_only | bool | No |
VideoCallRuleConfig
// VideoCallRuleConfig array structure
[
'flag_all_labels' => bool, //
'flagged_labels' => array, //
'rules' => array, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | bool | No | |
| flagged_labels | array | No | |
| rules | array | No |
VideoContentParameters
// VideoContentParameters array structure
[
'harm_labels' => array, //
'label_operator' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | array | No | |
| label_operator | string | No |
VideoRuleParameters
// VideoRuleParameters array structure
[
'harm_labels' => array, //
'threshold' => int, //
'time_window' => string, //
]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | array | No | |
| threshold | int | No | |
| time_window | string | No |