Appearance
Moderation
About 14528 wordsAbout 48 min
Go-Serverside SDK - Chat API
Table of Contents
- InsertActionLog
- Appeal
- GetAppeal
- QueryAppeals
- Ban
- BulkImageModeration
- Bypass
- Check
- CheckS3Access
- UpsertConfig
- GetConfig
- DeleteConfig
- QueryModerationConfigs
- CustomCheck
- V2QueryTemplates
- V2UpsertTemplate
- V2DeleteTemplate
- Flag
- GetFlagCount
- QueryModerationFlags
- QueryModerationLogs
- UpsertModerationRule
- GetModerationRule
- DeleteModerationRule
- QueryModerationRules
- Mute
- QueryReviewQueue
- GetReviewQueueItem
- SubmitAction
- Unban
- Unmute
- Types Reference
InsertActionLog
Use this method to record a log of moderation actions taken within a chat, which helps in maintaining a history of actions for accountability and future reference.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Insert moderation action log
resp, err := chatClient.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 challenge a moderation decision if you believe it was incorrect or unfair, helping to ensure accurate content moderation.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Appeal against the moderation decision
resp, err := chatClient.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)
chatClient := client.Chat()
// Appeal against the moderation decision
resp, err := chatClient.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 of a specific appeal you have submitted, allowing you to track the status and outcome of the appeal process.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Get appeal item
resp, err := chatClient.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 list submitted appeals based on specific criteria, enabling you to manage and review multiple appeals efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query Appeals
resp, err := chatClient.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)
chatClient := client.Chat()
// Query Appeals
resp, err := chatClient.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)
chatClient := client.Chat()
// Query Appeals
resp, err := chatClient.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
Use this method to prohibit a user from accessing your service due to violations, ensuring a safe and respectful environment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Ban
resp, err := chatClient.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)
chatClient := client.Chat()
// Ban
resp, err := chatClient.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)
chatClient := client.Chat()
// Ban
resp, err := chatClient.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)
chatClient := client.Chat()
// Ban
resp, err := chatClient.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
Moderate multiple images at once to quickly assess and filter large volumes of visual content for adherence to guidelines.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Bulk image moderation
resp, err := chatClient.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
This method allows you to override the moderation system for specific messages, ensuring that important content is delivered without delay or restriction.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Bypass Moderation
resp, err := chatClient.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 a piece of content to determine if it complies with established moderation policies, safeguarding your community standards.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Check
resp, err := chatClient.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)
chatClient := client.Chat()
// Check
resp, err := chatClient.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)
chatClient := client.Chat()
// Check
resp, err := chatClient.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)
chatClient := client.Chat()
// Check
resp, err := chatClient.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
Utilize this method to verify if your application has the necessary permissions to access images stored in an S3 bucket, ensuring smooth media retrieval and display.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Check S3 image access
resp, err := chatClient.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 a new or update an existing moderation policy configuration to tailor content review processes to your specific needs.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Create or update moderation configuration
resp, err := chatClient.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)
chatClient := client.Chat()
// Create or update moderation configuration
resp, err := chatClient.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)
chatClient := client.Chat()
// Create or update moderation configuration
resp, err := chatClient.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)
chatClient := client.Chat()
// Create or update moderation configuration
resp, err := chatClient.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 moderation configuration settings to review or audit how content moderation is being conducted.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Get moderation configuration
resp, err := chatClient.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 a specific moderation policy to discontinue its application, allowing for policy updates or changes in moderation strategy.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Delete a moderation policy
resp, err := chatClient.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 and retrieve a list of all moderation configurations, offering visibility into the rules and policies currently in effect.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query moderation configurations
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation configurations
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation configurations
resp, err := chatClient.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 moderation check on content, allowing users to apply specific rules or criteria. Use this method to evaluate content against bespoke moderation standards.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Custom check endpoint
resp, err := chatClient.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)
chatClient := client.Chat()
// Custom check endpoint
resp, err := chatClient.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 moderation templates for managing content feeds. Use this to view and select predefined moderation configurations for your content streams.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query feed moderation templates
resp, err := chatClient.V2QueryTemplates(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryFeedModerationTemplatesResponse
V2UpsertTemplate
Creates or updates a feed moderation template, enabling users to maintain consistent moderation settings. Use this to ensure your feed templates are current or to introduce new moderation guidelines.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Upsert feeds template
resp, err := chatClient.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 specific moderation template from the system. Use this method to clean up outdated or unnecessary templates from your moderation toolkit.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Delete a moderation template
resp, err := chatClient.V2DeleteTemplate(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteModerationTemplateResponse
Flag
Marks content as needing moderation review, helping prioritize items that may violate guidelines. Use this method to alert moderators to potentially problematic content.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Flag content for moderation
resp, err := chatClient.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)
chatClient := client.Chat()
// Flag content for moderation
resp, err := chatClient.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)
chatClient := client.Chat()
// Flag content for moderation
resp, err := chatClient.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
Use this method to retrieve the total number of flags associated with a user, which is useful for monitoring user activity and identifying potential issues or violations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Get flag count for a user
resp, err := chatClient.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
Provides a list of content items that have been flagged for moderation. Use this to review and manage content that requires attention due to potential guideline violations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query moderation flags
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation flags
resp, err := chatClient.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
Accesses logs of past moderation actions, offering insights into historical moderation activities. Use this to audit, review, or analyze past moderation decisions and actions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query moderation action logs
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation action logs
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation action logs
resp, err := chatClient.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 moderation rule to apply specific guidelines to content evaluation. Use this to ensure your moderation policy is up-to-date or to introduce new criteria.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Upsert moderation rule
resp, err := chatClient.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)
chatClient := client.Chat()
// Upsert moderation rule
resp, err := chatClient.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)
chatClient := client.Chat()
// Upsert moderation rule
resp, err := chatClient.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)
chatClient := client.Chat()
// Upsert moderation rule
resp, err := chatClient.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 the details of a specific moderation rule, allowing users to review current moderation criteria. Use this to understand existing rules or to verify their application.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Get moderation rule
resp, err := chatClient.GetModerationRule(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetModerationRuleResponse
DeleteModerationRule
Removes a specific moderation rule from the active set, aiding in policy refinement. Use this to eliminate outdated or irrelevant rules from your moderation framework.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Delete moderation rule
resp, err := chatClient.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 a list of active moderation rules to understand the criteria used for content moderation. Use this method to stay informed about which rules are currently in effect within the chat environment.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query moderation rules
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation rules
resp, err := chatClient.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)
chatClient := client.Chat()
// Query moderation rules
resp, err := chatClient.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 in the chat, preventing them from sending messages. Use this method to maintain order during discussions or to prevent disruptive behavior.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Mute
resp, err := chatClient.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)
chatClient := client.Chat()
// Mute
resp, err := chatClient.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 waiting for moderation review. Use this method to manage and prioritize pending moderation tasks efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Query review queue items
resp, err := chatClient.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)
chatClient := client.Chat()
// Query review queue items
resp, err := chatClient.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)
chatClient := client.Chat()
// Query review queue items
resp, err := chatClient.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)
chatClient := client.Chat()
// Query review queue items
resp, err := chatClient.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
Fetch detailed information about a specific item in the moderation review queue. Use this method to examine the content and context of an item before making a moderation decision.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Get review queue item
resp, err := chatClient.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
Perform a moderation action, such as approving or rejecting content, based on your review. Use this method to enforce moderation decisions and maintain community standards.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Submit moderation action
resp, err := chatClient.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)
chatClient := client.Chat()
// Submit moderation action
resp, err := chatClient.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)
chatClient := client.Chat()
// Submit moderation action
resp, err := chatClient.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)
chatClient := client.Chat()
// Submit moderation action
resp, err := chatClient.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 previously banned user, restoring their ability to participate in the chat. Use this method when a user's ban period has ended or if a ban was issued in error.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Unban
resp, err := chatClient.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)
chatClient := client.Chat()
// Unban
resp, err := chatClient.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
Restore a muted user's ability to send messages in the chat. Use this method when the mute period has ended or if the mute was applied by mistake.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
chatClient := client.Chat()
// Unmute a user
resp, err := chatClient.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 |
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 {
BannedBy UserResponse `json:"banned_by,omitempty"`
Channel ChannelResponse `json:"channel,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Expires float64 `json:"expires,omitempty"`
Reason string `json:"reason,omitempty"`
Shadow bool `json:"shadow,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | float64 | No | |
| reason | string | No | |
| shadow | bool | No | |
| user | UserResponse | No |
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 |
ChannelResponse
Represents channel in chat
type ChannelResponse struct {
AutoTranslationEnabled bool `json:"auto_translation_enabled,omitempty"`
AutoTranslationLanguage string `json:"auto_translation_language,omitempty"`
Blocked bool `json:"blocked,omitempty"`
Cid string `json:"cid,omitempty"`
Config ChannelConfigWithInfo `json:"config,omitempty"`
Cooldown int `json:"cooldown,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy UserResponse `json:"created_by,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Disabled bool `json:"disabled,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
Frozen bool `json:"frozen,omitempty"`
Hidden bool `json:"hidden,omitempty"`
HideMessagesBefore float64 `json:"hide_messages_before,omitempty"`
Id string `json:"id,omitempty"`
LastMessageAt float64 `json:"last_message_at,omitempty"`
MemberCount int `json:"member_count,omitempty"`
Members []ChannelMemberResponse `json:"members,omitempty"`
MessageCount int `json:"message_count,omitempty"`
MuteExpiresAt float64 `json:"mute_expires_at,omitempty"`
Muted bool `json:"muted,omitempty"`
OwnCapabilities []ChannelOwnCapability `json:"own_capabilities,omitempty"`
Team string `json:"team,omitempty"`
TruncatedAt float64 `json:"truncated_at,omitempty"`
TruncatedBy UserResponse `json:"truncated_by,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | Yes | Channel CID (<type>:<id>) |
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | Yes | Custom data for this object |
| disabled | bool | Yes | |
| frozen | bool | Yes | Whether channel is frozen or not |
| id | string | Yes | Channel unique ID |
| type | string | Yes | Type of the channel |
| updated_at | float64 | Yes | Date/time of the last update |
| auto_translation_enabled | bool | No | Whether auto translation is enabled or not |
| auto_translation_language | string | No | Language to translate to when auto translation is active |
| blocked | bool | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | int | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | float64 | No | Date/time of deletion |
| filter_tags | []string | No | List of filter tags associated with the channel |
| hidden | bool | No | Whether this channel is hidden by current user or not |
| hide_messages_before | float64 | No | Date since when the message history is accessible |
| last_message_at | float64 | No | Date of the last message sent |
| member_count | int | No | Number of members in the channel |
| members | []ChannelMemberResponse | No | List of channel members (max 100) |
| message_count | int | No | Number of messages in the channel |
| mute_expires_at | float64 | No | Date of mute expiration |
| muted | bool | No | Whether this channel is muted or not |
| own_capabilities | []ChannelOwnCapability | No | List of channel capabilities of authenticated user |
| team | string | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | float64 | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | 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 |
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 |
MessageRequest
Message data for creating or updating a message
type MessageRequest struct {
Attachments []Attachment `json:"attachments,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Html string `json:"html,omitempty"`
Id string `json:"id,omitempty"`
MentionedChannel bool `json:"mentioned_channel,omitempty"`
MentionedGroupIds []string `json:"mentioned_group_ids,omitempty"`
MentionedHere bool `json:"mentioned_here,omitempty"`
MentionedRoles []string `json:"mentioned_roles,omitempty"`
MentionedUsers []string `json:"mentioned_users,omitempty"`
Mml string `json:"mml,omitempty"`
ParentId string `json:"parent_id,omitempty"`
PinExpires float64 `json:"pin_expires,omitempty"`
Pinned bool `json:"pinned,omitempty"`
PinnedAt string `json:"pinned_at,omitempty"`
PollId string `json:"poll_id,omitempty"`
QuotedMessageId string `json:"quoted_message_id,omitempty"`
RestrictedVisibility []string `json:"restricted_visibility,omitempty"`
SharedLocation SharedLocation `json:"shared_location,omitempty"`
ShowInChannel bool `json:"show_in_channel,omitempty"`
Silent bool `json:"silent,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
User UserRequest `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | []Attachment | No | Array of message attachments |
| custom | map[string]interface{} | No | |
| html | string | No | Contains HTML markup of the message. Can only be set when using server-side API |
| id | string | No | Message ID is unique string identifier of the message |
| mentioned_channel | bool | No | |
| mentioned_group_ids | []string | No | List of user group IDs to mention. Group members who are also channel members... |
| mentioned_here | bool | No | |
| mentioned_roles | []string | No | |
| mentioned_users | []string | No | Array of user IDs to mention |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | float64 | No | Date when pinned message expires |
| pinned | bool | No | Whether message is pinned or not |
| pinned_at | string | No | Date when message got pinned |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message_id | string | No | |
| restricted_visibility | []string | No | A list of user ids that have restricted visibility to the message |
| shared_location | SharedLocation | No | Contains shared location data |
| show_in_channel | bool | No | Whether thread reply should be shown in the channel as well |
| silent | bool | No | Whether message is silent or not |
| text | string | No | Text of the message. Should be empty if mml is provided |
| type | string | No | Contains type of the message. One of: regular, system |
| user | UserRequest | No | |
| user_id | string | No |
ModerationConfig
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 |
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 |
ReactionRequest
Represents user reaction to a message
type ReactionRequest struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Score int `json:"score,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserRequest `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | The type of reaction (e.g. 'like', 'laugh', 'wow') |
| created_at | float64 | No | Date/time of creation |
| custom | map[string]interface{} | No | |
| score | int | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | float64 | No | Date/time of the last update |
| user | UserRequest | No | |
| user_id | string | 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 |
SharedLocation
type SharedLocation struct {
CreatedByDeviceId string `json:"created_by_device_id,omitempty"`
EndAt float64 `json:"end_at,omitempty"`
Latitude float64 `json:"latitude,omitempty"`
Longitude float64 `json:"longitude,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | float64 | Yes | |
| longitude | float64 | Yes | |
| created_by_device_id | string | No | |
| end_at | float64 | No |
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 |