Appearance
Moderation
About 13947 wordsAbout 46 min
Go-Serverside SDK - Feeds API
Table of Contents
- InsertActionLog
- Appeal
- GetAppeal
- QueryAppeals
- Ban
- BulkImageModeration
- Bypass
- Check
- CheckS3Access
- UpsertConfig
- GetConfig
- DeleteConfig
- QueryModerationConfigs
- CustomCheck
- V2QueryTemplates
- V2UpsertTemplate
- V2DeleteTemplate
- Flag
- GetFlagCount
- QueryModerationFlags
- QueryModerationLogs
- UpsertModerationRule
- GetModerationRule
- DeleteModerationRule
- QueryModerationRules
- Mute
- QueryReviewQueue
- GetReviewQueueItem
- SubmitAction
- Unban
- Unmute
- Types Reference
InsertActionLog
Records a moderation action into the log, useful for tracking and auditing moderation activities performed on the platform.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Insert moderation action log
resp, err := feedsClient.InsertActionLog(context.Background(), &stream.InsertActionLogRequest{
ActionType: "value",
EntityCreatorID: "value",
EntityID: "value",
EntityType: "value",
Custom: map[string]any{},
Reason: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: InsertActionLogResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActionType | string | Yes | Type of moderation action taken |
| EntityCreatorID | string | Yes | ID of the user who created the entity |
| EntityID | string | Yes | ID of the entity the action was taken on |
| EntityType | string | Yes | Type of entity the action was taken on |
| Custom | map[string]any | No | Custom metadata for the action log |
| Reason | string | No | Reason for the action |
Appeal
Submit a request to review and potentially overturn a moderation decision; use this when you believe a moderation action was taken in error.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Appeal against the moderation decision
resp, err := feedsClient.Appeal(context.Background(), &stream.AppealRequest{
AppealReason: "value",
EntityID: "value",
EntityType: "value",
UserID: "john",
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with attachments
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Appeal against the moderation decision
resp, err := feedsClient.Appeal(context.Background(), &stream.AppealRequest{
AppealReason: "value",
EntityID: "value",
EntityType: "value",
Attachments: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AppealResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| AppealReason | string | Yes | Explanation for why the content is being appealed |
| EntityID | string | Yes | Unique identifier of the entity being appealed |
| EntityType | string | Yes | Type of entity being appealed (e.g., message, user) |
| Attachments | []string | No | Array of Attachment URLs(e.g., images) |
| User | UserRequest | No | - |
| UserID | string | No | - |
GetAppeal
Retrieve details about a specific appeal, allowing you to track the status and outcome of your request for review.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get appeal item
resp, err := feedsClient.GetAppeal(context.Background(), &stream.GetAppealRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetAppealResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
QueryAppeals
Search and filter through multiple appeals to manage and assess ongoing or past moderation challenges effectively.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query Appeals
resp, err := feedsClient.QueryAppeals(context.Background(), &stream.QueryAppealsRequest{
UserID: "john",
Limit: 25,
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query Appeals
resp, err := feedsClient.QueryAppeals(context.Background(), &stream.QueryAppealsRequest{
Sort: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query Appeals
resp, err := feedsClient.QueryAppeals(context.Background(), &stream.QueryAppealsRequest{
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryAppealsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | Filter conditions for appeals |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Sorting parameters for appeals |
| User | UserRequest | No | - |
| UserID | string | No | - |
Ban
Restrict a user from accessing services or content, useful when enforcing community guidelines and maintaining a safe environment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Ban
resp, err := feedsClient.Ban(context.Background(), &stream.BanRequest{
TargetUserID: "value",
BannedBy: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
BannedByID: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with channel_cid and delete_messages
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Ban
resp, err := feedsClient.Ban(context.Background(), &stream.BanRequest{
TargetUserID: "value",
ChannelCid: "value",
DeleteMessages: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with ip_ban and reason
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Ban
resp, err := feedsClient.Ban(context.Background(), &stream.BanRequest{
TargetUserID: "value",
IpBan: false,
Reason: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with shadow and timeout
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Ban
resp, err := feedsClient.Ban(context.Background(), &stream.BanRequest{
TargetUserID: "value",
Shadow: false,
Timeout: 10,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: BanResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| TargetUserID | string | Yes | ID of the user to ban |
| BannedBy | UserRequest | No | Details about the user performing the ban |
| BannedByID | string | No | ID of the user performing the ban |
| ChannelCid | string | No | Channel where the ban applies |
| DeleteMessages | string | No | - |
| IpBan | 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
Process multiple images simultaneously for content compliance, ideal for efficiently managing large batches of visual content.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Bulk image moderation
resp, err := feedsClient.BulkImageModeration(context.Background(), &stream.BulkImageModerationRequest{
CsvFile: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: BulkImageModerationResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| CsvFile | string | Yes | URL to CSV file containing image URLs to moderate |
Bypass
Allows a specific content or user to bypass moderation checks, typically used in scenarios where trusted entities need uninterrupted access.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Bypass Moderation
resp, err := feedsClient.Bypass(context.Background(), &stream.BypassRequest{
Enabled: false,
TargetUserID: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: BypassResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Enabled | bool | Yes | Whether to enable moderation bypass for this user |
| TargetUserID | string | Yes | ID of the user to update |
Check
Evaluate content against moderation policies to ensure compliance, used to verify that user-generated content adheres to community standards.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Check
resp, err := feedsClient.Check(context.Background(), &stream.CheckRequest{
EntityCreatorID: "value",
EntityID: "value",
EntityType: "value",
UserID: "john",
ConfigKey: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with config_team and content_published_at
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Check
resp, err := feedsClient.Check(context.Background(), &stream.CheckRequest{
EntityCreatorID: "value",
EntityID: "value",
EntityType: "value",
ConfigTeam: "value",
ContentPublishedAt: 10,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with moderation_payload and options
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Check
resp, err := feedsClient.Check(context.Background(), &stream.CheckRequest{
EntityCreatorID: "value",
EntityID: "value",
EntityType: "value",
ModerationPayload: stream.ModerationPayload{Custom: map[string]any{}},
Options: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with test_mode and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Check
resp, err := feedsClient.Check(context.Background(), &stream.CheckRequest{
EntityCreatorID: "value",
EntityID: "value",
EntityType: "value",
TestMode: false,
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CheckResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EntityCreatorID | string | Yes | ID of the user who created the entity |
| EntityID | string | Yes | Unique identifier of the entity to moderate |
| EntityType | string | Yes | Type of entity to moderate |
| Config | ModerationConfig | No | Custom moderation configuration (test mode only) |
| ConfigKey | string | No | Key of the moderation configuration to use |
| ConfigTeam | string | No | Team associated with the configuration |
| ContentPublishedAt | float | No | Original timestamp when the content was produced (for correlating flagged content with source vid... |
| ModerationPayload | ModerationPayload | No | Content to be moderated |
| Options | map[string]any | No | Additional moderation configuration options |
| TestMode | bool | No | Whether to run moderation in test mode |
| User | UserRequest | No | - |
| UserID | string | No | - |
CheckS3Access
Verifies if an image stored in Amazon S3 is accessible, ensuring that media files are correctly permissioned and available for use.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Check S3 image access
resp, err := feedsClient.CheckS3Access(context.Background(), &stream.CheckS3AccessRequest{
S3URL: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CheckS3AccessResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| S3URL | string | No | Optional stream+s3:// reference to test access against |
UpsertConfig
Create or update rules for content moderation, enabling customization and refinement of moderation strategies to suit specific needs.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create or update moderation configuration
resp, err := feedsClient.UpsertConfig(context.Background(), &stream.UpsertConfigRequest{
Key: "value",
UserID: "john",
AiTextConfig: stream.AITextConfig{Async: false},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with ai_video_config and async
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create or update moderation configuration
resp, err := feedsClient.UpsertConfig(context.Background(), &stream.UpsertConfigRequest{
Key: "value",
AiVideoConfig: stream.AIVideoConfig{Async: false},
Async: false,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with automod_platform_circumvention_config and automod_semantic_filters_config
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create or update moderation configuration
resp, err := feedsClient.UpsertConfig(context.Background(), &stream.UpsertConfigRequest{
Key: "value",
AutomodPlatformCircumventionConfig: stream.AutomodPlatformCircumventionConfig{Async: false},
AutomodSemanticFiltersConfig: stream.AutomodSemanticFiltersConfig{Async: false},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with automod_toxicity_config and aws_rekognition_config
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Create or update moderation configuration
resp, err := feedsClient.UpsertConfig(context.Background(), &stream.UpsertConfigRequest{
Key: "value",
AutomodToxicityConfig: stream.AutomodToxicityConfig{Async: false},
AWSRekognitionConfig: stream.AIImageConfig{Async: false},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Key | string | Yes | Unique identifier for the moderation configuration |
| AiImageConfig | AIImageConfig | No | Configuration for AI image analysis |
| AiTextConfig | AITextConfig | No | Configuration for AI text analysis |
| AiVideoConfig | AIVideoConfig | No | Configuration for AI video analysis |
| Async | bool | No | Whether moderation should be performed asynchronously |
| AutomodPlatformCircumventionConfig | AutomodPlatformCircumventionConfig | No | Configuration for platform circumvention detection |
| AutomodSemanticFiltersConfig | AutomodSemanticFiltersConfig | No | Configuration for semantic filtering |
| AutomodToxicityConfig | AutomodToxicityConfig | No | Configuration for toxicity detection |
| AWSRekognitionConfig | AIImageConfig | No | - |
| BlockListConfig | BlockListConfig | No | Configuration for block list filtering |
| BodyguardConfig | AITextConfig | No | - |
| GoogleVisionConfig | GoogleVisionConfig | No | Configuration for Google Vision integration |
| LlmConfig | LLMConfig | No | Configuration for customer-configured LLM moderation |
| RuleBuilderConfig | 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 | - |
| UserID | string | No | Optional user ID to associate with the audit log entry |
| VelocityFilterConfig | VelocityFilterConfig | No | Configuration for velocity-based filtering |
| VideoCallRuleConfig | VideoCallRuleConfig | No | - |
GetConfig
Access the current configuration settings for moderation, allowing you to review and understand the active rules and policies.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get moderation configuration
resp, err := feedsClient.GetConfig(context.Background(), &stream.GetConfigRequest{
Key: "value",
Team: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Key | string | Yes | - |
| Team | string | No | - |
DeleteConfig
Remove an existing moderation policy, useful for retiring outdated rules or simplifying moderation strategies.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a moderation policy
resp, err := feedsClient.DeleteConfig(context.Background(), &stream.DeleteConfigRequest{
Key: "value",
UserID: "john",
Team: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteModerationConfigResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Key | string | Yes | - |
| Team | string | No | - |
| UserID | string | No | - |
QueryModerationConfigs
Search through various moderation configurations to compare, audit, or manage different policy setups efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation configurations
resp, err := feedsClient.QueryModerationConfigs(context.Background(), &stream.QueryModerationConfigsRequest{
UserID: "john",
Limit: 25,
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation configurations
resp, err := feedsClient.QueryModerationConfigs(context.Background(), &stream.QueryModerationConfigsRequest{
Sort: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation configurations
resp, err := feedsClient.QueryModerationConfigs(context.Background(), &stream.QueryModerationConfigsRequest{
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryModerationConfigsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | 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 | - |
| UserID | string | No | - |
CustomCheck
Performs a custom check on content to determine if it adheres to specific moderation criteria, useful for applying tailored moderation rules to unique content types.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Custom check endpoint
resp, err := feedsClient.CustomCheck(context.Background(), &stream.CustomCheckRequest{
EntityID: "value",
EntityType: "value",
Flags: nil,
UserID: "john",
ModerationPayload: stream.ModerationPayloadRequest{Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and entity_creator_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Custom check endpoint
resp, err := feedsClient.CustomCheck(context.Background(), &stream.CustomCheckRequest{
EntityID: "value",
EntityType: "value",
Flags: nil,
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
EntityCreatorID: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CustomCheckResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EntityID | string | Yes | Unique identifier of the entity |
| EntityType | string | Yes | Type of entity to perform custom check on |
| Flags | []CustomCheckFlag | Yes | List of custom check flags (1-10 flags required) |
| EntityCreatorID | string | No | ID of the user who created the entity (required for non-message entities) |
| ModerationPayload | ModerationPayloadRequest | No | Content to be checked (required for non-message entities) |
| User | UserRequest | No | - |
| UserID | string | No | - |
V2QueryTemplates
Retrieves a list of available moderation templates, helping users to understand and select predefined moderation criteria that can be applied to their content.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query feed moderation templates
resp, err := feedsClient.V2QueryTemplates(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryFeedModerationTemplatesResponse
V2UpsertTemplate
Creates or updates a moderation template, allowing users to define or modify the criteria used for evaluating content across feeds.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert feeds template
resp, err := feedsClient.V2UpsertTemplate(context.Background(), &stream.V2UpsertTemplateRequest{
Config: stream.FeedsModerationTemplateConfigPayload{DataTypes: map[string]any{}, ConfigKey: "value"},
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertModerationTemplateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Config | FeedsModerationTemplateConfigPayload | Yes | Configuration for the moderation template |
| Name | string | Yes | Name of the moderation template |
V2DeleteTemplate
Removes a specified moderation template, enabling users to manage and streamline the moderation criteria available for content evaluation.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete a moderation template
resp, err := feedsClient.V2DeleteTemplate(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteModerationTemplateResponse
Flag
Marks content for moderation review, allowing users to identify and address potentially inappropriate or harmful content within their feeds.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Flag content for moderation
resp, err := feedsClient.Flag(context.Background(), &stream.FlagRequest{
EntityID: "value",
EntityType: "value",
UserID: "john",
EntityCreatorID: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with moderation_payload and reason
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Flag content for moderation
resp, err := feedsClient.Flag(context.Background(), &stream.FlagRequest{
EntityID: "value",
EntityType: "value",
ModerationPayload: stream.ModerationPayload{Custom: map[string]any{}},
Reason: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Flag content for moderation
resp, err := feedsClient.Flag(context.Background(), &stream.FlagRequest{
EntityID: "value",
EntityType: "value",
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: FlagResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EntityID | string | Yes | Unique identifier of the entity being flagged |
| EntityType | string | Yes | Type of entity being flagged (e.g., message, user) |
| Custom | map[string]any | No | Additional metadata about the flag |
| EntityCreatorID | string | No | ID of the user who created the flagged entity |
| ModerationPayload | ModerationPayload | No | Content being flagged |
| Reason | string | No | Optional explanation for why the content is being flagged |
| User | UserRequest | No | - |
| UserID | string | No | - |
GetFlagCount
Retrieves the total number of flags raised against a user, enabling moderation teams to assess user behavior and identify potential issues.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get flag count for a user
resp, err := feedsClient.GetFlagCount(context.Background(), &stream.GetFlagCountRequest{
EntityCreatorID: "value",
EntityType: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetFlagCountResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EntityCreatorID | string | Yes | ID of the user whose content was flagged |
| EntityType | string | No | Optional entity type filter (e.g., stream:chat:v1:message, stream:user) |
QueryModerationFlags
Fetches a list of content that has been flagged for moderation, assisting users in monitoring and reviewing items that may breach community standards.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation flags
resp, err := feedsClient.QueryModerationFlags(context.Background(), &stream.QueryModerationFlagsRequest{
Limit: 25,
Filter: map[string]any{},
Sort: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation flags
resp, err := feedsClient.QueryModerationFlags(context.Background(), &stream.QueryModerationFlagsRequest{
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryModerationFlagsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | - |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | - |
QueryModerationLogs
Provides access to logs of moderation actions taken, offering users transparency and the ability to audit past moderation decisions and activities.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation action logs
resp, err := feedsClient.QueryModerationLogs(context.Background(), &stream.QueryModerationLogsRequest{
UserID: "john",
Limit: 25,
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation action logs
resp, err := feedsClient.QueryModerationLogs(context.Background(), &stream.QueryModerationLogsRequest{
Sort: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation action logs
resp, err := feedsClient.QueryModerationLogs(context.Background(), &stream.QueryModerationLogsRequest{
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryModerationLogsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | 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 | - |
| UserID | string | No | - |
UpsertModerationRule
Creates or updates a specific moderation rule, enabling users to customize the criteria used to assess and manage content within their platform.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert moderation rule
resp, err := feedsClient.UpsertModerationRule(context.Background(), &stream.UpsertModerationRuleRequest{
Name: "My Feed",
RuleType: "value",
UserID: "john",
ActionSequences: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with conditions and config_keys
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert moderation rule
resp, err := feedsClient.UpsertModerationRule(context.Background(), &stream.UpsertModerationRuleRequest{
Name: "My Feed",
RuleType: "value",
Conditions: nil,
ConfigKeys: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with cooldown_period and description
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert moderation rule
resp, err := feedsClient.UpsertModerationRule(context.Background(), &stream.UpsertModerationRuleRequest{
Name: "My Feed",
RuleType: "value",
CooldownPeriod: "value",
Description: "A description",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enabled and groups
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Upsert moderation rule
resp, err := feedsClient.UpsertModerationRule(context.Background(), &stream.UpsertModerationRuleRequest{
Name: "My Feed",
RuleType: "value",
Enabled: false,
Groups: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertModerationRuleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | Unique rule name |
| RuleType | string | Yes | Type of rule: user, content, or call |
| Action | RuleBuilderAction | No | Action for user/content rules |
| ActionSequences | []CallRuleActionSequence | No | Escalation sequences for call rules |
| Conditions | []RuleBuilderCondition | No | Flat list of conditions (legacy) |
| ConfigKeys | []string | No | List of config keys this rule applies to |
| CooldownPeriod | 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 | - |
| UserID | string | No | Optional user ID to associate with the audit log entry |
GetModerationRule
Retrieves details of a specified moderation rule, helping users to review and understand the criteria applied to content moderation processes.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get moderation rule
resp, err := feedsClient.GetModerationRule(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetModerationRuleResponse
DeleteModerationRule
Removes a specified moderation rule, allowing users to adjust and refine the moderation criteria in use by eliminating obsolete or unnecessary rules.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Delete moderation rule
resp, err := feedsClient.DeleteModerationRule(context.Background(), &stream.DeleteModerationRuleRequest{
UserID: "john",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteModerationRuleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | No | - |
QueryModerationRules
Retrieve the current set of moderation rules to understand the guidelines and criteria used for moderating content. Use this method to ensure compliance with moderation standards or to inform users of the rules.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation rules
resp, err := feedsClient.QueryModerationRules(context.Background(), &stream.QueryModerationRulesRequest{
UserID: "john",
Limit: 25,
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation rules
resp, err := feedsClient.QueryModerationRules(context.Background(), &stream.QueryModerationRulesRequest{
Sort: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query moderation rules
resp, err := feedsClient.QueryModerationRules(context.Background(), &stream.QueryModerationRulesRequest{
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryModerationRulesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | 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 | - |
| UserID | string | No | - |
Mute
Temporarily silence a user to prevent them from posting or interacting on the platform for a specific duration. Utilize this method to manage disruptive behavior without permanently banning the user.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Mute
resp, err := feedsClient.Mute(context.Background(), &stream.MuteRequest{
TargetIds: nil,
UserID: "john",
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with timeout
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Mute
resp, err := feedsClient.Mute(context.Background(), &stream.MuteRequest{
TargetIds: nil,
Timeout: 10,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: MuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| TargetIds | []string | Yes | User IDs to mute (if multiple users) |
| Timeout | int | No | Duration of mute in minutes |
| User | UserRequest | No | - |
| UserID | string | No | - |
QueryReviewQueue
Access a list of content items pending review to manage and prioritize moderation tasks efficiently. Use this method to streamline the review process and address potential issues in a timely manner.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query review queue items
resp, err := feedsClient.QueryReviewQueue(context.Background(), &stream.QueryReviewQueueRequest{
UserID: "john",
Limit: 25,
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and lock_items
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query review queue items
resp, err := feedsClient.QueryReviewQueue(context.Background(), &stream.QueryReviewQueueRequest{
Sort: nil,
LockItems: false,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query review queue items
resp, err := feedsClient.QueryReviewQueue(context.Background(), &stream.QueryReviewQueueRequest{
Next: nil,
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with lock_count and stats_only
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Query review queue items
resp, err := feedsClient.QueryReviewQueue(context.Background(), &stream.QueryReviewQueueRequest{
LockCount: 10,
StatsOnly: false,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryReviewQueueResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filter | map[string]any | No | Filter conditions for review queue items |
| Limit | int | No | - |
| LockCount | int | No | Number of items to lock (1-25) |
| LockDuration | int | No | Duration for which items should be locked |
| LockItems | 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 |
| StatsOnly | bool | No | Whether to return only statistics |
| User | UserRequest | No | - |
| UserID | string | No | - |
GetReviewQueueItem
Retrieve detailed information about a specific item in the review queue to make informed moderation decisions. Employ this method when you need to assess an individual piece of content thoroughly.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Get review queue item
resp, err := feedsClient.GetReviewQueueItem(context.Background(), &stream.GetReviewQueueItemRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetReviewQueueItemResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
SubmitAction
Execute a moderation action, such as approving or rejecting content, based on the review outcome. Use this method to enforce moderation decisions and maintain community standards.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Submit moderation action
resp, err := feedsClient.SubmitAction(context.Background(), &stream.SubmitActionRequest{
ActionType: "value",
UserID: "john",
Ban: stream.BanActionRequestPayload{BanFromFutureChannels: false},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with block and bypass
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Submit moderation action
resp, err := feedsClient.SubmitAction(context.Background(), &stream.SubmitActionRequest{
ActionType: "value",
Block: stream.BlockActionRequestPayload{Reason: "value"},
Bypass: stream.BypassActionRequest{Enabled: false},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with custom and delete_activity
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Submit moderation action
resp, err := feedsClient.SubmitAction(context.Background(), &stream.SubmitActionRequest{
ActionType: "value",
Custom: stream.CustomActionRequestPayload{ID: "activity-123"},
DeleteActivity: stream.DeleteActivityRequestPayload{EntityID: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with delete_comment and delete_message
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Submit moderation action
resp, err := feedsClient.SubmitAction(context.Background(), &stream.SubmitActionRequest{
ActionType: "value",
DeleteComment: stream.DeleteCommentRequestPayload{EntityID: "value"},
DeleteMessage: stream.DeleteMessageRequestPayload{EntityID: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: SubmitActionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActionType | string | Yes | Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, del... |
| AppealID | 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 |
| DeleteActivity | DeleteActivityRequestPayload | No | Configuration for activity deletion action |
| DeleteComment | DeleteCommentRequestPayload | No | Configuration for comment deletion action |
| DeleteMessage | DeleteMessageRequestPayload | No | Configuration for message deletion action |
| DeleteReaction | DeleteReactionRequestPayload | No | Configuration for reaction deletion action |
| DeleteUser | DeleteUserRequestPayload | No | Configuration for user deletion action |
| Escalate | EscalatePayload | No | Configuration for escalation action |
| Flag | FlagRequest | No | Configuration for flag action |
| ItemID | string | No | UUID of the review queue item to act on |
| MarkReviewed | MarkReviewedRequestPayload | No | Configuration for marking item as reviewed |
| RejectAppeal | RejectAppealRequestPayload | No | Configuration for rejecting an appeal |
| Restore | RestoreActionRequestPayload | No | Configuration for restore action |
| ShadowBlock | ShadowBlockActionRequestPayload | No | Configuration for shadow block action |
| Unban | UnbanActionRequestPayload | No | Configuration for unban action |
| Unblock | UnblockActionRequestPayload | No | Configuration for unblock action |
| User | UserRequest | No | - |
| UserID | string | No | - |
Unban
Lift a ban on a user, restoring their ability to interact with the platform. Use this method to reinstate a previously banned user after determining that the ban is no longer necessary.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unban
resp, err := feedsClient.Unban(context.Background(), &stream.UnbanRequest{
TargetUserID: "value",
ChannelCid: "value",
CreatedBy: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with unbanned_by and unbanned_by_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unban
resp, err := feedsClient.Unban(context.Background(), &stream.UnbanRequest{
TargetUserID: "value",
UnbannedBy: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
UnbannedByID: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnbanResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| TargetUserID | string | Yes | - |
| ChannelCid | string | No | - |
| CreatedBy | string | No | - |
| UnbannedBy | UserRequest | No | Details about the user performing the unban |
| UnbannedByID | string | No | ID of the user performing the unban |
Unmute
Remove a mute restriction from a user, allowing them to resume posting and interacting on the platform. Use this method to restore communication privileges to a user after a mute period has ended or is deemed unnecessary.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
feedsClient := client.Feeds()
// Unmute a user
resp, err := feedsClient.Unmute(context.Background(), &stream.UnmuteRequest{
TargetIds: nil,
UserID: "john",
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnmuteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| TargetIds | []string | Yes | User IDs to unmute |
| User | UserRequest | No | - |
| UserID | string | No | - |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AIImageConfig
type AIImageConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
OcrRules []OCRRule `json:"ocr_rules,omitempty"`
Rules []AWSRekognitionRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| ocr_rules | []OCRRule | No | |
| rules | []AWSRekognitionRule | No |
AIImageLabelDefinition
type AIImageLabelDefinition struct {
Description string `json:"description,omitempty"`
Group string `json:"group,omitempty"`
Key string `json:"key,omitempty"`
Label string `json:"label,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | |
| group | string | Yes | |
| key | string | Yes | |
| label | string | Yes |
AITextConfig
type AITextConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Profile string `json:"profile,omitempty"`
Rules []BodyguardRule `json:"rules,omitempty"`
SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| profile | string | No | |
| rules | []BodyguardRule | No | |
| severity_rules | []BodyguardSeverityRule | No |
AIVideoConfig
type AIVideoConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AWSRekognitionRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AWSRekognitionRule | No |
AWSRekognitionRule
type AWSRekognitionRule struct {
Action string `json:"action,omitempty"`
Label string `json:"label,omitempty"`
MinConfidence float64 `json:"min_confidence,omitempty"`
Subclassifications map[string]interface{} `json:"subclassifications,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| label | string | Yes | |
| min_confidence | float64 | Yes | |
| subclassifications | map[string]interface{} | No |
Action
type Action struct {
Name string `json:"name,omitempty"`
Style string `json:"style,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
Value string `json:"value,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| style | string | No | |
| value | string | No |
ActionLogResponse
type ActionLogResponse struct {
AiProviders []string `json:"ai_providers,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Reason string `json:"reason,omitempty"`
ReviewQueueItem ReviewQueueItemResponse `json:"review_queue_item,omitempty"`
TargetUser UserResponse `json:"target_user,omitempty"`
TargetUserId string `json:"target_user_id,omitempty"`
Type string `json:"type,omitempty"`
User UserResponse `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_providers | []string | Yes | |
| created_at | float64 | Yes | Timestamp when the action was taken |
| custom | map[string]interface{} | 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
type ActionSequence struct {
Action string `json:"action,omitempty"`
Blur bool `json:"blur,omitempty"`
CooldownPeriod int `json:"cooldown_period,omitempty"`
Threshold int `json:"threshold,omitempty"`
TimeWindow int `json:"time_window,omitempty"`
Warning bool `json:"warning,omitempty"`
WarningText string `json:"warning_text,omitempty"`
}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 |
ActivityRequest
type ActivityRequest struct {
Attachments []Attachment `json:"attachments,omitempty"`
CollectionRefs []string `json:"collection_refs,omitempty"`
CopyCustomToNotification bool `json:"copy_custom_to_notification,omitempty"`
CreateNotificationActivity bool `json:"create_notification_activity,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
Feeds []string `json:"feeds,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
Id string `json:"id,omitempty"`
InterestTags []string `json:"interest_tags,omitempty"`
Location Location `json:"location,omitempty"`
MentionedUserIds []string `json:"mentioned_user_ids,omitempty"`
ParentId string `json:"parent_id,omitempty"`
PollId string `json:"poll_id,omitempty"`
RestrictReplies string `json:"restrict_replies,omitempty"`
SearchData map[string]interface{} `json:"search_data,omitempty"`
SkipEnrichUrl bool `json:"skip_enrich_url,omitempty"`
SkipPush bool `json:"skip_push,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
UserId string `json:"user_id,omitempty"`
Visibility string `json:"visibility,omitempty"`
VisibilityTag string `json:"visibility_tag,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | string | Yes | Type of activity |
| attachments | []Attachment | No | List of attachments for the activity |
| collection_refs | []string | No | Collections that this activity references |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | bool | No | Whether to create notification activities for mentioned users |
| custom | map[string]interface{} | No | Custom data for the activity |
| expires_at | string | No | Expiration time for the activity |
| filter_tags | []string | No | Tags for filtering activities |
| id | string | No | Optional ID for the activity |
| interest_tags | []string | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | []string | No | List of users mentioned in the activity |
| parent_id | string | No | ID of parent activity for replies/comments |
| poll_id | string | No | ID of a poll to attach to activity |
| restrict_replies | string | No | Controls who can add comments/replies to this activity. One of: everyone, peo... |
| search_data | map[string]interface{} | No | Additional data for search indexing |
| skip_enrich_url | bool | No | Whether to skip URL enrichment for the activity |
| skip_push | bool | No | Whether to skip push notifications |
| text | string | No | Text content of the activity |
| user_id | string | No | ID of the user creating the activity |
| visibility | string | No | Visibility setting for the activity. One of: public, private, tag |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
AppealItemResponse
type AppealItemResponse struct {
AppealReason string `json:"appeal_reason,omitempty"`
Attachments []string `json:"attachments,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
DecisionReason string `json:"decision_reason,omitempty"`
EntityContent ModerationPayload `json:"entity_content,omitempty"`
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | string | Yes | Reason Text of the Appeal Item |
| created_at | float64 | 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 | float64 | Yes | When the flag was last updated |
| attachments | []string | No | Attachments(e.g. Images) of the Appeal Item |
| decision_reason | string | No | Decision Reason of the Appeal Item |
| entity_content | ModerationPayload | No | |
| user | UserResponse | No | Details of the user who created the appeal |
AppealRequest
type AppealRequest struct {
AppealReason string `json:"appeal_reason,omitempty"`
Attachments []string `json:"attachments,omitempty"`
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
User UserRequest `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | string | Yes | Explanation for why the content is being appealed |
| entity_id | string | Yes | Unique identifier of the entity being appealed |
| entity_type | string | Yes | Type of entity being appealed (e.g., message, user) |
| attachments | []string | No | Array of Attachment URLs(e.g., images) |
| user | UserRequest | No | |
| user_id | string | No |
AppealResponse
type AppealResponse struct {
AppealId string `json:"appeal_id,omitempty"`
Duration string `json:"duration,omitempty"`
}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.
type Attachment struct {
Actions []Action `json:"actions,omitempty"`
AssetUrl string `json:"asset_url,omitempty"`
AuthorIcon string `json:"author_icon,omitempty"`
AuthorLink string `json:"author_link,omitempty"`
AuthorName string `json:"author_name,omitempty"`
Color string `json:"color,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Fallback string `json:"fallback,omitempty"`
Fields []Field `json:"fields,omitempty"`
Footer string `json:"footer,omitempty"`
FooterIcon string `json:"footer_icon,omitempty"`
Giphy Images `json:"giphy,omitempty"`
ImageUrl string `json:"image_url,omitempty"`
OgScrapeUrl string `json:"og_scrape_url,omitempty"`
OriginalHeight int `json:"original_height,omitempty"`
OriginalWidth int `json:"original_width,omitempty"`
Pretext string `json:"pretext,omitempty"`
Text string `json:"text,omitempty"`
ThumbUrl string `json:"thumb_url,omitempty"`
Title string `json:"title,omitempty"`
TitleLink string `json:"title_link,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | Yes | |
| actions | []Action | No | |
| asset_url | string | No | |
| author_icon | string | No | |
| author_link | string | No | |
| author_name | string | No | |
| color | string | No | |
| fallback | string | No | |
| fields | []Field | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | |
| og_scrape_url | string | No | |
| original_height | 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
type AutomodPlatformCircumventionConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AutomodRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AutomodRule | No |
AutomodRule
type AutomodRule struct {
Action string `json:"action,omitempty"`
Label string `json:"label,omitempty"`
Threshold float64 `json:"threshold,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| label | string | Yes | |
| threshold | float64 | Yes |
AutomodSemanticFiltersConfig
type AutomodSemanticFiltersConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AutomodSemanticFiltersRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AutomodSemanticFiltersRule | No |
AutomodSemanticFiltersRule
type AutomodSemanticFiltersRule struct {
Action string `json:"action,omitempty"`
Name string `json:"name,omitempty"`
Threshold float64 `json:"threshold,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| name | string | Yes | |
| threshold | float64 | Yes |
AutomodToxicityConfig
type AutomodToxicityConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AutomodRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AutomodRule | No |
BanActionRequestPayload
Configuration for ban moderation action
type BanActionRequestPayload struct {
BanFromFutureChannels bool `json:"ban_from_future_channels,omitempty"`
ChannelBanOnly bool `json:"channel_ban_only,omitempty"`
ChannelCid string `json:"channel_cid,omitempty"`
DeleteMessages string `json:"delete_messages,omitempty"`
IpBan bool `json:"ip_ban,omitempty"`
Reason string `json:"reason,omitempty"`
Shadow bool `json:"shadow,omitempty"`
TargetUserId string `json:"target_user_id,omitempty"`
Timeout int `json:"timeout,omitempty"`
}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
type BanOptions struct {
DeleteMessages string `json:"delete_messages,omitempty"`
Duration int `json:"duration,omitempty"`
IpBan bool `json:"ip_ban,omitempty"`
Reason string `json:"reason,omitempty"`
ShadowBan bool `json:"shadow_ban,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delete_messages | string | No | |
| duration | int | No | |
| ip_ban | bool | No | |
| reason | string | No | |
| shadow_ban | bool | No |
BanResponse
type BanResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
BlockActionRequestPayload
Configuration for block action
type BlockActionRequestPayload struct {
Reason string `json:"reason,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No | Reason for blocking |
BlockListConfig
type BlockListConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
MatchSubstring bool `json:"match_substring,omitempty"`
Rules []BlockListRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| match_substring | bool | No | |
| rules | []BlockListRule | No |
BlockListRule
type BlockListRule struct {
Action string `json:"action,omitempty"`
Name string `json:"name,omitempty"`
Team string `json:"team,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| name | string | No | |
| team | string | No |
BodyguardImageAnalysisConfig
type BodyguardImageAnalysisConfig struct {
Rules []BodyguardRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | []BodyguardRule | No |
BodyguardRule
type BodyguardRule struct {
Action string `json:"action,omitempty"`
Label string `json:"label,omitempty"`
SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| label | string | Yes | |
| action | string | No | |
| severity_rules | []BodyguardSeverityRule | No |
BodyguardSeverityRule
type BodyguardSeverityRule struct {
Action string `json:"action,omitempty"`
Severity string `json:"severity,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| severity | string | Yes |
BulkImageModerationResponse
type BulkImageModerationResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | ID of the task for processing the bulk image moderation |
BypassActionRequest
type BypassActionRequest struct {
Enabled bool `json:"enabled,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
BypassResponse
type BypassResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
CallActionOptions
type CallActionOptions struct {
Duration int `json:"duration,omitempty"`
FlagReason string `json:"flag_reason,omitempty"`
KickReason string `json:"kick_reason,omitempty"`
MuteAudio bool `json:"mute_audio,omitempty"`
MuteVideo bool `json:"mute_video,omitempty"`
Reason string `json:"reason,omitempty"`
WarningText string `json:"warning_text,omitempty"`
}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
type CallCustomPropertyParameters struct {
Operator string `json:"operator,omitempty"`
PropertyKey string `json:"property_key,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| property_key | string | No |
CallRuleActionSequence
type CallRuleActionSequence struct {
Actions []string `json:"actions,omitempty"`
CallOptions CallActionOptions `json:"call_options,omitempty"`
ViolationNumber int `json:"violation_number,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | []string | No | |
| call_options | CallActionOptions | No | |
| violation_number | int | No |
CallTypeRuleParameters
type CallTypeRuleParameters struct {
CallType string `json:"call_type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_type | string | No |
CallViolationCountParameters
type CallViolationCountParameters struct {
Threshold int `json:"threshold,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No | |
| time_window | string | No |
CheckResponse
type CheckResponse struct {
Duration string `json:"duration,omitempty"`
Item ReviewQueueItemResponse `json:"item,omitempty"`
RecommendedAction string `json:"recommended_action,omitempty"`
Status string `json:"status,omitempty"`
TaskId string `json:"task_id,omitempty"`
TriggeredRule TriggeredRuleResponse `json:"triggered_rule,omitempty"`
}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
type CheckS3AccessResponse struct {
Duration string `json:"duration,omitempty"`
Message string `json:"message,omitempty"`
Success bool `json:"success,omitempty"`
}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
type ClosedCaptionRuleParameters struct {
HarmLabels []string `json:"harm_labels,omitempty"`
LlmHarmLabels map[string]interface{} `json:"llm_harm_labels,omitempty"`
Threshold int `json:"threshold,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | []string | No | |
| llm_harm_labels | map[string]interface{} | No | |
| threshold | int | No |
ConfigResponse
type ConfigResponse struct {
AiImageConfig AIImageConfig `json:"ai_image_config,omitempty"`
AiImageLabelDefinitions []AIImageLabelDefinition `json:"ai_image_label_definitions,omitempty"`
AiImageSubclassifications map[string]interface{} `json:"ai_image_subclassifications,omitempty"`
AiTextConfig AITextConfig `json:"ai_text_config,omitempty"`
AiVideoConfig AIVideoConfig `json:"ai_video_config,omitempty"`
Async bool `json:"async,omitempty"`
AutomodPlatformCircumventionConfig AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config,omitempty"`
AutomodSemanticFiltersConfig AutomodSemanticFiltersConfig `json:"automod_semantic_filters_config,omitempty"`
AutomodToxicityConfig AutomodToxicityConfig `json:"automod_toxicity_config,omitempty"`
BlockListConfig BlockListConfig `json:"block_list_config,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Key string `json:"key,omitempty"`
LlmConfig LLMConfig `json:"llm_config,omitempty"`
SupportedVideoCallHarmTypes []string `json:"supported_video_call_harm_types,omitempty"`
Team string `json:"team,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
VelocityFilterConfig VelocityFilterConfig `json:"velocity_filter_config,omitempty"`
VideoCallRuleConfig VideoCallRuleConfig `json:"video_call_rule_config,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | Yes | Whether moderation should be performed asynchronously |
| created_at | float64 | Yes | When the configuration was created |
| key | string | Yes | Unique identifier for the moderation configuration |
| supported_video_call_harm_types | []string | Yes | |
| team | string | Yes | Team associated with the configuration |
| updated_at | float64 | Yes | When the configuration was last updated |
| ai_image_config | AIImageConfig | No | Configuration for AI image analysis |
| ai_image_label_definitions | []AIImageLabelDefinition | No | Configurable image moderation label definitions for dashboard rendering |
| ai_image_subclassifications | map[string]interface{} | 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
type ContentCountRuleParameters struct {
Threshold int `json:"threshold,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No | |
| time_window | string | No |
CustomActionRequestPayload
Configuration for custom moderation action
type CustomActionRequestPayload struct {
Id string `json:"id,omitempty"`
Options map[string]interface{} `json:"options,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | No | Custom action identifier |
| options | map[string]interface{} | No | Custom action options |
CustomCheckFlag
type CustomCheckFlag struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Labels []string `json:"labels,omitempty"`
Reason string `json:"reason,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of check (custom_check_text, custom_check_image, custom_check_video) |
| custom | map[string]interface{} | No | Additional metadata for the flag |
| labels | []string | No | Labels from various moderation sources |
| reason | string | No | Optional explanation for the flag |
CustomCheckResponse
type CustomCheckResponse struct {
Duration string `json:"duration,omitempty"`
Id string `json:"id,omitempty"`
Item ReviewQueueItemResponse `json:"item,omitempty"`
Status string `json:"status,omitempty"`
}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
type DeleteActivityRequestPayload struct {
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
HardDelete bool `json:"hard_delete,omitempty"`
Reason string `json:"reason,omitempty"`
}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
type DeleteCommentRequestPayload struct {
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
HardDelete bool `json:"hard_delete,omitempty"`
Reason string `json:"reason,omitempty"`
}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
type DeleteMessageRequestPayload struct {
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
HardDelete bool `json:"hard_delete,omitempty"`
Reason string `json:"reason,omitempty"`
}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
type DeleteModerationConfigResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteModerationRuleResponse
Basic response information
type DeleteModerationRuleResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteModerationTemplateResponse
type DeleteModerationTemplateResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteReactionRequestPayload
Configuration for reaction deletion action
type DeleteReactionRequestPayload struct {
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
HardDelete bool `json:"hard_delete,omitempty"`
Reason string `json:"reason,omitempty"`
}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
type DeleteUserRequestPayload struct {
DeleteConversationChannels bool `json:"delete_conversation_channels,omitempty"`
DeleteFeedsContent bool `json:"delete_feeds_content,omitempty"`
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
HardDelete bool `json:"hard_delete,omitempty"`
MarkMessagesDeleted bool `json:"mark_messages_deleted,omitempty"`
Reason string `json:"reason,omitempty"`
}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
type EscalatePayload struct {
Notes string `json:"notes,omitempty"`
Priority string `json:"priority,omitempty"`
Reason string `json:"reason,omitempty"`
}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
type FeedsModerationTemplateConfigPayload struct {
ConfigKey string `json:"config_key,omitempty"`
DataTypes map[string]interface{} `json:"data_types,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| data_types | map[string]interface{} | Yes | Map of data type names to their content types |
| config_key | string | No | Key of the moderation configuration to use |
Field
type Field struct {
Short bool `json:"short,omitempty"`
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | string | Yes | |
| value | string | Yes |
FilterConfigResponse
type FilterConfigResponse struct {
AiTextLabels []string `json:"ai_text_labels,omitempty"`
ConfigKeys []string `json:"config_keys,omitempty"`
LlmLabels []string `json:"llm_labels,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| llm_labels | []string | Yes | |
| ai_text_labels | []string | No | |
| config_keys | []string | No |
FlagCountRuleParameters
type FlagCountRuleParameters struct {
Threshold int `json:"threshold,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No |
FlagRequest
type FlagRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
EntityCreatorId string `json:"entity_creator_id,omitempty"`
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
ModerationPayload ModerationPayload `json:"moderation_payload,omitempty"`
Reason string `json:"reason,omitempty"`
User UserRequest `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}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 | map[string]interface{} | 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
type FlagResponse struct {
Duration string `json:"duration,omitempty"`
ItemId string `json:"item_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item_id | string | Yes | Unique identifier of the created moderation item |
FlagUserOptions
type FlagUserOptions struct {
Reason string `json:"reason,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No |
GetAppealResponse
type GetAppealResponse struct {
Duration string `json:"duration,omitempty"`
Item AppealItemResponse `json:"item,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item | AppealItemResponse | No | Current state of the appeal |
GetConfigResponse
type GetConfigResponse struct {
Config ConfigResponse `json:"config,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The retrieved moderation configuration |
GetFlagCountResponse
type GetFlagCountResponse struct {
Count int `json:"count,omitempty"`
Duration string `json:"duration,omitempty"`
}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
type GetModerationRuleResponse struct {
Duration string `json:"duration,omitempty"`
Rule ModerationRuleV2Response `json:"rule,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| rule | ModerationRuleV2Response | No |
GetReviewQueueItemResponse
type GetReviewQueueItemResponse struct {
Duration string `json:"duration,omitempty"`
Item ReviewQueueItemResponse `json:"item,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| item | ReviewQueueItemResponse | No | Current state of the review queue item |
GoogleVisionConfig
type GoogleVisionConfig struct {
Enabled bool `json:"enabled,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
HarmConfig
type HarmConfig struct {
ActionSequences []ActionSequence `json:"action_sequences,omitempty"`
CooldownPeriod int `json:"cooldown_period,omitempty"`
HarmTypes []string `json:"harm_types,omitempty"`
Severity int `json:"severity,omitempty"`
Threshold int `json:"threshold,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_sequences | []ActionSequence | No | |
| cooldown_period | int | No | |
| harm_types | []string | No | |
| severity | int | No | |
| threshold | int | No |
ImageContentParameters
type ImageContentParameters struct {
HarmLabels []string `json:"harm_labels,omitempty"`
LabelOperator string `json:"label_operator,omitempty"`
MinConfidence float64 `json:"min_confidence,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | []string | No | |
| label_operator | string | No | |
| min_confidence | float64 | No |
ImageRuleParameters
type ImageRuleParameters struct {
HarmLabels []string `json:"harm_labels,omitempty"`
MinConfidence float64 `json:"min_confidence,omitempty"`
Threshold int `json:"threshold,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | []string | No | |
| min_confidence | float64 | No | |
| threshold | int | No | |
| time_window | string | No |
Images
type Images struct {
FixedHeight ImageData `json:"fixed_height,omitempty"`
FixedHeightDownsampled ImageData `json:"fixed_height_downsampled,omitempty"`
FixedHeightStill ImageData `json:"fixed_height_still,omitempty"`
FixedWidth ImageData `json:"fixed_width,omitempty"`
FixedWidthDownsampled ImageData `json:"fixed_width_downsampled,omitempty"`
FixedWidthStill ImageData `json:"fixed_width_still,omitempty"`
Original ImageData `json:"original,omitempty"`
}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
type InsertActionLogResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
KeyframeRuleParameters
type KeyframeRuleParameters struct {
HarmLabels []string `json:"harm_labels,omitempty"`
MinConfidence float64 `json:"min_confidence,omitempty"`
Threshold int `json:"threshold,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | []string | No | |
| min_confidence | float64 | No | |
| threshold | int | No |
LLMConfig
type LLMConfig struct {
AppContext string `json:"app_context,omitempty"`
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []LLMRule `json:"rules,omitempty"`
SeverityDescriptions map[string]interface{} `json:"severity_descriptions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | string | No | |
| async | bool | No | |
| enabled | bool | No | |
| rules | []LLMRule | No | |
| severity_descriptions | map[string]interface{} | No |
LLMRule
type LLMRule struct {
Action string `json:"action,omitempty"`
Description string `json:"description,omitempty"`
Label string `json:"label,omitempty"`
SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | |
| label | string | Yes | |
| action | string | No | |
| severity_rules | []BodyguardSeverityRule | No |
Location
type Location struct {
Lat float64 `json:"lat,omitempty"`
Lng float64 `json:"lng,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | float64 | Yes | Latitude coordinate |
| lng | float64 | Yes | Longitude coordinate |
MarkReviewedRequestPayload
Configuration for mark reviewed action
type MarkReviewedRequestPayload struct {
ContentToMarkAsReviewedLimit int `json:"content_to_mark_as_reviewed_limit,omitempty"`
DecisionReason string `json:"decision_reason,omitempty"`
DisableMarkingContentAsReviewed bool `json:"disable_marking_content_as_reviewed,omitempty"`
}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 |
ModerationConfig
type ModerationConfig struct {
AiImageConfig AIImageConfig `json:"ai_image_config,omitempty"`
AiImageLiteConfig BodyguardImageAnalysisConfig `json:"ai_image_lite_config,omitempty"`
AiTextConfig AITextConfig `json:"ai_text_config,omitempty"`
AiVideoConfig AIVideoConfig `json:"ai_video_config,omitempty"`
Async bool `json:"async,omitempty"`
AutomodPlatformCircumventionConfig AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config,omitempty"`
AutomodSemanticFiltersConfig AutomodSemanticFiltersConfig `json:"automod_semantic_filters_config,omitempty"`
AutomodToxicityConfig AutomodToxicityConfig `json:"automod_toxicity_config,omitempty"`
BlockListConfig BlockListConfig `json:"block_list_config,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
GoogleVisionConfig GoogleVisionConfig `json:"google_vision_config,omitempty"`
Key string `json:"key,omitempty"`
LlmConfig LLMConfig `json:"llm_config,omitempty"`
SupportedVideoCallHarmTypes []string `json:"supported_video_call_harm_types,omitempty"`
Team string `json:"team,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
VelocityFilterConfig VelocityFilterConfig `json:"velocity_filter_config,omitempty"`
VideoCallRuleConfig VideoCallRuleConfig `json:"video_call_rule_config,omitempty"`
}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 | float64 | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | string | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | []string | No | |
| team | string | No | |
| updated_at | float64 | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationFlagResponse
type ModerationFlagResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
EntityCreatorId string `json:"entity_creator_id,omitempty"`
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
Labels []string `json:"labels,omitempty"`
ModerationPayload ModerationPayloadResponse `json:"moderation_payload,omitempty"`
Reason string `json:"reason,omitempty"`
Result []map[string]interface{} `json:"result,omitempty"`
ReviewQueueItem ReviewQueueItemResponse `json:"review_queue_item,omitempty"`
ReviewQueueItemId string `json:"review_queue_item_id,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| entity_id | string | Yes | |
| entity_type | string | Yes | |
| result | []map[string]interface{} | Yes | |
| type | string | Yes | |
| updated_at | float64 | Yes | |
| user_id | string | Yes | |
| custom | map[string]interface{} | No | |
| entity_creator_id | string | No | |
| labels | []string | No | |
| moderation_payload | ModerationPayloadResponse | No | |
| reason | string | No | |
| review_queue_item | ReviewQueueItemResponse | No | |
| review_queue_item_id | string | No | |
| user | UserResponse | No |
ModerationPayload
type ModerationPayload struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Images []string `json:"images,omitempty"`
Texts []string `json:"texts,omitempty"`
Videos []string `json:"videos,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | No | |
| images | []string | No | |
| texts | []string | No | |
| videos | []string | No |
ModerationPayloadRequest
Content payload for moderation
type ModerationPayloadRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Images []string `json:"images,omitempty"`
Texts []string `json:"texts,omitempty"`
Videos []string `json:"videos,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | No | Custom data for moderation |
| images | []string | No | Image URLs to moderate (max 30) |
| texts | []string | No | Text content to moderate |
| videos | []string | No | Video URLs to moderate |
ModerationRuleV2Response
type ModerationRuleV2Response struct {
Action RuleBuilderAction `json:"action,omitempty"`
ActionSequences []CallRuleActionSequence `json:"action_sequences,omitempty"`
Conditions []RuleBuilderCondition `json:"conditions,omitempty"`
ConfigKeys []string `json:"config_keys,omitempty"`
CooldownPeriod string `json:"cooldown_period,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Groups []RuleBuilderConditionGroup `json:"groups,omitempty"`
Id string `json:"id,omitempty"`
Logic string `json:"logic,omitempty"`
Name string `json:"name,omitempty"`
RuleType string `json:"rule_type,omitempty"`
Team string `json:"team,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| config_keys | []string | Yes | |
| created_at | float64 | Yes | |
| description | string | Yes | |
| enabled | bool | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| rule_type | string | Yes | |
| team | string | Yes | |
| updated_at | float64 | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | []CallRuleActionSequence | No | |
| conditions | []RuleBuilderCondition | No | |
| cooldown_period | string | No | |
| groups | []RuleBuilderConditionGroup | No | |
| logic | string | No |
MuteResponse
type MuteResponse struct {
Duration string `json:"duration,omitempty"`
Mutes []UserMuteResponse `json:"mutes,omitempty"`
NonExistingUsers []string `json:"non_existing_users,omitempty"`
OwnUser OwnUserResponse `json:"own_user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| mutes | []UserMuteResponse | No | Object with mutes (if multiple users were muted) |
| non_existing_users | []string | No | A list of users that can't be found. Common cause for this is deleted users |
| own_user | OwnUserResponse | No | Authorized user object with fresh mutes information |
OCRRule
type OCRRule struct {
Action string `json:"action,omitempty"`
Label string `json:"label,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | |
| label | string | Yes |
OwnUserResponse
type OwnUserResponse struct {
AvgResponseTime int `json:"avg_response_time,omitempty"`
Banned bool `json:"banned,omitempty"`
BlockedUserIds []string `json:"blocked_user_ids,omitempty"`
ChannelMutes []ChannelMute `json:"channel_mutes,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeactivatedAt float64 `json:"deactivated_at,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Devices []DeviceResponse `json:"devices,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
LastActive float64 `json:"last_active,omitempty"`
LatestHiddenChannels []string `json:"latest_hidden_channels,omitempty"`
Mutes []UserMuteResponse `json:"mutes,omitempty"`
Name string `json:"name,omitempty"`
Online bool `json:"online,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
PushPreferences PushPreferencesResponse `json:"push_preferences,omitempty"`
RevokeTokensIssuedBefore float64 `json:"revoke_tokens_issued_before,omitempty"`
Role string `json:"role,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
TotalUnreadCount int `json:"total_unread_count,omitempty"`
TotalUnreadCountByTeam map[string]interface{} `json:"total_unread_count_by_team,omitempty"`
UnreadChannels int `json:"unread_channels,omitempty"`
UnreadCount int `json:"unread_count,omitempty"`
UnreadThreads int `json:"unread_threads,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | |
| channel_mutes | []ChannelMute | Yes | |
| created_at | float64 | Yes | |
| custom | map[string]interface{} | Yes | |
| devices | []DeviceResponse | Yes | |
| id | string | Yes | |
| invisible | bool | Yes | |
| language | string | Yes | |
| mutes | []UserMuteResponse | Yes | |
| online | bool | Yes | |
| role | string | Yes | |
| teams | []string | Yes | |
| total_unread_count | int | Yes | |
| unread_channels | int | Yes | |
| unread_count | int | Yes | |
| unread_threads | int | Yes | |
| updated_at | float64 | Yes | |
| avg_response_time | int | No | |
| blocked_user_ids | []string | No | |
| deactivated_at | float64 | No | |
| deleted_at | float64 | No | |
| image | string | No | |
| last_active | float64 | No | |
| latest_hidden_channels | []string | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | float64 | No | |
| teams_role | map[string]interface{} | No | |
| total_unread_count_by_team | map[string]interface{} | No |
PagerRequest
type PagerRequest struct {
Limit int `json:"limit,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | int | No | |
| next | string | No | |
| prev | string | No |
PrivacySettingsResponse
type PrivacySettingsResponse struct {
DeliveryReceipts DeliveryReceiptsResponse `json:"delivery_receipts,omitempty"`
ReadReceipts ReadReceiptsResponse `json:"read_receipts,omitempty"`
TypingIndicators TypingIndicatorsResponse `json:"typing_indicators,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
QueryAppealsResponse
type QueryAppealsResponse struct {
Duration string `json:"duration,omitempty"`
Items []AppealItemResponse `json:"items,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| items | []AppealItemResponse | Yes | List of Appeal Items |
| next | string | No | |
| prev | string | No |
QueryFeedModerationTemplate
type QueryFeedModerationTemplate struct {
Config FeedsModerationTemplateConfigPayload `json:"config,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Name string `json:"name,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the template was created |
| name | string | Yes | Name of the moderation template |
| updated_at | float64 | Yes | When the template was last updated |
| config | FeedsModerationTemplateConfigPayload | No | Configuration for the moderation template |
QueryFeedModerationTemplatesResponse
type QueryFeedModerationTemplatesResponse struct {
Duration string `json:"duration,omitempty"`
Templates []QueryFeedModerationTemplate `json:"templates,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| templates | []QueryFeedModerationTemplate | Yes | List of moderation templates |
QueryModerationConfigsResponse
type QueryModerationConfigsResponse struct {
Configs []ConfigResponse `json:"configs,omitempty"`
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| configs | []ConfigResponse | Yes | List of moderation configurations |
| duration | string | Yes | |
| next | string | No | |
| prev | string | No |
QueryModerationFlagsResponse
Basic response information
type QueryModerationFlagsResponse struct {
Duration string `json:"duration,omitempty"`
Flags []ModerationFlagResponse `json:"flags,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| flags | []ModerationFlagResponse | Yes | |
| next | string | No | |
| prev | string | No |
QueryModerationLogsResponse
type QueryModerationLogsResponse struct {
Duration string `json:"duration,omitempty"`
Logs []ActionLogResponse `json:"logs,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| logs | []ActionLogResponse | Yes | List of moderation action logs |
| next | string | No | |
| prev | string | No |
QueryModerationRulesResponse
type QueryModerationRulesResponse struct {
AiImageLabelDefinitions []AIImageLabelDefinition `json:"ai_image_label_definitions,omitempty"`
AiImageSubclassifications map[string]interface{} `json:"ai_image_subclassifications,omitempty"`
ClosedCaptionLabels []string `json:"closed_caption_labels,omitempty"`
DefaultLlmLabels map[string]interface{} `json:"default_llm_labels,omitempty"`
Duration string `json:"duration,omitempty"`
KeyframeLabelClassifications map[string]interface{} `json:"keyframe_label_classifications,omitempty"`
KeyframeLabels []string `json:"keyframe_labels,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Rules []ModerationRuleV2Response `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_label_definitions | []AIImageLabelDefinition | Yes | AI image label definitions with metadata for dashboard rendering |
| ai_image_subclassifications | map[string]interface{} | Yes | Stream L1 to leaf-level label name mapping for AI image rules |
| closed_caption_labels | []string | Yes | Available harm labels for closed caption rules |
| default_llm_labels | map[string]interface{} | Yes | Default LLM label descriptions |
| duration | string | Yes | |
| keyframe_label_classifications | map[string]interface{} | Yes | L1 to L2 mapping of keyframe harm label classifications |
| keyframe_labels | []string | Yes | Deprecated: use keyframe_label_classifications instead. Available L1 harm lab... |
| rules | []ModerationRuleV2Response | Yes | List of moderation rules |
| next | string | No | |
| prev | string | No |
QueryReviewQueueResponse
type QueryReviewQueueResponse struct {
ActionConfig map[string]interface{} `json:"action_config,omitempty"`
Duration string `json:"duration,omitempty"`
FilterConfig FilterConfigResponse `json:"filter_config,omitempty"`
Items []ReviewQueueItemResponse `json:"items,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Stats map[string]interface{} `json:"stats,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_config | map[string]interface{} | Yes | Configuration for moderation actions |
| duration | string | Yes | |
| items | []ReviewQueueItemResponse | Yes | List of review queue items |
| stats | map[string]interface{} | Yes | Statistics about the review queue |
| filter_config | FilterConfigResponse | No | Configuration for filters in moderation review queue |
| next | string | No | |
| prev | string | No |
Reaction
type Reaction struct {
ActivityId string `json:"activity_id,omitempty"`
ChildrenCounts map[string]interface{} `json:"children_counts,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Id string `json:"id,omitempty"`
Kind string `json:"kind,omitempty"`
LatestChildren map[string]interface{} `json:"latest_children,omitempty"`
Moderation map[string]interface{} `json:"moderation,omitempty"`
OwnChildren map[string]interface{} `json:"own_children,omitempty"`
Parent string `json:"parent,omitempty"`
Score float64 `json:"score,omitempty"`
TargetFeeds []string `json:"target_feeds,omitempty"`
TargetFeedsExtraData map[string]interface{} `json:"target_feeds_extra_data,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User User `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | float64 | Yes | |
| kind | string | Yes | |
| updated_at | float64 | Yes | |
| user_id | string | Yes | |
| children_counts | map[string]interface{} | No | |
| data | map[string]interface{} | No | |
| deleted_at | float64 | No | |
| id | string | No | |
| latest_children | map[string]interface{} | No | |
| moderation | map[string]interface{} | No | |
| own_children | map[string]interface{} | No | |
| parent | string | No | |
| score | float64 | No | |
| target_feeds | []string | No | |
| target_feeds_extra_data | map[string]interface{} | No | |
| user | User | No |
RejectAppealRequestPayload
Configuration for rejecting an appeal
type RejectAppealRequestPayload struct {
DecisionReason string `json:"decision_reason,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | Yes | Reason for rejecting the appeal |
RestoreActionRequestPayload
Configuration for restore action
type RestoreActionRequestPayload struct {
DecisionReason string `json:"decision_reason,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No | Reason for the appeal decision |
ReviewQueueItemResponse
type ReviewQueueItemResponse struct {
Actions []ActionLogResponse `json:"actions,omitempty"`
Activity EnrichedActivity `json:"activity,omitempty"`
AiTextSeverity string `json:"ai_text_severity,omitempty"`
Appeal AppealItemResponse `json:"appeal,omitempty"`
AssignedTo UserResponse `json:"assigned_to,omitempty"`
Bans []BanInfoResponse `json:"bans,omitempty"`
Call CallResponse `json:"call,omitempty"`
CompletedAt float64 `json:"completed_at,omitempty"`
ConfigKey string `json:"config_key,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
EntityCreator EntityCreatorResponse `json:"entity_creator,omitempty"`
EntityCreatorId string `json:"entity_creator_id,omitempty"`
EntityId string `json:"entity_id,omitempty"`
EntityType string `json:"entity_type,omitempty"`
Escalated bool `json:"escalated,omitempty"`
EscalatedAt float64 `json:"escalated_at,omitempty"`
EscalatedBy string `json:"escalated_by,omitempty"`
EscalationMetadata EscalationMetadata `json:"escalation_metadata,omitempty"`
FeedsV2Activity EnrichedActivity `json:"feeds_v2_activity,omitempty"`
FeedsV2Reaction Reaction `json:"feeds_v2_reaction,omitempty"`
FeedsV3Activity FeedsV3ActivityResponse `json:"feeds_v3_activity,omitempty"`
FeedsV3Comment FeedsV3CommentResponse `json:"feeds_v3_comment,omitempty"`
Flags []ModerationFlagResponse `json:"flags,omitempty"`
FlagsCount int `json:"flags_count,omitempty"`
Id string `json:"id,omitempty"`
Languages []string `json:"languages,omitempty"`
LatestModeratorAction string `json:"latest_moderator_action,omitempty"`
Message MessageResponse `json:"message,omitempty"`
ModerationPayload ModerationPayloadResponse `json:"moderation_payload,omitempty"`
Reaction Reaction `json:"reaction,omitempty"`
RecommendedAction string `json:"recommended_action,omitempty"`
ReviewedAt float64 `json:"reviewed_at,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
Severity int `json:"severity,omitempty"`
Status string `json:"status,omitempty"`
Teams []string `json:"teams,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | []ActionLogResponse | Yes | Moderation actions taken |
| ai_text_severity | string | Yes | AI-determined text severity |
| bans | []BanInfoResponse | Yes | Associated ban records |
| created_at | float64 | 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 | []ModerationFlagResponse | Yes | Associated flag records |
| flags_count | int | Yes | |
| id | string | Yes | Unique identifier of the review queue item |
| languages | []string | Yes | Detected languages in the content |
| latest_moderator_action | string | Yes | |
| recommended_action | string | Yes | Suggested moderation action |
| reviewed_by | string | Yes | ID of the moderator who reviewed the item |
| severity | int | Yes | Severity level of the content |
| status | string | Yes | Current status of the review |
| updated_at | float64 | 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 | float64 | 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 | float64 | 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 | float64 | No | When the item was reviewed |
| teams | []string | No | Teams associated with this item |
RuleBuilderAction
type RuleBuilderAction struct {
BanOptions BanOptions `json:"ban_options,omitempty"`
CallOptions CallActionOptions `json:"call_options,omitempty"`
FlagUserOptions FlagUserOptions `json:"flag_user_options,omitempty"`
SkipInbox bool `json:"skip_inbox,omitempty"`
Type string `json:"type,omitempty"`
}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
type RuleBuilderCondition struct {
CallCustomPropertyParams CallCustomPropertyParameters `json:"call_custom_property_params,omitempty"`
CallTypeRuleParams CallTypeRuleParameters `json:"call_type_rule_params,omitempty"`
CallViolationCountParams CallViolationCountParameters `json:"call_violation_count_params,omitempty"`
ClosedCaptionRuleParams ClosedCaptionRuleParameters `json:"closed_caption_rule_params,omitempty"`
Confidence float64 `json:"confidence,omitempty"`
ContentCountRuleParams ContentCountRuleParameters `json:"content_count_rule_params,omitempty"`
ContentFlagCountRuleParams FlagCountRuleParameters `json:"content_flag_count_rule_params,omitempty"`
ImageContentParams ImageContentParameters `json:"image_content_params,omitempty"`
ImageRuleParams ImageRuleParameters `json:"image_rule_params,omitempty"`
KeyframeRuleParams KeyframeRuleParameters `json:"keyframe_rule_params,omitempty"`
TextContentParams TextContentParameters `json:"text_content_params,omitempty"`
TextRuleParams TextRuleParameters `json:"text_rule_params,omitempty"`
Type string `json:"type,omitempty"`
UserCreatedWithinParams UserCreatedWithinParameters `json:"user_created_within_params,omitempty"`
UserCustomPropertyParams UserCustomPropertyParameters `json:"user_custom_property_params,omitempty"`
UserFlagCountRuleParams FlagCountRuleParameters `json:"user_flag_count_rule_params,omitempty"`
UserIdenticalContentCountParams UserIdenticalContentCountParameters `json:"user_identical_content_count_params,omitempty"`
UserRoleParams UserRoleParameters `json:"user_role_params,omitempty"`
UserRuleParams UserRuleParameters `json:"user_rule_params,omitempty"`
VideoContentParams VideoContentParameters `json:"video_content_params,omitempty"`
VideoRuleParams VideoRuleParameters `json:"video_rule_params,omitempty"`
}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 | float64 | 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
type RuleBuilderConditionGroup struct {
Conditions []RuleBuilderCondition `json:"conditions,omitempty"`
Logic string `json:"logic,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| conditions | []RuleBuilderCondition | No | |
| logic | string | No |
RuleBuilderConfig
type RuleBuilderConfig struct {
Async bool `json:"async,omitempty"`
Rules []RuleBuilderRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| rules | []RuleBuilderRule | No |
RuleBuilderRule
type RuleBuilderRule struct {
Action RuleBuilderAction `json:"action,omitempty"`
ActionSequences []CallRuleActionSequence `json:"action_sequences,omitempty"`
Conditions []RuleBuilderCondition `json:"conditions,omitempty"`
CooldownPeriod string `json:"cooldown_period,omitempty"`
Groups []RuleBuilderConditionGroup `json:"groups,omitempty"`
Id string `json:"id,omitempty"`
Logic string `json:"logic,omitempty"`
RuleType string `json:"rule_type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rule_type | string | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | []CallRuleActionSequence | No | |
| conditions | []RuleBuilderCondition | No | |
| cooldown_period | string | No | |
| groups | []RuleBuilderConditionGroup | No | |
| id | string | No | |
| logic | string | No |
ShadowBlockActionRequestPayload
Configuration for shadow block action
type ShadowBlockActionRequestPayload struct {
Reason string `json:"reason,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | string | No | Reason for shadow blocking |
SortParamRequest
type SortParamRequest struct {
Direction int `json:"direction,omitempty"`
Field string `json:"field,omitempty"`
Type string `json:"type,omitempty"`
}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
type SubmitActionResponse struct {
AppealItem AppealItemResponse `json:"appeal_item,omitempty"`
Duration string `json:"duration,omitempty"`
Item ReviewQueueItemResponse `json:"item,omitempty"`
}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
type TextContentParameters struct {
BlocklistMatch []string `json:"blocklist_match,omitempty"`
ContainsUrl bool `json:"contains_url,omitempty"`
HarmLabels []string `json:"harm_labels,omitempty"`
LabelOperator string `json:"label_operator,omitempty"`
LlmHarmLabels map[string]interface{} `json:"llm_harm_labels,omitempty"`
Severity string `json:"severity,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist_match | []string | No | |
| contains_url | bool | No | |
| harm_labels | []string | No | |
| label_operator | string | No | |
| llm_harm_labels | map[string]interface{} | No | |
| severity | string | No |
TextRuleParameters
type TextRuleParameters struct {
BlocklistMatch []string `json:"blocklist_match,omitempty"`
ContainsUrl bool `json:"contains_url,omitempty"`
HarmLabels []string `json:"harm_labels,omitempty"`
LlmHarmLabels map[string]interface{} `json:"llm_harm_labels,omitempty"`
SemanticFilterMinThreshold float64 `json:"semantic_filter_min_threshold,omitempty"`
SemanticFilterNames []string `json:"semantic_filter_names,omitempty"`
Severity string `json:"severity,omitempty"`
Threshold int `json:"threshold,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklist_match | []string | No | |
| contains_url | bool | No | |
| harm_labels | []string | No | |
| llm_harm_labels | map[string]interface{} | No | |
| semantic_filter_min_threshold | float64 | No | |
| semantic_filter_names | []string | No | |
| severity | string | No | |
| threshold | int | No | |
| time_window | string | No |
Time
type Time struct {
}TriggeredRuleResponse
type TriggeredRuleResponse struct {
Actions []string `json:"actions,omitempty"`
CallOptions CallActionOptions `json:"call_options,omitempty"`
RuleId string `json:"rule_id,omitempty"`
RuleName string `json:"rule_name,omitempty"`
ViolationNumber int `json:"violation_number,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| actions | []string | Yes | Action types resolved from the rule's action sequence |
| rule_id | string | Yes | ID of the moderation rule that triggered |
| call_options | CallActionOptions | No | Options for call actions (mute settings, warning text, kick reason) |
| rule_name | string | No | Name of the moderation rule that triggered |
| violation_number | int | No | Violation count for action sequence rules (1-based) |
UnbanActionRequestPayload
Configuration for unban moderation action
type UnbanActionRequestPayload struct {
ChannelCid string `json:"channel_cid,omitempty"`
DecisionReason string `json:"decision_reason,omitempty"`
RemoveFutureChannelsBan bool `json:"remove_future_channels_ban,omitempty"`
}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
type UnbanResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
UnblockActionRequestPayload
Configuration for unblock action
type UnblockActionRequestPayload struct {
DecisionReason string `json:"decision_reason,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | string | No | Reason for the appeal decision |
UnmuteResponse
type UnmuteResponse struct {
Duration string `json:"duration,omitempty"`
NonExistingUsers []string `json:"non_existing_users,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| non_existing_users | []string | No | A list of users that can't be found. Common cause for this is deleted users |
UpsertConfigResponse
type UpsertConfigResponse struct {
Config ConfigResponse `json:"config,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| config | ConfigResponse | No | The created or updated moderation configuration |
UpsertModerationRuleResponse
Basic response information
type UpsertModerationRuleResponse struct {
Duration string `json:"duration,omitempty"`
Rule ModerationRuleV2Response `json:"rule,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| rule | ModerationRuleV2Response | No |
UpsertModerationTemplateResponse
type UpsertModerationTemplateResponse struct {
Config FeedsModerationTemplateConfigPayload `json:"config,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
Name string `json:"name,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | When the template was created |
| duration | string | Yes | |
| name | string | Yes | Name of the moderation template |
| updated_at | float64 | Yes | When the template was last updated |
| config | FeedsModerationTemplateConfigPayload | No | Configuration for the moderation template |
User
type User struct {
Data map[string]interface{} `json:"data,omitempty"`
Id string `json:"id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | map[string]interface{} | No |
UserCreatedWithinParameters
type UserCreatedWithinParameters struct {
MaxAge string `json:"max_age,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| max_age | string | No |
UserCustomPropertyParameters
type UserCustomPropertyParameters struct {
Operator string `json:"operator,omitempty"`
PropertyKey string `json:"property_key,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| property_key | string | No |
UserIdenticalContentCountParameters
type UserIdenticalContentCountParameters struct {
Threshold int `json:"threshold,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| threshold | int | No | |
| time_window | string | No |
UserMuteResponse
type UserMuteResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Expires float64 `json:"expires,omitempty"`
Target UserResponse `json:"target,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| updated_at | float64 | Yes | |
| expires | float64 | No | |
| target | UserResponse | No | |
| user | UserResponse | No |
UserRequest
User request object
type UserRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
Name string `json:"name,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
Role string `json:"role,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | map[string]interface{} | 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 | []string | No | List of teams the user belongs to |
| teams_role | map[string]interface{} | No | Map of team-specific roles for the user |
UserResponse
User response object
type UserResponse struct {
AvgResponseTime int `json:"avg_response_time,omitempty"`
BanExpires float64 `json:"ban_expires,omitempty"`
Banned bool `json:"banned,omitempty"`
BlockedUserIds []string `json:"blocked_user_ids,omitempty"`
BypassModeration bool `json:"bypass_moderation,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeactivatedAt float64 `json:"deactivated_at,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Devices []DeviceResponse `json:"devices,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
LastActive float64 `json:"last_active,omitempty"`
Name string `json:"name,omitempty"`
Online bool `json:"online,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
PushNotifications PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
RevokeTokensIssuedBefore float64 `json:"revoke_tokens_issued_before,omitempty"`
Role string `json:"role,omitempty"`
ShadowBanned bool `json:"shadow_banned,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | []string | Yes | |
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | 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 | []string | Yes | List of teams user is a part of |
| updated_at | float64 | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float64 | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float64 | No | Date of deactivation |
| deleted_at | float64 | No | Date/time of deletion |
| devices | []DeviceResponse | No | List of devices user is using |
| image | string | No | |
| last_active | float64 | 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 | float64 | No | Revocation date for tokens |
| teams_role | map[string]interface{} | No |
UserRoleParameters
type UserRoleParameters struct {
Operator string `json:"operator,omitempty"`
Role string `json:"role,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| operator | string | No | |
| role | string | No |
UserRuleParameters
type UserRuleParameters struct {
MaxAge string `json:"max_age,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| max_age | string | No |
VelocityFilterConfig
type VelocityFilterConfig struct {
AdvancedFilters bool `json:"advanced_filters,omitempty"`
Async bool `json:"async,omitempty"`
CascadingActions bool `json:"cascading_actions,omitempty"`
CidsPerUser int `json:"cids_per_user,omitempty"`
Enabled bool `json:"enabled,omitempty"`
FirstMessageOnly bool `json:"first_message_only,omitempty"`
Rules []VelocityFilterConfigRule `json:"rules,omitempty"`
}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 | []VelocityFilterConfigRule | No |
VelocityFilterConfigRule
type VelocityFilterConfigRule struct {
Action string `json:"action,omitempty"`
BanDuration int `json:"ban_duration,omitempty"`
CascadingAction string `json:"cascading_action,omitempty"`
CascadingThreshold int `json:"cascading_threshold,omitempty"`
CheckMessageContext bool `json:"check_message_context,omitempty"`
FastSpamThreshold int `json:"fast_spam_threshold,omitempty"`
FastSpamTtl int `json:"fast_spam_ttl,omitempty"`
IpBan bool `json:"ip_ban,omitempty"`
ProbationPeriod int `json:"probation_period,omitempty"`
ShadowBan bool `json:"shadow_ban,omitempty"`
SlowSpamBanDuration int `json:"slow_spam_ban_duration,omitempty"`
SlowSpamThreshold int `json:"slow_spam_threshold,omitempty"`
SlowSpamTtl int `json:"slow_spam_ttl,omitempty"`
UrlOnly bool `json:"url_only,omitempty"`
}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
type VideoCallRuleConfig struct {
FlagAllLabels bool `json:"flag_all_labels,omitempty"`
FlaggedLabels []string `json:"flagged_labels,omitempty"`
Rules []HarmConfig `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | bool | No | |
| flagged_labels | []string | No | |
| rules | []HarmConfig | No |
VideoContentParameters
type VideoContentParameters struct {
HarmLabels []string `json:"harm_labels,omitempty"`
LabelOperator string `json:"label_operator,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | []string | No | |
| label_operator | string | No |
VideoRuleParameters
type VideoRuleParameters struct {
HarmLabels []string `json:"harm_labels,omitempty"`
Threshold int `json:"threshold,omitempty"`
TimeWindow string `json:"time_window,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| harm_labels | []string | No | |
| threshold | int | No | |
| time_window | string | No |